Skip to content

fix(npm): add 15 missing npm subcommands to prevent incorrect run injection (fixes #2663)#2677

Open
jlaportebot wants to merge 2 commits into
rtk-ai:developfrom
jlaportebot:develop
Open

fix(npm): add 15 missing npm subcommands to prevent incorrect run injection (fixes #2663)#2677
jlaportebot wants to merge 2 commits into
rtk-ai:developfrom
jlaportebot:develop

Conversation

@jlaportebot

Copy link
Copy Markdown

Fixes #2663

Changes

Added 15 missing official npm subcommands to constant in :

Subcommand Purpose
completion Shell tab-completion script
edit Open package folder in editor
explore Browse installed package
find-dupes Find duplicate packages
help-search Search npm help documentation
hook Manage registry webhooks
install-ci-test Install + ci + test
install-test Install + test
ll Verbose ls
org Manage orgs
query Dependency selector queries
run-script Canonical name for run
sbom Generate software bill of materials
shrinkwrap Lock down dependency versions
unstar Remove star from a package

Testing

  • All existing tests pass (
    running 1 test
    test cmds::js::npm_cmd::tests::test_npm_subcommand_routing ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2244 filtered out; finished in 0.00s

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 4 filtered out; finished in 0.00s

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 10 filtered out; finished in 0.00s

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 6 filtered out; finished in 0.00s

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 14 filtered out; finished in 0.00s

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 5 filtered out; finished in 0.00s

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 11 filtered out; finished in 0.00s)

  • The fix is verified by the shared constant test that iterates over

Impact

Users can now run , , , etc. without incorrect run injection.

@jlaportebot

Copy link
Copy Markdown
Author

All CI checks passing (CLA signed, check-target skipped). PR ready for merge.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: npm query, npm sbom, and 13 other subcommands get incorrect run injection

1 participant