ci: update Go version and workflow formatting adjustments #51
This file contains hidden or 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
name: Security Testing | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
GO_VERSION: "1.22.5" | |
jobs: | |
SAST: | |
name: Perform SAST analysis (golangci-lint) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Generate | |
run: go generate ./... | |
- name: Run SAST (golangci-lint) | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: "latest" | |
only-new-issues: true | |
args: --timeout=10m | |
skip-pkg-cache: true | |
skip-build-cache: true | |
SCA: | |
name: Perform SCA analysis (govulncheck) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Generate | |
run: go generate ./... | |
- name: Run SCA (govulncheck) | |
uses: golang/govulncheck-action@v1 | |
with: | |
go-version-input: ${{ env.GO_VERSION }} | |
go-package: ./... | |
cache: false |