T08 · Insecure Dependencies
- Location
instructions.txt:9- Finding
Unpinned Third-Party Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
instructions.txt, lines 9-12
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
text - Request permission to run 'npx devvit whoami' and 'npx devvit version'. - If version is < 0.12.11, ADVISE the user to run 'npm install -g devvit@latest' manually. Do not run it automatically. - Suggest running 'npx devvit update app' and wait for user approval. - Request permission to run 'npx tsc --noEmit' for type checking.Technical Analysis
The skill instructs the agent to execute
devvitandtscthroughnpxwithout requiring project-local, lockfile-pinned package versions. If a requested executable is not installed locally,npxmay retrieve a package from the npm registry and execute it immediately.User approval reduces the likelihood of unexpected execution but does not verify package provenance, version, or integrity. The effective code executed by these commands can therefore differ from the code reviewed with the skill. Additionally,
npx devvit whoamimay access existing Devvit authentication state, whilenpx devvit update appmay modify project files.The suggested global installation uses the mutable
latesttag. Although the skill explicitly says not to run this command automatically, following that recommendation manually would still install an unpinned package globally.Attack Path
- A user invokes the Devvit Publishing Auditor.
- The skill requests approval to run one of the unpinned
npxcommands. - The user approves the command.
- The requested executable is missing from the local project or resolves to an unexpected package version.
npxdownloads package content from the npm registry.- Package installation hooks or executable code run with the current user's privileges.
- A compromised or malicious dependency can read project files and accessible credentials, alter the project, or execute additional system commands.
T ...[truncated 828 chars]
- Remediation
View remediation
Remediation Suggestions
- Install reviewed versions of
devvitand TypeScript as project-local development dependencies and pin them throughpackage.jsonand a committed lockfile. - Invoke only locally installed binaries, for example:
bash npx --no-install devvit whoami npx --no-install devvit version npx --no-install devvit update app npx --no-install tsc --noEmit - Replace the mutable global-installation recommendation with an exact, reviewed version. Prefer local installation over global installation.
- Use reproducible installation commands such as
npm ci, with lockfile integrity metadata preserved and reviewed. - Clearly identify
whoamias a command that may access authentication state andupdate appas a command that may modify project files. - Require separate, explicit approval for state-changing operations rather than grouping them with read-only environment checks.
- Install reviewed versions of
