fix: laat de geheimenscan niet op de eigen reflog vallen #533
No reviewers
Labels
No labels
accepted
bug
declined
docs
duplicate
enhancement
good first issue
in-progress
needs-info
privacy
security
triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
LibreKAT/Ocideck!533
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/geheimenscan-reflog"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
make check-secretsfailed on a clean checkout ofmain, on git's own bookkeeping rather than on repository content: trufflehog's filesystem pass read.git/logs/HEAD— 2109 lines of commit SHAs — and matched a 40-character hex SHA as aLokaliseToken. Both gitleaks passes reported no leaks.Closes #522
Why this mattered more than one false positive
The gate depended on machine-local state. It went red or green depending on how many commits you happened to have made locally, so two people on the same commit got different answers and re-running fixed nothing. A gate that fails for a reason nobody can act on teaches people to skip it — and this is the last line before a committed credential reaches a public repository.
Changes
.git/excluded in both.trufflehogignoreand.gitleaks.toml, in the existing idiom of those files (each exclusion carries its reasoning inline).The history is not affected. It stays fully covered by the separate
trufflehog gitandgitleaks gitpasses. What is excluded is.git/as a filesystem, which contains nothing that is not also read elsewhere.Verification, both directions
This is a security gate being narrowed, so "it is green now" proves nothing on its own:
make check-secretsexits 0, both scanners report no leaks.lib/—leaks found: 1, exit 2.A note for whoever verifies this next. My first attempt used
AKIAIOSFODNN7EXAMPLE/wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEYand the scan passed — which looked like the gate had gone blind. It had not: that is AWS's own documentation example pair, and both scanners deliberately allowlist it. It is useless as a test fixture. A non-allowlisted key of the same shape is caught immediately.Gates
make checkgreen.make check-secretsnow green.make saststill red for the pre-existing reason in #521 — next.Principles
Narrows a security control, which is the direction that deserves scrutiny rather than trust. Weighed above: coverage is unchanged because the excluded path is redundant with the git passes, and the claim was tested rather than assumed.