Repository navigation
fix(mcp): read the uvx --from and pipx --spec requirement as the package - #35
Merged
Merged
Conversation
`uvx --from pkg==1.2 tool` was recorded as package `tool`, unpinned: the `--from` value was skipped as a flag value and the command name read as the package. A different package behind a familiar command name was therefore invisible, and a version bump behind `--from` scored `medium` (changed arguments) instead of `high` in policy.mcp-server-identity-change. The `--from` (uvx) or `--spec` (pipx run) requirement, when it comes before the command, is now the package. `===` pins and Git sources with a revision are read as pinned. The requirement itself is no longer redacted as a KEY=value argument (`pkg==1.2` was shown as `pkg=<redacted>`); other KEY=value arguments still are. Signed-off-by: controlloop-security <344908699+controlloop-security@users.noreply.github.com>
controlloop-security
force-pushed
the
fix-uvx-from-pin
branch
from
October 30, 2026 22:57
4b7aea6 to
f534d7a
Compare
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.
Summary
An MCP server launched as
uvx --from pkg==1.2 toolwas recorded aspackage
tool, unpinned: the--fromvalue was skipped as a flag valueand the command name was read as the package. So a different package
behind a familiar command name was invisible (
uvx --from other-pkg==1.0 controlloopreportedcontrolloop), and a version bump behind--fromscored
medium(changed arguments) instead ofhighinpolicy.mcp-server-identity-change.--from(uvx) or--spec(pipx run) requirement, when it comesbefore the command, is now the package. After the command it belongs to
the tool and is ignored.
===pins and Git sources with a revision (git+https://host/repo@v1.2)count as pinned; the
@ingit+ssh://git@host/...does not.KEY=valueargument (
pkg==1.2was shown aspkg=<redacted>). Every otherKEY=valueargument still is, includingTOKEN==secret.Testing
tests/adapters/test_mcp_identity.py: 14 new parser cases and 4redaction cases. One existing case changes on purpose:
--from git+x toolnow records packagegit+x, nottool.tests/policy/rules/test_mcp_server_identity_change.py: a version bumpand a swapped package behind
uvx --fromarehigh. Both tests fail onthe previous code (
medium).ruff format --check,ruff check,mypy, fullpytest.