A gate that git skipped
Every commit here is meant to pass through a hook that scans for credentials before anything is published. The change that moved that hook into the shared repository, so that it would travel to every machine, committed the hook file without its executable bit.
Git does not run a hook that is not executable. It prints one hint line and lets the commit through with a success code. So the shared gate never ran. Worse, the per-machine gate it replaced did run, so following the documented step on a machine would have swapped a working gate for a silent one, and the silence would have read as a clean result.
This was measured before it was believed: a throwaway repository committed cleanly with the hook at mode 644, and the same hook at mode 755 refused.
Why the tests were green
The test suite had an end-to-end case whose whole purpose was to prove that git runs the hook, with a comment naming the executable bit as the risk. It passed throughout, because the test made its own copy of the hook executable before running it.
A suite that builds its own fixture cannot verify a property of the artifact that ships. The fix keeps the fixture and adds a separate assertion on the file mode git has recorded for the committed hook. The two look redundant. Neither one can stand in for the other.
Coverage that was really coincidence
The same review found that the shared gate had dropped two rules the old per-machine configuration carried: the patterns for two cloud providers' API keys. The first test said they were still covered, because keys placed on lines named like settings were caught by a generic rule.
That generic rule needs a nearby word like key or token. Put the same keys in an ordinary sentence and nothing fired at all. A sentence is how keys actually leak: in a note, a handoff or a commit message.
Two rules followed. Assert the specific rule that should fire, never that something fired, because a test that accepts any hit still passes with the dedicated rule deleted. And test in the shape the thing appears in. Both new cases were run against the old configuration first and seen to fail before they were seen to pass.
What it did not establish
This closed the gap on one machine. Whether the other machines had the hook configured at all had to be measured on each of them, not inferred from this one.
The recurring shape is a green test whose green comes from the harness, not the subject. A gate is installed when the file is present. It is armed when the shipped file has been seen to refuse something.