T09 · Insecure Skill Coding Practices
- Location
scripts/create_pr.js:39- Finding
Shell Command Injection in Pull Request Creation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This GitHub PR automation skill is purpose-related but unsafe because its scripts run shell commands with unvalidated user input while using an authenticated GitHub CLI session.
Install only if you are comfortable reviewing and fixing the scripts first. In particular, replace shell-string execSync calls with argument-array execution, validate PR numbers and branch/template/label inputs, and use least-privileged GitHub credentials. Treat the advertised auto-merge, approval, batch, and metrics features as unsupported by this artifact.
scripts/create_pr.js:39Shell Command Injection in Pull Request Creation
scripts/monitor_pr.js:20Shell Command Injection Through Pull Request Number
The code only covers a narrow subset of the declared functionality: PR creation with optional template usage and simple labeling automation. It does not implement review, approval, merging, monitoring of PR or CI status, batch processing, or metrics collection. The description significantly overstates the implemented behavior, so the declared purpose does not accurately represent what this code chunk actually does.
Referenced artifact was not completely inspected
node scripts/monitor_pr.js --pr 123
The skill advertises and demonstrates network-capable GitHub operations via the gh CLI and Node scripts, but it does not declare any explicit tool scope, permissions, or allowed-tools boundary. That makes the skill harder to constrain at runtime and increases the chance of unintended repository access or outbound actions beyond what a user expects.
The invocation guidance is very broad and could cause the skill to be selected for many common PR-related requests, including ones involving sensitive repository modifications. Over-broad routing increases the likelihood that powerful automation is invoked when a narrower, safer skill or manual review would be more appropriate.
The skill promotes auto-merge and approval automation without any warning, gating, or human confirmation language, even though these actions can directly change repository state and ship code. In a GitHub automation context, silent approval or merge workflows can bypass review intent, merge unsafe changes, or amplify mistakes across many PRs.
The manifest describes GitHub pull request workflow automation, which reasonably implies interacting with GitHub APIs or tooling, but this implementation does so by spawning local shell commands through child_process.execSync. That adds local command-execution capability, including dependence on the host shell environment, beyond what is semantically necessary for PR management itself.
The script interpolates the user-controlled prNumber directly into a shell command passed to execSync, which invokes a shell. An attacker can supply shell metacharacters such as ;, &&, or command substitution to execute arbitrary commands on the host running the script, not just query a PR.
Detected: suspicious.dangerous_exec