Skip to content

upd: activate gosec

upd: activate gosec #2

Workflow file for this run

# Run tests on every push for extra branches

Check failure on line 1 in .github/workflows/go-test-gosec.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/go-test-gosec.yml

Invalid workflow file

you may only define one of `branches` and `branches-ignore` for a single event
name: GoSec
on:
push:
branches-ignore:
- 'dependabot/**'
branches:
- master
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
# we let the report trigger content trigger a failure using the GitHub Security features.
args: '-no-fail -fmt sarif -out results.sarif ./...'
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
# Path to SARIF file relative to the root of the repository
sarif_file: results.sarif
category: my-gosec-tool