Skip to content

Commit d7357ba

Browse files
Copilotcommjoen
andcommitted
Add documentation for secret scanner comparison workflow
Co-authored-by: commjoen <[email protected]>
1 parent a880dab commit d7357ba

File tree

2 files changed

+91
-0
lines changed

2 files changed

+91
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,20 @@ As tons of secret detection tools are coming up for both Docker and Git, we are
475475
Want to know if your tool detects everything? We will keep track of the embedded secrets in [this issue](https://github.com/OWASP/wrongsecrets/issues/201) and have a [branch](https://github.com/OWASP/wrongsecrets/tree/experiment-bed) in which we put additional secrets for your tool to detect.
476476
The branch will contain a Docker container generation script using which you can eventually test your container secret scanning.
477477

478+
### Automated Secret Scanner Comparison
479+
480+
We now provide an automated GitHub Action workflow that benchmarks multiple secret scanning tools against the WrongSecrets codebase. The [Secret Scanner Comparison workflow](/.github/workflows/scanner-comparison.yml) tests 7 different tools:
481+
482+
- **TruffleHog** - Docker-based secret scanner
483+
- **git-secrets** - AWS Labs' git hook scanner
484+
- **gitleaks** - High-performance Go-based scanner
485+
- **detect-secrets** - Yelp's enterprise scanner
486+
- **gittyleaks** - Python-based pattern detector
487+
- **whispers** - Skyscanner's structured scanner
488+
- **trufflehog3** - Python version of TruffleHog
489+
490+
The workflow runs weekly and provides a comparison table showing how many secrets each tool detects, helping you understand the relative effectiveness of different secret scanning tools. See [docs/scanner-comparison.md](/docs/scanner-comparison.md) for more details on running and interpreting the results.
491+
478492
## CTF
479493

480494
We have 3 ways of playing CTFs:

docs/scanner-comparison.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Secret Scanner Comparison Workflow
2+
3+
## Overview
4+
5+
The `scanner-comparison.yml` workflow provides a comprehensive benchmark comparing multiple secret scanning tools on the OWASP WrongSecrets repository. This helps understand the relative effectiveness of different secret detection tools.
6+
7+
## Supported Scanners
8+
9+
The workflow currently tests 7 different secret scanning tools:
10+
11+
1. **TruffleHog** - Docker-based secret scanner with verified results
12+
2. **git-secrets** - AWS Labs' git hook for preventing secrets in commits
13+
3. **gitleaks** - High-performance secret scanner with JSON output
14+
4. **detect-secrets** - Yelp's enterprise secret scanner with baseline functionality
15+
5. **gittyleaks** - Python-based secret scanner with broad pattern detection
16+
6. **whispers** - Skyscanner's structured secret detection tool
17+
7. **trufflehog3** - Python version of TruffleHog with additional features
18+
19+
## Running the Workflow
20+
21+
### Manual Execution
22+
```bash
23+
# Trigger manually via GitHub Actions UI
24+
# Go to Actions > Secret Scanner Comparison Benchmark > Run workflow
25+
```
26+
27+
### Scheduled Execution
28+
The workflow automatically runs every Sunday at 02:00 UTC to provide regular benchmarking.
29+
30+
## Output Format
31+
32+
The workflow generates a summary report showing:
33+
34+
```
35+
| Scanner | Secrets Found |
36+
|---------|---------------|
37+
| TruffleHog | X |
38+
| git-secrets | X |
39+
| gitleaks | X |
40+
| detect-secrets | X |
41+
| gittyleaks | X |
42+
| whispers | X |
43+
| trufflehog3 | X |
44+
```
45+
46+
## Expected Results
47+
48+
Based on manual testing, the tools typically find:
49+
- **detect-secrets**: ~98 potential secrets
50+
- **gitleaks**: ~106 secrets
51+
- **gittyleaks**: ~137 findings
52+
53+
Results may vary as the repository evolves and tools update their detection patterns.
54+
55+
## Error Handling
56+
57+
The workflow includes robust error handling:
58+
- Tools that fail to install will show 0 results
59+
- Network timeouts are handled gracefully
60+
- Each scanner job runs independently in parallel
61+
- Failed scans don't block the summary report
62+
63+
## Tool Installation Notes
64+
65+
- **git-secrets**: Compiled from source (no official GitHub Action)
66+
- **gitleaks**: Downloaded as binary from GitHub releases
67+
- **Python tools**: Installed via pip with timeout handling
68+
- **TruffleHog**: Uses official Docker image
69+
70+
## Interpreting Results
71+
72+
Different tools have varying approaches:
73+
- Some focus on verified/confirmed secrets
74+
- Others detect potential patterns that may be false positives
75+
- Count differences are expected and help understand tool characteristics
76+
77+
This benchmark helps users choose appropriate tools for their security scanning needs based on detection coverage and accuracy requirements.

0 commit comments

Comments
 (0)