Repository navigation
Conversation
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.
{ "schema": "spark-compete-pr-v1", "event": "spark-compete", "submission_mode": "pr_review", "submission_target_url": "https://github.com/vibeforge1111/spark-cli/pull/1104", "team": { "name": "ARC DEBUG TEAM", "members": ["Aeyod7", "Shady-web", "AlgofootPrint"], "author": "Aeyod7" }, "target_repo": "vibeforge1111/spark-cli", "issue": { "title": "Package runner commands bypass approval classification", "type": "security_approval_bypass", "severity": "high" }, "evidence": { "actual_behavior": "npx, npm exec, pnpm dlx, and yarn dlx commands were classified as action=none, risk=none, requires_approval=false before this patch.", "expected_behavior": "Remote package runners should require approval because they can download and execute package code.", "tests": [ "PYTHONPATH=src python3 -m pytest tests/test_cli.py -q -k 'package_runner or remote_script_execution or approval_enforcement_covers_publish_deploy_and_privileged_actions'", "PYTHONPATH=src python3 -m pytest tests/test_cli.py -q", "PYTHONPATH=src python3 -m compileall -q src tests", "git diff --check" ] }, "proposed_fix": "Classify npx, npm exec, pnpm dlx, and yarn dlx as critical remote_code_execution actions and add regression coverage.", "pr": { "url": "https://github.com/vibeforge1111/spark-cli/pull/1104", "branch": "Aeyod7:hunt/package-runner-approval" }, "review_claim": { "status": "ready_for_review", "duplicate_check": "Searched open PRs for npx, npm exec, pnpm dlx, yarn dlx, remote package execution, and package runner; no matching generic package-runner approval fix found. Nearby PRs #153, #490, and #779 cover different paths." } }actual_behavior
The approval classifier treated remote JavaScript package runners as harmless. Before the fix, these commands returned
action_class=none,risk=none, andrequires_approval=false:npx --yes cowsay@latest hellonpm exec --yes cowsay@latest -- hellopnpm dlx cowsay@latest helloyarn dlx cowsay@latest helloThese commands can download package code and execute it without going through the existing remote-code approval gate.
expected_behavior
Package-runner commands that can fetch and execute code should require approval, matching the intent of the existing remote-code execution classifier for forms like
curl ... | bash.repro_steps
On
origin/master, run:before_after_proof
Before:
After this patch, the new regression test asserts each command requires approval as
remote_code_execution,critical, andblockedin non-interactive hosted mode.tests_or_smoke
duplicate_notes
Open PR search checked:
npx: nearby PRs [spark-compete] Flag Prisma migration deploys in approval #153 and [spark-compete] fix(security): gate shell -c and PowerShell inline code #490, but they cover Prisma migration and shell/PowerShell inline-code gating, not generic package runners.npm exec: nearby PR [spark-compete] fix(security): restrict npm in module install commands to install/ci only #779 restricts install-command runtime policy, not this approval classifier gap.pnpm dlx: no open PRs found.yarn dlx: no open PRs found.remote package execution: no open PRs found.package runner: no open PRs found.risk_notes
The change is intentionally narrow: it only adds approval gating for common package-runner execution entrypoints and adds regression coverage. It does not alter package install, publish, or general npm/pnpm/yarn behavior outside these runner forms.
review_claim
Ready for maintainer review. The patch is minimal, has focused and broader verification, and avoids duplicate lanes identified in the open PR preflight.