From 5219810a8b69749dee1139877c1fe40d3b5d953d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20B=C5=82aszczyk?= Date: Tue, 11 Jun 2024 17:48:13 +0200 Subject: [PATCH] feat: introduce cve scanners (#788) --- .github/workflows/cve-scan.yaml | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/cve-scan.yaml diff --git a/.github/workflows/cve-scan.yaml b/.github/workflows/cve-scan.yaml new file mode 100644 index 00000000..7bb9c189 --- /dev/null +++ b/.github/workflows/cve-scan.yaml @@ -0,0 +1,40 @@ +name: Go Source Scanners +on: + push: + branches: + - "master" + tags: + - "v*.*.*" + pull_request: + branches: + - "master" + +jobs: + scanners: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Env + id: vars + shell: bash + run: | + echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> "${GITHUB_ENV}" + - name: Run Gosec Security Scanner + continue-on-error: true + uses: securego/gosec@master + with: + args: ./... + - name: Run Govulncheck Scanner + continue-on-error: true + uses: golang/govulncheck-action@v1 + with: + go-package: ./... + go-version-input: "1.22" + - name: Run Trivy vulnerability scanner in repo mode + continue-on-error: true + uses: aquasecurity/trivy-action@master + with: + scan-type: "fs" + ignore-unfixed: true + format: "json"