goSec and go-critic test #4
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 Tools Scan | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- main | |
jobs: | |
gosec-scan: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- name: Add Go Bin to PATH | |
run: echo "$HOME/go/bin" >> $GITHUB_PATH | |
- name: Install GoSec | |
run: go install github.com/securego/gosec/v2/cmd/gosec@v2.17.0 | |
- name: Run GoSec | |
run: $HOME/go/bin/gosec ./... | |
go-critic-scan: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- name: Add Go Bin to PATH | |
run: echo "$HOME/go/bin" >> $GITHUB_PATH | |
- name: Install Go-Critic | |
run: go install github.com/go-critic/go-critic/cmd/gocritic@latest | |
- name: Run Go-Critic | |
run: $HOME/go/bin/gocritic check-project ./... |