Skip to content

Security hardening Phase 3: provenance, scorecard, concurrency guards #77

Security hardening Phase 3: provenance, scorecard, concurrency guards

Security hardening Phase 3: provenance, scorecard, concurrency guards #77

Workflow file for this run

name: Security
on:
workflow_call:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 6 * * 1'
permissions:
contents: read
security-events: write
jobs:
secrets:
name: Secret scanning
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: Install gitleaks
run: |
curl -sSfL https://github.com/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz | tar -xz
sudo mv gitleaks /usr/local/bin/
- name: Run gitleaks
run: gitleaks detect --source . --verbose
trivy:
name: Trivy vulnerability scan
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # 0.34.2
with:
scan-type: fs
format: sarif
output: trivy-results.sarif
- uses: github/codeql-action/upload-sarif@c793b717bc78562f491db7b0e93a3a178b099162 # v4
with:
sarif_file: trivy-results.sarif
category: trivy
gosec:
name: Go security analysis
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: securego/gosec@bb17e422fc34bf4c0a2e5cab9d07dc45a68c040c # v2.24.7
with:
args: -no-fail -fmt sarif -out gosec-results.sarif ./...
- uses: github/codeql-action/upload-sarif@c793b717bc78562f491db7b0e93a3a178b099162 # v4
with:
sarif_file: gosec-results.sarif
category: gosec
dependency-review:
name: Dependency review
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/dependency-review-action@05fe4576374b728f0c523d6a13d64c25081e0803 # v4