fix(agent-admission): reject unsafe uv index strategies - #400
Merged
seonghobae merged 13 commits intoSep 13, 2026
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seonghobae
marked this pull request as ready for review
September 13, 2026 07:16
This was referenced Sep 13, 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.
Child of #129 for #399, serialized from exact parent
38844f847e97c76cbe549f0b6cda0a4f05e28f44.Hosted semantic RED
Initial test-only exact head
53a9c437a3c81621167216924d67891e5d7f13c9kept production source byte-identical to the parent. CI run34743380738, rust job103686767497, failed only in the new uv index-strategy contract after the pre-existing workspace tests passed. The causal failures were:--index-strategy=unsafe-best-matchreturnedAllowinstead ofBlock;--index-strategy unsafe-best-matchblocked only asArtifactNotApprovedand omittedAlternateTrustRoot;unsafe-first-matchlikewise lacked the required trust-boundary classification.Controls stayed GREEN: the default strategy and explicit
first-indexremained admissible; near-spelling and delegateduv runchild argv did not fabricate uv trust authority.Fresh review of the first repair then found a second parser-phase evidence defect. The repair's private fixed-position
uv pip installmatcher duplicated older grammar and did not adopt the parent lineage's shareduv_active_command_indexparser. Astral permits reviewed top-level uv options before the active command, souv --color never pip install ... --index-strategy=unsafe-best-matchremained fail-closed asForbiddenCommandbut lost its separate causalAlternateTrustRootevidence.Second test-only exact
98b8043378a8de7d08a030db8c783674564403e6kept production source unchanged from the preceding repair. Hosted CI34744340082, rust job103689338735, reached the new hostile contract after formatting and failed exactly because the global-option case returned[ForbiddenCommand]withoutAlternateTrustRoot. Seven sibling index-strategy controls passed.Minimum causal repair
Final exact head
3b0e82e7d0c812ab8fb192e9cdc600cbff753752keeps the normalizer bounded to the already-supported directuv pip installgrammar, but makes causal unsafe-strategy attribution reusepolicy::uv_active_command_index. It requires exact activepipfollowed by exactinstalland inspects only that install argument slice. This preserves evidence through reviewed top-level uv options without wideningsupported_install_command, whileuv rundelegated child argv and non-install commands remain outside this authority.The Wardnet-owned
uv_index_strategy_authorityrecognizes only Astral's documentedfirst-index,unsafe-first-match, andunsafe-best-matchvalues; normalizes documented separate-value grammar so the value is not misclassified as a package operand; and classifies only the twounsafe-*strategies asAlternateTrustRoot. It does not inspect ambient uv config/environment, resolve/fetch packages, perform DNS/TLS/network I/O, or copy runtime/egress/static-analysis owner behavior.docs/doctoring/uv-index-strategy-authority.mdrecords the parser-phase boundary and Astral references retrieved 2026-09-13.Exact-head GREEN
On unchanged exact
3b0e82e7d0c812ab8fb192e9cdc600cbff753752:34744514640— SUCCESS;34744514655— SUCCESS;Fresh parent remains exact
38844f847e97c76cbe549f0b6cda0a4f05e28f44, so no restack is required before normal expected-head integration.Authoritative vendor basis:
No force update, destructive rebase, self/model approval, gate weakening, mutable foreign dependency, or bypass.