Skip to content

Commit

Permalink
Add scheduled go security scan
Browse files Browse the repository at this point in the history
Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
  • Loading branch information
sivanantha321 committed Oct 5, 2023
1 parent ef8ee1f commit 596c1d6
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/go-security-scan.yml
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

0 comments on commit 596c1d6

Please sign in to comment.