Validate the feed against the channel it describes - #142
Merged
Conversation
The feed is a set of claims about published artifacts and nothing checked them.
On 2026-08-21 a merge of the updates-test branch into this one replaced the GA
bundle checksums with the testing channel's and added upgrade hops through
releases that never shipped. Nothing here went red. The break surfaced hours
later in simplerisk/docker, whose image build verifies the bundle against this
feed and fails closed -- blocking every PR in that repo.
Asserts the claims against reality:
- every manifest parses, and carries no DTD (these are generated files; a
DOCTYPE would only ever be an entity-expansion attack on the runner)
- Current_Version names a release that exists and publishes a checksum
- every release publishing a bundle_sha256 has a bundle actually fetchable on
this channel, hashing to exactly that value
- upgrade_path routes only to releases that exist, and agrees with each
release's next_release
The checked set is deliberately "entries making a claim", not "all entries".
A historical release carries no checksum and its bundle is long gone from the
channel -- that is correct and unremarkable. Publishing a checksum is what makes
a claim checkable, so that is the trigger. Only 2 of 111 entries qualify today,
so this downloads two bundles.
Verified against both states: FAILS on a657849 with exactly the 4 real defects
and no false positives, PASSES on the #141 fix.
Worth making a required status check on both feed branches. Unlike a branch
restriction it catches a bad write however it arrives -- branch merge, hand
edit, or a broken generator run.
Co-Authored-By: Claude Opus 5 (1M context) <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.
Note
This PR's own check is red on purpose right now. It is detecting the live production defect that #141 fixes. Merge #141, and this goes green. That red run is the demonstration.
Description
The feed is a set of claims about published artifacts, and nothing checked them.
Yesterday a merge of
updates-test.simplerisk.cominto this branch replaced the GA bundle checksums with the testing channel's, and added upgrade hops through releases that never shipped. Nothing here went red. The break surfaced hours later insimplerisk/docker, whose image build verifies the bundle against this feed and fails closed — blocking every PR in that repo, with an error that reads like a permissions problem (S3 returns 403, not 404, for a missing object).This asserts the claims against the channel the branch describes:
DOCTYPEcould only ever be an entity-expansion attack on the runnerCurrent_Versionnames a release that exists and publishes a checksumbundle_sha256has a bundle actually fetchable on this channel, hashing to exactly that valueupgrade_pathroutes only to releases that exist, and agrees with each release'snext_releaseWhy "entries making a claim" and not "all entries"
I built the broader version first and it produced 113 errors — firing on every historical release back to 2013, because a channel serves only what it currently needs and old bundles are long gone. That is correct and unremarkable, not a defect.
Publishing a
bundle_sha256is what turns an entry into a checkable claim. That's the trigger. Only 2 of 111 entries qualify today, so this downloads two bundles, not a hundred.The current release gets one extra check — it must have a checksum — since it's the one consumers actually download. An unverifiable current release is a defect; an unverifiable 2015 release isn't.
Verified against both states
Against
a657849e(the broken feed): fails with exactly the 4 real defects, no false positives.Against the #141 fix: passes.
Make it required
Worth setting
Validate feed against its channelas a required status check on both feed branches.This is deliberately a validation gate rather than a branch restriction. GitHub has no rule that rejects a merge by source branch — so a "never merge test into prod" rule isn't expressible. A gate that checks the resulting content catches a bad write however it arrives: branch merge, hand edit, or a broken generator run.
Release Notes
None — internal change.
Manual Validation Steps
updates-test.simplerisk.com, confirm the channel resolves totestand bundles are checked againstbundles-test.simplerisk.com(it reads the base ref, since a topic branch name says nothing about which channel it lands on).Type of Change
Testing Results
actionlintclean. Script is dependency-free stdlib Python — runners ship nodefusedxml, hence the DTD rejection instead.testchannel path against a real testing feed. The logic is shared; only the base URL differs. Step 3 covers it on the first test-branch PR.CIA Impact Check
WILL NOT negatively impact Confidentiality, Integrity or Availability.
Adds a read-only check. It downloads published bundles over HTTPS and compares hashes; it writes nothing, holds no credentials, and needs only
contents: read. Net positive on Integrity — it is the control that would have caught the current production defect at PR time instead of hours later in another repo.