Skip to content

Fix CI: pin actions to SHAs, upgrade golangci-lint, fix flaky test #82

Fix CI: pin actions to SHAs, upgrade golangci-lint, fix flaky test

Fix CI: pin actions to SHAs, upgrade golangci-lint, fix flaky test #82

Workflow file for this run

name: Trivy vulnerability scanner
on:
pull_request: {}
push: {}
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4
with:
go-version: ^1.19
id: go
- name: Checkout code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Build a binary
run: |
go build -a -mod vendor -o example/iscsi-lib-example ./example
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
with:
scan-type: fs
scan-ref: 'example/iscsi-lib-example'
ignore-unfixed: true
vuln-type: 'os,library'
format: 'table'
exit-code: '1'
severity: 'CRITICAL,HIGH,MEDIUM,LOW'