File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Secret Scan
2+
3+ on :
4+ pull_request :
5+ branches : [main]
6+ push :
7+ branches : [main]
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ gitleaks :
14+ name : Scan for secrets
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - uses : gitleaks/gitleaks-action@v2
22+ env :
23+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -23,8 +23,21 @@ config.yaml.bak
2323* .tmp
2424* .swp
2525
26+ # Secrets and credentials (global)
27+ .env
28+ .env. *
29+ ! .env.example
30+ * .key
31+ * .pem
32+ * .p12
33+ * .pfx
34+ * .crt
35+ credentials. *
36+ secrets. *
37+ secrets /
38+ * .keystore
39+
2640# Token Spy runtime
27- token-spy /.env
2841token-spy /data /
2942token-spy /* .db
3043token-spy /* .sqlite
Original file line number Diff line number Diff line change 1+ # Gitleaks ignore file
2+ # Add fingerprints of known false positives here (one per line)
3+ # Get fingerprints from gitleaks output when a false positive is detected
4+ #
5+ # Example: abc123def456...
Original file line number Diff line number Diff line change 1+ # Pre-commit hooks for secret scanning
2+ # Install: pip install pre-commit && pre-commit install
3+ # Run manually: pre-commit run --all-files
4+
5+ repos :
6+ - repo : https://github.com/gitleaks/gitleaks
7+ rev : v8.21.2
8+ hooks :
9+ - id : gitleaks
10+
11+ - repo : https://github.com/pre-commit/pre-commit-hooks
12+ rev : v5.0.0
13+ hooks :
14+ - id : detect-private-key
15+ - id : check-added-large-files
16+ args : ['--maxkb=500']
You can’t perform that action at this time.
0 commit comments