You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mcp-security-audit): check pinning for uvx, uv tool run, and pipx run 🤖🤖🤖 - #5860
My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
The file follows the required naming convention.
The content is clearly structured and follows the example format.
I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
I have run npm start and verified that README.md is up to date.
I am targeting the main branch for this pull request.
Description
Check 3 of mcp-security-audit (dependency pinning) recognizes the JavaScript package runners added in #3852. Many Python MCP servers are documented with uvx (for example "command": "uvx", "args": ["mcp-server-fetch"]), and those entries currently fall through to the generic "could not be classified statically" INFO finding. That is safe, but it means a bare uvx my-mcp-server and a pinned uvx --from my-mcp-server==2.1.0 my-mcp-server get the same result.
This change teaches the extractor three Python launchers:
uvx and uv tool run: the positional requirement, or the --from requirement when present
pipx run: the positional app, or the --spec requirement when present
Python runners use their own flag sets. For uvx, -p means --python, so it is not read as a package selector; any flag the extractor does not know still returns the manual-review INFO result, as before. Python requirement parsing (==, >=, extras) only applies to these launchers, so JavaScript runner results do not change.
Version handling: pkg==1.2.0 and pkg[extra]==1.0rc1 count as exact, pkg@1.2.0 (uvx syntax) goes through the existing semver check, bare names and @latest are MEDIUM, and ranges such as >=1.0, ~=1.2 or ==1.* are LOW. Wording, severities and the "pin what you actually reviewed" guidance are unchanged. I also added uvx/pipx lines to the good/review examples and the skill description.
Git, URL, and local path sources (git+https://...@v1.0.0, pkg @ https://..., ./pkg) return the manual-review INFO result, since a tag or file can change behind an exact-looking ref. --with extra requirements and uv run (project-local, not a package runner) also stay on manual review. Exact pins written as uvx pkg@1.2 or with a local version (==1.0+local) are reported as LOW, which errs on the cautious side.
Type of Contribution
Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
Additional Notes
Validation:
npm run skill:validate: all skills valid
npm start: regenerated docs/README.skills.md; only the mcp-security-audit description line changed
git diff --check: clean
I ran the Check 3 code block from the file against hand-written cases for each launcher (bare, @latest, @x.y.z, --from/--spec with ==, ranges, extras, wildcards, git tags, local paths, uvx -p 3.12, uv run, pipx install). Before this change every uvx / uv tool run / pipx run case returned INFO; after it they return the results described above.
To check that JavaScript behaviour is unchanged, I compared the old and new code block over every combination of the JavaScript runners plus node/python/docker, a set of selectors (including odd ones like a==1.0.0 and git URLs), and several flag shapes. The results were identical.
I have not run the skill through Copilot itself; the test was the Python code in the skill.
The code change and the test cases were drafted with an AI assistant; I reviewed the diff and re-ran the cases locally.
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.
The extractor reviews every explicit `--package` / `-p` selector for JavaScript runners, and every `--from` (`uvx`, `uv tool run`) or `--spec` (`pipx run`) requirement for Python r
This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.
Risk tier:merge-risk:medium — New or substantially changed resource without privileged execution Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access.
✓ [spec-compliance] All 1 skill(s) are spec-compliant.
ℹ️
✓ spec-compliance: All spec checks passed.
ℹ️
✓ [valid-refs] All file references across 1 skill(s) are valid.
ℹ️
✓ valid-refs: All file references resolve to existing files within the skill directory.
ℹ️
1 skill(s) linted, 1 passed
Full linter output
### Linting skills/mcp-security-audit
✅ mcp-security-audit (2/2 checks passed)
✓ [spec-compliance] All 1 skill(s) are spec-compliant.
✓ spec-compliance: All spec checks passed.
✓ [valid-refs] All file references across 1 skill(s) are valid.
✓ valid-refs: All file references resolve to existing files within the skill directory.
1 skill(s) linted, 1 passed
The reason will be displayed to describe this comment to others. Learn more.
Thanks—this is a useful, focused extension of the MCP pinning audit. The distinction between uvx -p and package selectors, plus the conservative handling of unsupported Python source forms, adds actionable coverage without changing the existing JavaScript behavior.
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
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.
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.mainbranch for this pull request.Description
Check 3 of
mcp-security-audit(dependency pinning) recognizes the JavaScript package runners added in #3852. Many Python MCP servers are documented withuvx(for example"command": "uvx", "args": ["mcp-server-fetch"]), and those entries currently fall through to the generic "could not be classified statically" INFO finding. That is safe, but it means a bareuvx my-mcp-serverand a pinneduvx --from my-mcp-server==2.1.0 my-mcp-serverget the same result.This change teaches the extractor three Python launchers:
uvxanduv tool run: the positional requirement, or the--fromrequirement when presentpipx run: the positional app, or the--specrequirement when presentPython runners use their own flag sets. For
uvx,-pmeans--python, so it is not read as a package selector; any flag the extractor does not know still returns the manual-review INFO result, as before. Python requirement parsing (==,>=, extras) only applies to these launchers, so JavaScript runner results do not change.Version handling:
pkg==1.2.0andpkg[extra]==1.0rc1count as exact,pkg@1.2.0(uvx syntax) goes through the existing semver check, bare names and@latestare MEDIUM, and ranges such as>=1.0,~=1.2or==1.*are LOW. Wording, severities and the "pin what you actually reviewed" guidance are unchanged. I also added uvx/pipx lines to the good/review examples and the skill description.Git, URL, and local path sources (
git+https://...@v1.0.0,pkg @ https://...,./pkg) return the manual-review INFO result, since a tag or file can change behind an exact-looking ref.--withextra requirements anduv run(project-local, not a package runner) also stay on manual review. Exact pins written asuvx pkg@1.2or with a local version (==1.0+local) are reported as LOW, which errs on the cautious side.Type of Contribution
Additional Notes
Validation:
npm run skill:validate: all skills validnpm start: regenerateddocs/README.skills.md; only the mcp-security-audit description line changedgit diff --check: clean@latest,@x.y.z,--from/--specwith==, ranges, extras, wildcards, git tags, local paths,uvx -p 3.12,uv run,pipx install). Before this change every uvx / uv tool run / pipx run case returned INFO; after it they return the results described above.node/python/docker, a set of selectors (including odd ones likea==1.0.0and git URLs), and several flag shapes. The results were identical.I have not run the skill through Copilot itself; the test was the Python code in the skill.
The code change and the test cases were drafted with an AI assistant; I reviewed the diff and re-ran the cases locally.
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.