Drop trufflehog and detect-secrets in favour of gitleaks #178
Workflow file for this run
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: Leaked Secrets Scan | |
| on: | |
| schedule: | |
| - cron: '0 3 * * *' | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| gitleaks-cli: | |
| name: gitleaks (CLI) | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| env: | |
| GITLEAKS_VERSION: '8.30.0' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install gitleaks | |
| run: | | |
| curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" \ | |
| | tar -xz -C /usr/local/bin gitleaks | |
| gitleaks version | |
| - name: Run gitleaks | |
| run: gitleaks detect --source . --redact -c .gitleaks.toml -v --report-format sarif --report-path gitleaks-report.sarif | |
| - name: Upload report | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: gitleaks-report | |
| path: gitleaks-report.sarif | |
| retention-days: 30 |