Skip to content

Add .gitattributes to exclude secret files from language stats #8

Add .gitattributes to exclude secret files from language stats

Add .gitattributes to exclude secret files from language stats #8

Workflow file for this run

name: secrets-scan
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# Weekly scan
- cron: '0 0 * * 0'
jobs:
gitleaks:
name: Scan for secrets
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# Fetch all history for accurate results
fetch-depth: 0
- name: Run Gitleaks
uses: zricethezav/gitleaks-action@v2
with:
# Use default configuration which includes many common patterns
config-path: ""
# Fail the build if any secrets are found
fail: true
# Show more detailed output
verbose: true
# Check the full git history
fetch-depth: 0
# Additional paths to scan (optional)
paths: ".,.github/workflows/"
- name: Upload SARIF report
if: always()
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: gitleaks-report.sarif