chore(ci): name the security check for what it does, not for its tools - #92
Merged
Conversation
`Self-audit (gitleaks + tfsec + checkov + trivy fs)` -> `Self-audit (secrets + IaC + supply chain)`. The old name enumerated its tools, so ADR-046 falsified it the moment tfsec was swapped for Trivy. Correcting it was not a one-line edit: a required status check is identified by its job-name string, so renaming the job leaves the ruleset waiting for a context that will never report — the PR containing the rename blocks itself. ADR-046 shipped with a name it knew to be wrong and recorded why. Step 2 of the three-step transition. Step 1 dropped the context from the ruleset by direct API call, deliberately not committed: that state is transient and scripts/setup_branch_protection.sh stays the source of truth for the final shape. Step 3 re-applies the ruleset from this payload. All three canonical sources move together, as docs/governance/branch-protection.md requires: this document, ADR-026 and the applier script. The procedure is now written down under §"Renaming a required check", including the two things that bite: the check is not required between steps 1 and 3, and re-adding a required check while it is red blocks every subsequent PR. The new name describes the classes of check rather than the tools, so the next tool swap touches no contract at all. That is the real fix; this rename is just the current instance of it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 2 of the three-step ruleset transition ADR-046 anticipated.
Self-audit (gitleaks + tfsec + checkov + trivy fs)→Self-audit (secrets + IaC + supply chain).Why this needed a transition at all
A required status check is identified by its job-name string. Rename the job and the ruleset keeps waiting for a context that will never report — so the PR containing the rename blocks itself.
That is why #90 shipped a job named after a tool it no longer runs, and said so in the workflow and in ADR-046 rather than leaving it as an unexplained inaccuracy.
The three steps
PUTscripts/setup_branch_protection.shStep 1 is deliberately not committed. That state is transient; the applier script stays the source of truth for the final shape, so the repo never records a half-transition.
docs/governance/branch-protection.mdsays any change must update all three sources in the same commit, so this PR moves that document,ADR-026and the applier payload together.The actual fix is the naming rule, not this rename
The old name enumerated its tools, which guaranteed it would go stale on the next tool change — and made that staleness expensive to correct, because it was welded to a required-check contract.
secrets + IaC + supply chainnames the classes of check. The job runs gitleaks and a hardcoded-credential sweep (secrets), Trivy config and Checkov (IaC), plus pin-drift checks, toolchain-install hygiene and a Trivy filesystem CVE scan (supply chain). A future tool swap now touches no contract at all.What is written down
New section in
docs/governance/branch-protection.md— "Renaming a required check" — with the procedure and the two things that bite:mainfirst.ADR-046 is amended rather than rewritten: its Consequences section recorded that the name was left alone deliberately, and now records that the transition was carried out. The
[Unreleased]CHANGELOG entry from #90 is corrected in place, since it has not shipped.Verification
Step 3 runs immediately after this merges, and I will confirm the ruleset reads back with six contexts under the new name.
🤖 Generated with Claude Code