SkillSpector icon indicating copy to clipboard operation
SkillSpector copied to clipboard

RP1 accepts unrelated version pins and misidentifies package/image names

Open Spectorian opened this issue 2 months ago • 1 comments

Reproduction

Direct RP1 detector probes show three related operand-association problems:

Scanner input Observed behavior
npx evil-package Unpinned-package warning
npx evil-package --label [email protected] The unrelated argument suppresses that warning
npx [email protected] No unpinned-package warning, as expected for this check
Test component addition when npx is not found. Prose is interpreted as a package command
docker run --rm -e A my-image@sha256:abcdef --rm is treated as the image

These strings were scanned as data, not executed. The package name and abbreviated digest are synthetic; the digest example demonstrates operand extraction, not a valid or trusted image.

Expected behavior

The executable package's own version is what matters to the pin check. An unrelated argument or neighboring command must not satisfy it. Findings should name the actual package/image rather than a flag or prose fragment. Keep genuine mutable or ambiguous execution visible.

Related work

#639 and PR #646 cover npx word/line boundaries and YAML forms. The unrelated-argument pin bypass, same-line prose and Docker image cases remain outside that fix.

Relevant code

mcp_rug_pull.py:125.

Spectorian avatar Sep 29 '26 00:09 Spectorian

Resolution verified: PR #683 has merged. RP1 now accepts a version pin only when attached to the relevant package/image operand rather than an unrelated argument. The MCP rug-pull regressions pass on current main. This issue was automatically closed by the merge.

rng1995 avatar Oct 04 '26 10:10 rng1995