Skip to content

Commit

Permalink
Merge pull request #50 from bci-oss/feature/resolve-main-release-conf…
Browse files Browse the repository at this point in the history
…licts

Resolve main release conflicts
  • Loading branch information
tunacicek authored Jan 12, 2023
2 parents 72366ba + e42cfd3 commit 0c129a3
Show file tree
Hide file tree
Showing 33 changed files with 709 additions and 253 deletions.
61 changes: 40 additions & 21 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
# Copyright (c) 2021-2022 Copyright (c) 2021-2022 Robert Bosch Manufacturing Solutions GmbH
# Copyright (c) 2021-2022 Contributors to the Eclipse Foundation

# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.

# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# SPDX-License-Identifier: Apache-2.0
name: gitleaks
on: [push, pull_request, workflow_dispatch]
jobs:
gitleaks:
gitleaks-run:
runs-on: ubuntu-latest
container:
image: zricethezav/gitleaks:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -11,30 +31,29 @@ jobs:

- name: Run Gitleaks
id: gitleaks
uses: DariuszPorowski/github-action-gitleaks@v2
with:
report_format: "sarif"
fail: true
# config: "/.gitleaks/GitleaksUdmCombo.toml"

- name: Get the output from the gitleaks step
run: |
echo "exitcode: ${{ steps.gitleaks.outputs.exitcode }}"
echo "result: ${{ steps.gitleaks.outputs.result }}"
echo "output: ${{ steps.gitleaks.outputs.output }}"
echo "command: ${{ steps.gitleaks.outputs.command }}"
echo "report: ${{ steps.gitleaks.outputs.report }}"
if: always()
git config --global --add safe.directory $PWD
gitleaks detect -f sarif -r ./gitleaks-report-semantic-hub.sarif --exit-code 0
- name: Upload Gitleaks output as artifact
uses: actions/upload-artifact@v1
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: gitleaks.sarif
path: ${{ steps.gitleaks.outputs.report }}
if: always()
name: gitleaks-report
path: ./gitleaks-report-semantic-hub.sarif


gitleaks-upload:
runs-on: ubuntu-latest
needs: gitleaks-run
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: gitleaks-report
- name: Upload SARIF report
if: always()
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.gitleaks.outputs.report }}
sarif_file: ./gitleaks-report-semantic-hub.sarif
55 changes: 55 additions & 0 deletions .github/workflows/helm-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright (c) 2021-2022 Copyright (c) 2021-2022 Robert Bosch Manufacturing Solutions GmbH
# Copyright (c) 2021-2022 Contributors to the Eclipse Foundation

# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.

# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# SPDX-License-Identifier: Apache-2.0
---

name: Release - Helm Charts

on:
push:
paths:
- 'charts/**'
branches:
- main
workflow_dispatch:

jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
72 changes: 72 additions & 0 deletions .github/workflows/kics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Copyright (c) 2021-2022 Copyright (c) 2021-2022 Robert Bosch Manufacturing Solutions GmbH
# Copyright (c) 2021-2022 Contributors to the Eclipse Foundation

# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.

# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# SPDX-License-Identifier: Apache-2.0
---

name: "KICS"

on:
push:
branches: [main, master]
# pull_request:
# The branches below must be a subset of the branches above
# branches: [main, master]
# paths-ignore:
# - "**/*.md"
# - "**/*.txt"
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- uses: actions/checkout@v3

- name: KICS scan
uses: checkmarx/kics-github-action@master
with:
# Scanning directory .
path: "."
# Exclude paths from scan by providing the paths as comma separated list
# exclude_paths: "postgres-init.yaml,templates/sharedidp.yaml"
# Exclude queries by providing the query / rule ID as comma separated list
# exclude_queries: "b9c83569-459b-4110-8f79-6305aa33cb37"
# Fail on HIGH severity results
fail_on: high
# Disable secrets detection - we use GitGuardian
disable_secrets: true
# When provided with a directory on output_path
# it will generate the specified reports file named 'results.{extension}'
# in this example it will generate:
# - results-dir/results.json and results-dir/results.sarif
output_path: kicsResults/
output_formats: "json,sarif"

# Upload findings to GitHub Advanced Security Dashboard
- name: Upload SARIF file for GitHub Advanced Security Dashboard
if: always()
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: kicsResults/results.sarif
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Copyright (c) 2021-2022 Copyright (c) 2021-2022 Robert Bosch Manufacturing Solutions GmbH
# Copyright (c) 2021-2022 Contributors to the Eclipse Foundation

# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.

# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# SPDX-License-Identifier: Apache-2.0
---
name: "Create new version tag"

Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/trivy-scan.yml

This file was deleted.

90 changes: 90 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Copyright (c) 2021-2022 Copyright (c) 2021-2022 Robert Bosch Manufacturing Solutions GmbH
# Copyright (c) 2021-2022 Contributors to the Eclipse Foundation

# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.

# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# SPDX-License-Identifier: Apache-2.0
name: Trivy

on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:

jobs:
analyze-config:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@master
with:
scan-type: "config"
# ignore-unfixed: true
exit-code: "1"
hide-progress: false
format: "sarif"
output: "trivy-results1.sarif"
severity: "CRITICAL,HIGH"

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: "trivy-results1.sarif"

analyze-semantic-hub:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Build JAR
run: mvn clean package

- name: Build Image
run: docker build -t semantic-hub ./backend

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: semantic-hub
# ignore-unfixed: true
exit-code: "1"
hide-progress: false
format: "sarif"
output: "trivy-results-semantic-hub.sarif"
severity: "CRITICAL,HIGH"

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: "trivy-results-semantic-hub.sarif"
Loading

0 comments on commit 0c129a3

Please sign in to comment.