Disable uv caching for stubsabot - #16335
Merged
Merged
Conversation
AlexWaygood
marked this pull request as ready for review
September 1, 2026 11:35
srittau
approved these changes
Sep 1, 2026
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.
Stubsabot and the regression-test job currently use the same uv cache key. GitHub shares caches between workflows on the same branch, so stubsabot's scheduled runs on
maincan restore caches populated by test runs onmain. The test jobs'contents: readpermission does not prevent them from saving caches.This creates a potential privilege-escalation path:
maincan execute the attacker's code without a malicious change being merged into typeshed.main.GITHUB_TOKENwithpull-requests: writeavailable. The attacker could steal those credentials, push commits wherever the SSH key is authorized, and create or modify PRs. Whether this permits a direct push tomaindepends on the key's permissions and branch protections; it does not inherently bypass those protections.The prerequisite is code execution in a job that can populate
main's cache scope. An ordinary fork PR cannot write to that scope: its caches are isolated under the PR's merge ref. See GitHub's cache access and security documentation.This PR disables uv cache restoration and saving for stubsabot, removing this route from test jobs into the more privileged bot while leaving test-job caching unchanged.
Created with Codex.