Skip to content

refactor: replace %v with %w for proper error wrapping #14

refactor: replace %v with %w for proper error wrapping

refactor: replace %v with %w for proper error wrapping #14

---
name: Secret Scanning
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
secret-scan:
name: Scan for secrets (Gitleaks)
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_REPORT_PATH: gitleaks-results.sarif
GITLEAKS_REPORT_FORMAT: sarif
with:
args: >-
--redact
--report-format sarif
--report-path gitleaks-results.sarif
--exit-code 1
- name: Upload SARIF to GitHub Security tab
if: always() && hashFiles('gitleaks-results.sarif') != ''
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: gitleaks-results.sarif
category: secret-scanning