Skip to content

fix: trufflehog scans excluded files locally - #286

Merged
gabelton merged 4 commits into
mainfrom
fix/trufflehog-still-scans-excluded-files-locally
Nov 19, 2026
Merged

gabelton merged 4 commits into
mainfrom
fix/trufflehog-still-scans-excluded-files-locally

Conversation

@gabelton

Copy link
Copy Markdown
Contributor

Signed-off-by: BIST pre-commit check

Description

The current trufflehog logic works in the context of GH actions where all files are scanned and those in the exclusions file excluded, but when a subset of those files are scanned locally as part of the pre-commit hook the exclusion logic isn't working.

Contributors

Let's acknowledge the people who contributed to the work.

Type of change

  • Refactoring (made code better without changing its behaviour)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How this has been tested

Please describe the tests that you ran to verify your changes.

If they are not automated tests please explain why and provide screenshots and/or instructions so they can reproduced.

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Reviewer Checklist

  • I have reviewed the PR and ensured no secret or sensitive values are present

Signed-off-by: BIST pre-commit check
Signed-off-by: BIST pre-commit check
@gabelton
gabelton requested a review from a team as a code owner November 19, 2026 11:44
@gabelton gabelton closed this Nov 19, 2026
@gabelton gabelton reopened this Nov 19, 2026
Comment thread src/hooks/trufflehog/scanner.py Resolved
@sumau

sumau commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Heya @gabelton thanks for raising this I've made one suggestion :-)

Co-authored-by: Soumaya Mauthoor <soumaya.mauthoor@businessandtrade.gov.uk>
@gabelton
gabelton merged commit f809c38 into main Nov 19, 2026
18 checks passed
@gabelton
gabelton deleted the fix/trufflehog-still-scans-excluded-files-locally branch November 19, 2026 14:09
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.

2 participants