T08 · Insecure Dependencies
- Location
scripts/generate-and-validate.sh:14- Finding
Unpinned npm Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
scripts/generate-and-validate.sh, lines 14–20
Vulnerability Type: Unpinned third-party executable dependency
Risk Level: Mediumbash npx --yes pageskim "${ARGS[@]}" STATUS=0 while IFS= read -r -d '' page; do sibling="${page%.*}.llm.md" if [[ -f "$sibling" ]]; then if ! npx --yes pageskim validate "$page" "$sibling"; thenThe same unpinned
npx pageskimexecution pattern is also recommended inSKILL.mdat lines 18–19, 41, 57, 65, 85, and 87.Technical Analysis
The script invokes
pageskimthroughnpx --yeswithout specifying an exact package version, committed lockfile, or integrity constraint. If the package is not already available locally,npxmay download the currently resolved release from the configured npm registry. The--yesoption automatically approves installation.Consequently, the code executed during a future Skill invocation is not limited to the version reviewed during this audit. A compromised npm package, maintainer account, registry response, or malicious future release could introduce arbitrary lifecycle or CLI code.
Attack Path
- An attacker compromises the
pageskimpackage, its publisher account, or its distribution path. - The attacker publishes a malicious version that still resolves under the unversioned package name.
- A user or CI runner invokes
scripts/generate-and-validate.sh. npx --yes pageskimretrieves and executes the malicious package without an interactive approval step.- The payload executes with the permissions and environment of the invoking user or CI runner.
- The payload can access data available to that process, potentially including repository files, build artifacts, environment variables, and CI credentials.
Impact Assessment
Successful exploitation permits arbitrary code execution within the invoking process's security context. On a developer workstation, th ...[truncated 344 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
pageskimto a reviewed, exact version rather than resolving the latest compatible release. - Declare the dependency in
package.jsonand commit the generated lockfile. - Install dependencies using
npm ci, then invoke the lockfile-controlled local executable, for example through an npm script ornpx --no-install pageskim. - Review package lifecycle scripts before approving dependency updates.
- Enable npm provenance, integrity, and registry-policy checks where supported.
- Use automated dependency updates only when each update is reviewed and tested before merging.
- Avoid
--yesfor ad hoc remote package execution where interactive confirmation is practical.
- Pin
