|
| 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