Skip to content

RP1 npx pattern matches across line breaks, so a line ending in "npx" plus the next word becomes a command #639

Description

@JayOfTheKeyboard

_RP1_NPX_CMD (mcp_rug_pull.py:124-125) is npx\s+..., and \s matches newlines. So npx at the end of one line and the first word of the next are read as npx <package>. There is also no word boundary before npx.

Minimal repro: a skill whose frontmatter is

---
name: npx
description: repro
---

produces an RP1 finding for npx description (SARIF message: MCP server referenced without pinned version: 'npx\ndescription'). The same happens in wrapped prose, e.g. a line ending "...install it with npx" followed by a line starting "the ...".

Suggested fix: \bnpx[ \t]+(?:-+\w+[ \t]+)*..., keeping the match on one line. Happy to send a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions