Skip to content

Commit

Permalink
Use separate sonarcloud.yaml
Browse files Browse the repository at this point in the history
This follows the convention from our other repos.

Signed-off-by: Dale Haiducek <[email protected]>
  • Loading branch information
dhaiducek committed Dec 5, 2023
1 parent 4969f22 commit 859ea33
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 100 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/gosec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: GoSec scan

on:
push:
branches:
- master
- release-[0-9]+.[0-9]+
pull_request:
branches:
- master
- release-[0-9]+.[0-9]+

jobs:
gosec:
runs-on: ubuntu-latest
steps:
- name: Checkout Gatekeeper
uses: actions/checkout@v4
- name: Run Gosec Security Scanner
uses: securego/[email protected]
with:
args: -no-fail -fmt sonarqube -out gosec.json -stdout -exclude-dir=.go -exclude-dir=test ./...
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: gosec.json
30 changes: 5 additions & 25 deletions .github/workflows/sonarcloud.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
name: Sonarcloud scan

on:
push:
branches:
- master
- release-[0-9]+.[0-9]+
pull_request:
branches:
- master
- release-[0-9]+.[0-9]+
workflow_run:
workflows:
- GoSec scan
types:
- completed

jobs:
gosec:
runs-on: ubuntu-latest
name: GoSec Scan
steps:
- name: Checkout Gatekeeper
uses: actions/checkout@v4
- name: Run Gosec Security Scanner
uses: securego/[email protected]
with:
args: -no-fail -fmt sonarqube -out gosec.json -stdout -exclude-dir=.go -exclude-dir=test ./...
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: gosec.json

sonarcloud:
needs: [ gosec ]
uses: stolostron/governance-policy-framework/.github/workflows/sonarcloud.yml@main
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Loading

0 comments on commit 859ea33

Please sign in to comment.