ci: Public repo secret scanner #6
Workflow file for this run
This file contains 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
# Secret-scanner workflow from Arista Networks. | |
on: | |
pull_request: | |
types: [synchronize] | |
push: | |
branches: | |
- main | |
name: Secret Scanner (go/secret-scanner) | |
jobs: | |
scan_secret: | |
name: Scan incoming changes | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/aristanetworks/secret-scanner-service:main | |
options: --name sss-scanner | |
steps: | |
- name: Checkout ${{ github.ref }} | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
path: /tmp | |
- name: Run scanner | |
run: scanner 'commit' /tmp github ${{ github.repository }} --markdown-file job_summary.md \ | |
${{ github.event_name == 'pull_request' && format('--since-commit {0}', github.event.pull_request.base.sha) || ''}} | |
- name: Write result to summary | |
run: cat /tmp/job_summary.md >> $GITHUB_STEP_SUMMARY | |
if: ${{ always() }} |