Add secret scanning workflow with Gitleaks - #2
Conversation
This workflow enforces secret scanning using Gitleaks on pull requests and pushes to the main branch, including a canary test for planted secrets.
| secret-scan: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
GitHub Action actions/checkout persist Git credentials in workflow - low severity
actions/checkout v2 and above persist the default GITHUB_TOKEN in the repository's local git config when persist-credentials is not set to false, during the workflow run. Subsequent workflow steps or third-party actions can read this token from git configuration, increasing the risk of credential theft or misuse within the pipeline. In order to limit the attack surface when external actions are compromised, ensure persist-credentials is set to false.
Show fix
Remediation: Set persist-credentials: false on actions/checkout steps that do not need to push commits back to the repository. Only keep persist-credentials: true when the workflow explicitly performs authenticated git push operations.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
This workflow enforces secret scanning using Gitleaks on pull requests and pushes to the main branch, including a canary test for planted secrets.
Summary
Checklist
pnpm test:all(or the CI-covered subset relevant to this change) passes locally.pnpm verify:proof-release).