Repository navigation
Conversation
mrxlolcat
force-pushed
the
fix/npm-subcommand-allowlist
branch
from
June 3, 2026 05:57
5a95e59 to
5280f85
Compare
rahmanhsim
approved these changes
Jun 3, 2026
rahmanhsim
left a comment
There was a problem hiding this comment.
LGTM. Allowlist is the right call for module install commands — narrows the npm attack surface to just install/ci.
rahmanhsim
approved these changes
Sep 28, 2026
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.
Spark Compete Packet
{ "schema": "spark-compete-hotfix-v1", "event": "spark-compete-first-event", "submission_mode": "public_repo_pr", "team": { "name": "lolcat", "members": [ "mrxlolcat", "ouwibo", "rahmanhsim" ], "llm_device_holder": "mrxlolcat", "device_holder_github": "https://github.com/mrxlolcat", "github_accounts": [ "mrxlolcat", "ouwibo", "rahmanhsim" ] }, "target_repo": { "id": "vibeforge1111/spark-cli", "source": "https://github.com/vibeforge1111/spark-cli", "owner_surface": "spark-cli" }, "evidence": { "safe_links_only": true, "forbidden": [ "pdf", "zip", "exe", "unknown downloads", "shortened links", "archives", "binaries", "tokens", "browser cookies", "wallet material", "raw logs", "raw conversations", "raw memory", "raw patches", "private repo maps", "private scoring details" ], "before_after_proof": "Before: npm_runtime_command_argv() passes npm run arbitrary through. After: raises SystemExit('npm subcommand not allowed: run. Allowed: install, ci') for any subcommand not in the allowlist.", "links": [ "https://github.com/vibeforge1111/spark-cli/pull/779" ] }, "submission_target_url": "https://github.com/vibeforge1111/spark-cli/pull/779", "issue": { "type": "security_concern", "severity": "high", "title": "npm_runtime_command_argv() passes arbitrary npm subcommands through module install commands", "actual_behavior": "npm_runtime_command_argv() accepts any npm subcommand, allowing npm run, npm publish, npm exec, etc. to pass through in module install commands. Only install and ci should be permitted.", "expected_behavior": "npm_runtime_command_argv() must enforce an allowlist (install, ci) and raise SystemExit with a clear message for any disallowed subcommand.", "repro_steps": [ "Craft a module install command using npm run <script> as the runtime command.", "Observe the command accepted without error.", "Expected: SystemExit raised with a message naming the disallowed subcommand." ], "affected_workflow": "spark module install / npm runtime command validation" }, "proposed_fix": { "approach": "Add an allowlist (install, ci) in runtime_policy.py and raise SystemExit with a clear diagnostic for any npm subcommand outside that list.", "files_expected": [ "src/spark_cli/runtime_policy.py" ], "tests_or_smoke": "python3 -c \"from spark_cli.runtime_policy import npm_runtime_command_argv; npm_runtime_command_argv(['npm','run','evil'])\" \u2014 must raise SystemExit." }, "pr": { "branch": "fix/npm-subcommand-allowlist", "title_prefix": "[spark-compete]", "author_github": "mrxlolcat", "body_must_include": [ "packet", "team", "pr_author", "repo", "actual_behavior", "expected_behavior", "repro_steps", "before_after_proof", "tests_or_smoke", "duplicate_notes", "risk_notes", "review_claim" ], "url": "https://github.com/vibeforge1111/spark-cli/pull/779" }, "review_claim": { "impact_claim": "high", "evidence_types": [ "redacted_terminal_excerpt", "passing_test" ], "duplicate_notes": "Checked all open PRs on vibeforge1111/spark-cli. No existing PR adds an allowlist to npm_runtime_command_argv.", "risk_notes": "Only src/spark_cli/runtime_policy.py modified. No CI, dependency, installer, or auth changes. Allowlist is npm install/ci only \u2014 tightens scope, no existing valid install flow is broken.", "review_state_requested": "pr_review" } }