fix(pins): read action definitions from the raw host, not the contents API - #180
Merged
Conversation
…s API With the graph walk corrected, the first real sweep still failed on two of forty-three pins -- aquasecurity/trivy-action and bridgecrewio/checkov-action -- with a plain 403 that was not a rate limit. Both serve normally to a personal token and to no token at all. The difference is the credential. Actions' GITHUB_TOKEN is an installation token scoped to this repository, and those two repositories refuse it for cross-repository content while forty-one others do not. The check could therefore never complete in the very job that owns it. raw.githubusercontent.com serves all of them at the exact pinned commit with no credential, and the host was already in the sweep's egress allow-list. The check now needs no token at all, which also removes the 60-requests-an-hour ceiling that made a token necessary to begin with -- it can no longer be throttled into reporting a third party as broken. A private action would 404 here and be reported as having no definition. That is correct for a tree pinning only public actions, and it fails visibly. catalog/validation-tiers.yml records the swap; api.github.com stays for anchor-contexts reading the live ruleset.
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.
Follow-up to #179, found by running the sweep it fixed.
What the corrected walk still could not do
With the graph walk fixed, the sweep still failed — but now with an honest message:
after 1 attempt(s)is the tell: the new rate-limit classifier correctly declined toretry, because this is not throttling. Two of forty-three pins, consistently.
Both repositories are public, not archived, not disabled, and both serve fine:
repos/…/contents/action.ymlGITHUB_TOKENThe difference is the credential. Actions'
GITHUB_TOKENis an installation tokenscoped to this repository; those two repositories refuse it for cross-repository
content reads while forty-one others do not. The check could never complete in the
job that owns it — and that was invisible until the sweep first ran.
Fix
raw.githubusercontent.comserves every definition at the exact pinned commit withno credential, and the host was already in the sweep's egress allow-list:
(The
action.yml/action.yamlsplit is real and already handled by the existingcandidate logic.)
So the check now needs no token. That also removes the 60-requests-an-hour
unauthenticated ceiling that made a token necessary in the first place, so it can no
longer be throttled into reporting a third party as broken.
Honest limit
A private action would 404 here and be reported as having no definition. That is
correct for a tree that pins only public actions, and it is a visible failure rather
than a silent pass. Stated rather than discovered later.
Contract
catalog/validation-tiers.ymlrecords the swap:transitive-action-pinsnow needsnetwork:raw.githubusercontent.comand nothing else.api.github.comstays foranchor-contexts, which reads the live ruleset.Removing the host from the allow-list is caught:
Verification
validate_all— all tiers OK;--tier schedulednow passes without any tokenexcept
anchor-contexts, which legitimately needs oneactionlint— clean