Skip to content

Leaked Secrets Scan #412

Leaked Secrets Scan

Leaked Secrets Scan #412

name: Leaked Secrets Scan
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
security-events: write
jobs:
gitleaks-cli:
name: gitleaks (CLI)
runs-on: ubuntu-latest
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 SARIF to code scanning
if: always()
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: gitleaks-report.sarif
category: gitleaks
- name: Upload report
uses: actions/upload-artifact@v7
if: always()
with:
name: gitleaks-report
path: gitleaks-report.sarif
retention-days: 30