Skip to content

Merge pull request #35 from johnwmail/feature/tmpl #181

Merge pull request #35 from johnwmail/feature/tmpl

Merge pull request #35 from johnwmail/feature/tmpl #181

Workflow file for this run

name: Run Gosec Security Scan
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
schedule:
- cron: "25 5 * * 6" # Weekly on Saturdays at 5:25 AM
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: read
contents: read
security-events: write
jobs:
gosec:
name: Run gosec
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run gosec via action
uses: securego/[email protected]
with:
args: -fmt sarif -out gosec.sarif ./...
continue-on-error: true
timeout-minutes: 15
- name: Check SARIF file
id: check_sarif
run: |
if [ -f gosec.sarif ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Upload sarif
if: steps.check_sarif.outputs.exists == 'true'
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: gosec.sarif