T08 · Insecure Dependencies
- Location
rules/setup-and-configuration.md:18- Finding
Unpinned npm Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Locations:
rules/setup-and-configuration.md, lines 18-20rules/rendering-workflows.md, line 77
Vulnerability Type: T08: Insecure Dependencies
Risk Level: MediumVulnerable code snippets:
From
rules/setup-and-configuration.md, lines 18-20:bash npx --yes snipgrapher doctorFrom
rules/rendering-workflows.md, line 77:text 5. If `snipgrapher` is unavailable, fall back to npm (`npx --yes snipgrapher ...`).Technical Analysis
The documented fallback uses
npx --yesto resolve, download, and executesnipgrapherfrom the configured npm registry. The command does not specify an exact package version, integrity hash, lockfile, or verified package provenance. The--yesoption also suppresses the normal installation confirmation.Consequently, the code that executes can change after this Skill has been reviewed. The effective package version depends on npm registry state and package resolution at invocation time. If the package account, release process, registry response, or local npm registry configuration is compromised, an attacker-controlled package version could execute with the privileges of the user or Agent running the command.
Attack Path
- An attacker compromises the npm package, its publisher account, the configured package registry, or another relevant supply-chain component.
- The attacker publishes or serves a malicious release under the expected
snipgrapherpackage name. - The local
snipgrapherexecutable is unavailable, causing the documented npm fallback to be selected. - The Agent runs
npx --yes snipgrapher ...without an exact version or integrity constraint. npxdownloads and executes the attacker-controlled package without requesting installation confirmation.- Malicious package lifecycle logic or CLI code runs under the invoking account and can access resources available to that account.
Impact Assessment
Successful exploitation can pr ...[truncated 567 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin the dependency to an exact reviewed version:
bash npx --yes snipgrapher@<exact-reviewed-version> doctor -
Prefer installing the package as a project dependency with an exact version and committing the generated lockfile.
-
In automated workflows, invoke the audited local installation with
npx --no-install snipgrapher ...so execution fails rather than downloading an unexpected release. -
Verify package provenance, publisher identity, release signatures or attestations, and registry integrity before approving a version.
-
Use lockfile integrity metadata and a trusted, access-controlled npm registry or package proxy.
-
Run rendering in a least-privileged sandbox with restricted filesystem, credential, environment-variable, and network access.
-
Update both documented fallback locations so they cannot silently resolve an unreviewed latest release.
-
