refactor: replace %v with %w for proper error wrapping #14
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: 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 |