T08 · Insecure Dependencies
- Location
SKILL.md:188- Finding
Unpinned Promptfoo CLI Execution Through a Mutable npm Tag
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 188–190, 198, 206–210, 218–221, 254–256, 262, and 291–308
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumThe skill repeatedly recommends executing Promptfoo through
npxusing the mutable@latestnpm tag.bash # Lines 188–190 npx promptfoo@latest init --example getting-started npx promptfoo@latest init --example eval-rag npx promptfoo@latest init --example compare-openai-models # Line 198 npx promptfoo@latest validate # Lines 206–210 npx promptfoo@latest eval npx promptfoo@latest eval --filter-first-n 5 npx promptfoo@latest eval --filter-pattern "refund|billing" npx promptfoo@latest eval --filter-providers "openai|anthropic" npx promptfoo@latest eval --max-concurrency 4 # Lines 218–221 npx promptfoo@latest view npx promptfoo@latest list evals npx promptfoo@latest show <eval-id> npx promptfoo@latest logs # Lines 254–256 npx promptfoo@latest redteam setup npx promptfoo@latest redteam run npx promptfoo@latest redteam report # Line 262 npx promptfoo@latest redteam init --no-gui # Lines 291–308 npx promptfoo@latest init npx promptfoo@latest init --example getting-started npx promptfoo@latest init --example eval-rag npx promptfoo@latest init --example compare-openai-models npx promptfoo@latest validate npx promptfoo@latest eval npx promptfoo@latest eval --resume npx promptfoo@latest eval --retry-errors npx promptfoo@latest list evals npx promptfoo@latest show <eval-id> npx promptfoo@latest logs npx promptfoo@latest view npx promptfoo@latest generate dataset npx promptfoo@latest generate assertions npx promptfoo@latest redteam setup npx promptfoo@latest redteam run npx promptfoo@latest redteam report npx promptfoo@latest mcp --transport stdioTechnical Analysis
npxcan download and execute an npm package when the requested package is not alread ...[truncated 2133 chars]- Remediation
View remediation
Remediation Suggestions
- Replace every
promptfoo@latestreference with an exact, reviewed version, such aspromptfoo@X.Y.Z. - Prefer declaring Promptfoo as a project development dependency and committing the corresponding lockfile:
bash npm install --save-dev --save-exact promptfoo@X.Y.Z npx promptfoo validate - In automated environments, use
npm ciwith a committed lockfile rather than resolving dependencies dynamically. - Configure CI to reject unexpected lockfile changes and require dependency-review approval for Promptfoo upgrades.
- Use a trusted npm registry or controlled registry mirror and retain package integrity metadata.
- Run the CLI with least privilege in a restricted workspace or container. Expose only the credentials, files, and network destinations required for the specific evaluation.
- Disable npm lifecycle scripts during installation where operationally compatible, or review required lifecycle behavior before enabling it.
- Establish a documented update process that reviews release notes, package provenance, integrity information, and dependency changes before changing the pinned version.
- Replace every
