fix: correct v1 tag anchor SHA in ops/tag-v1.sh#11
Open
cryptoxdog wants to merge 1 commit into
Open
Conversation
EXPECTED_SHA was 2b330a5aab90cd7781bef08f14c5e7904b61bc56, a commit that predates the Actions SHA-pinning hardening fix on l9-ci-core (PR #8 / 8928005). Cutting v1.0.0/v1 at that SHA would have permanently frozen 64 floating third-party Action refs into an "immutable" tag, including ossf/scorecard-action@v2 in scorecard.yml. Corrected to 2a3270be5f5184099c33a101807f65b1becf4e7c, the last commit of the pre-v2-rewrite v1 lineage (direct parent of the v2 rewrite commit 54a2f2f), where all 8 workflow_call kernels have every third-party action SHA-pinned (one documented exception: pr-pipeline.yml's MegaLinter flavor step, which resolves its uses: path at runtime from a prior step output). Adds ops/verify-v1-anchor.sh, a read-only pre-tag gate the human runs before ops/tag-v1.sh to re-confirm zero floating refs at tag time. Parses EXPECTED_SHA out of tag-v1.sh so the two scripts cannot drift apart. No v1/v1.0.0 tag exists yet on l9-ci-core -- this is a preventive fix, not a retag. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
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.



Fix wrong
EXPECTED_SHAanchor inops/tag-v1.shThe defect
ops/tag-v1.shcuts the immutablev1.0.0tag and the movingv1tag onQuantum-L9/l9-ci-coreat a hardcodedEXPECTED_SHA. That SHA was2b330a5aab90cd7781bef08f14c5e7904b61bc56.That commit sits on a branch of
l9-ci-core's history that diverged frommainbefore PR #8 (commit8928005) landed the Actions SHA-pinninghardening fix. At
2b330a5, everyworkflow_callkernel — including.github/workflows/scorecard.yml— still references third-party GitHubActions by floating/mutable tag:
Cutting
v1.0.0at this SHA would have permanently frozen 64 floatingthird-party Action references into a tag whose entire purpose is
immutability — the exact supply-chain weakness
scorecard-actionitselfexists to flag. This is the "scorecard-action ref" defect: a symptom of the
wrong anchor commit, not a typo in
scorecard.yml.The fix
EXPECTED_SHAnow points to2a3270be5f5184099c33a101807f65b1becf4e7c—confirmed to be the direct parent of the v2-rewrite commit
(
54a2f2fc8d060674d544fab14388bb5eff6b8e78), i.e. the last commit of thepre-v2-rewrite v1 lineage. Verified:
.github/workflows/*.ymlfiles as the old anchor (nokernel added/removed), so the tag message's kernel list stays accurate.
workflow_callkernels have every third-party Action SHA-pinned,with one documented, unrelated exception (
pr-pipeline.yml's advisoryMegaLinter step resolves its flavor from a prior step's output, so the
uses:path is computed at runtime and cannot be a static SHA pin;DISABLE_ERRORS: true, does not gate merges).l9-self-ci.yml(self-only CI, noworkflow_calltrigger — neverconsumed by downstream
@v1consumers) does have pre-existing floatingrefs, identical at both the old and new anchor. That's unrelated,
internal-only debt and out of scope here; it's why the new
ops/verify-v1-anchor.shdeliberately scopes toworkflow_callkernelsonly.
New:
ops/verify-v1-anchor.shA lightweight, read-only script the human runs before
ops/tag-v1.shtore-confirm zero floating refs at tag time (not just at review time — the
same fetch-and-inspect logic that caught this defect, kept as a permanent
pre-push gate). It:
EXPECTED_SHAout oftag-v1.sh(single source of truth — the twoscripts can't drift apart).
l9-ci-core(read-only, no local clonerequired, no repository mutation).
uses:ref in the 8workflow_callkernels isa 40-char SHA, against one explicit, justified allowlist entry
(the MegaLinter dynamic flavor line above).
Proof
Ran the new script against both anchors as a positive/negative control pair:
2a3270be5...→ PASS — 68 refs inspected, 1 documentedexception, 0 violations.
2b330a5...→ FAIL — 64 violations, includingscorecard.yml:16 ossf/scorecard-action@v2,pr-pipeline.yml:319 ossf/scorecard-action@v2, and every other floatingcheckout/setup-python/upload-artifact/etc. ref that PR feat(l9-ci-pack): full v2 instantiation pack + legacy-mark @v1 starters + tag-v1.sh fix #8 later fixed onmain.This proves the script detects exactly the defect it exists to catch.
No retag needed
git ls-remote --tags https://github.com/Quantum-L9/l9-ci-core.gitshows nov1orv1.0.0tag exists yet. This is a preventive fix — nothing toroll back.
Out of scope (tracked separately)
tag-v1.shstep 4'sorigin/main == EXPECTED_SHAassertion (whichwill now always fail since
l9-ci-core'smainhas advanced past bothcandidate SHAs into the v2 rewrite) is a distinct, already-tracked task in
the
l9-ci-corecore_v2_org_deliveryplan (dotgithub-fix-tag-v1). ThisPR only corrects the anchor value and adds the verification gate; it does
not change the assertion logic.
l9-cito PyPI — explicitly out of scope for this fix.