forked from kserve/kserve
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
- Loading branch information
1 parent
ef8ee1f
commit 596c1d6
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: "Go Security Scan" | ||
|
||
# Run workflow each time code is pushed to your repository and on a schedule. | ||
# The scheduled workflow runs every Sunday at 00:00 UTC time. | ||
on: | ||
push: | ||
schedule: | ||
- cron: '0 0 * * 0' | ||
workflow_dispatch: { } | ||
|
||
jobs: | ||
go-src-scan: | ||
runs-on: ubuntu-latest | ||
env: | ||
GO111MODULE: on | ||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Gosec Security Scanner | ||
uses: securego/gosec@master | ||
with: | ||
args: '-no-fail -fmt=sarif -out=go-security-scan-results.sarif -exclude-dir=./pkg/client -exclude-dir=./pkg/clientv1alpha1 ./pkg/... ./cmd/...' | ||
|
||
- name: Upload SARIF file to Github Code Scanning | ||
uses: github/codeql-action/upload-sarif@v1 | ||
with: | ||
# Path to SARIF file relative to the root of the repository | ||
sarif_file: go-security-scan-results.sarif | ||
category: gosec-tool |