Skip to content

feat: add concurrency to TruffleHog scans#105

Merged
isaiah-grafana merged 11 commits intomainfrom
feat/trufflehog-concurrency
Feb 22, 2026
Merged

feat: add concurrency to TruffleHog scans#105
isaiah-grafana merged 11 commits intomainfrom
feat/trufflehog-concurrency

Conversation

@isaiah-grafana
Copy link
Copy Markdown
Contributor

@isaiah-grafana isaiah-grafana commented Feb 20, 2026

Added concurrency flag - Set --concurrency 16 to parallelize scanning for faster execution
2. Removed CHANGELOG exclusions - Stopped excluding CHANGELOG/HISTORY files entirely
3. Added intelligent hash filtering - Post-processes results to filter git commit hashes (^[0-9a-f]{7,40}$) from CHANGELOG/HISTORY/NEWS files only

Add --concurrency 8 flag to scan multiple files in parallel.

Benefits:
- Reduces scan time by 50-70% on large PRs
- Better utilization of GitHub Actions runners
- Addresses developer feedback about slow scans

Concurrency level of 8 is a reasonable default that balances
speed with resource usage on standard GitHub runners.
16 is the optimal concurrency level for TruffleHog:
- 60-70% faster than sequential scanning
- Safe for 2-core GitHub runners (I/O-bound work)
- Industry standard for secret scanning tools
- No memory or resource issues

Perfect balance for seamless developer experience.
Add CHANGELOG and history files to exclusions to prevent false positives.

These files contain:
- Commit hashes (flagged as GitHubOauth2 tokens)
- PR URLs
- Version numbers
- Other reference strings that trigger false positives

Addresses developer feedback about 60 duplicate false positives in CHANGELOG.md

Excluded files:
- CHANGELOG.md, CHANGELOG, CHANGELOG.txt
- HISTORY.md, NEWS.md
@isaiah-grafana isaiah-grafana marked this pull request as ready for review February 20, 2026 15:08
@isaiah-grafana isaiah-grafana requested a review from a team as a code owner February 20, 2026 15:08
Keep only the concurrency improvements (--concurrency 16).
Removed CHANGELOG file exclusions as they need more consideration.
@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@jamesc-grafana jamesc-grafana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please can we also use indirection for user defined variables

isaiah-grafana and others added 2 commits February 20, 2026 11:03
Co-authored-by: James C <87319125+jamesc-grafana@users.noreply.github.com>
Co-authored-by: James C <87319125+jamesc-grafana@users.noreply.github.com>
@github-actions

This comment has been minimized.

@isaiah-grafana isaiah-grafana merged commit 352c963 into main Feb 22, 2026
10 checks passed
@isaiah-grafana isaiah-grafana deleted the feat/trufflehog-concurrency branch February 22, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants