T08 · Insecure Dependencies
- Location
references/install.md:5- Finding
Unpinned Third-Party CLI Installation and Execution
- Content
View full analysis
Vulnerability Details
File Location:
references/install.md, lines 5–26
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
markdown ## Install Global install (preferred):npm i -g postking-cli
text ## Ephemeral invocation (no global install) If the global install fails with permission errors (common in sandboxed agent terminals), invoke via `npx` without installing:npx -p postking-cli@latest pking --version
text Use `npx -p postking-cli@latest pking <command>` for all subsequent calls when running ephemerally. ## Upgrade To upgrade to the latest version:npm i -g postking-cli@latest
text Technical Analysis
The installation instructions download and execute
postking-cliwithout pinning an exact, audited version or verifying its integrity. Both the unversioned global installation and the explicit@latestcommands allow the retrieved package contents to change after this Skill has been reviewed.npm package installation may execute package lifecycle scripts. The
npxworkflow also downloads and runs the selected package immediately. The implementation ofpostking-cliis not included in the audited project, so its code, transitive dependencies, and lifecycle behavior could not be verified during this audit.This is particularly sensitive because the documented CLI is subsequently trusted to perform authenticated operations, store local credentials, read user-selected files, upload assets, publish content, initiate billing workflows, and manage API keys. The finding does not establish that the current package is malicious; it identifies an avoidable supply-chain trust boundary.
Attack Path
- An attacker compromises the
postking-clinpm package, a maintainer account, the package publication pipeline, or a transitive dependency. - The attacker publishes a malicious release that becomes the package vers ...[truncated 1495 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
postking-clito an exact reviewed version rather than using an unversioned package or@latest, for example:sh npm install --global postking-cli@1.0.3 npx --package=postking-cli@1.0.3 -- pking --version - Publish and verify a cryptographic checksum, npm integrity value, signed release, or package provenance attestation before execution.
- Audit the pinned package, its lifecycle scripts, and its complete transitive dependency tree. Repeat this review before changing the pinned version.
- Prefer a project-local installation governed by a committed lockfile over a global installation.
- Where compatible with the verified package, disable installation lifecycle scripts with
--ignore-scripts; otherwise, explicitly audit every required lifecycle script. - Run the CLI as an unprivileged user in a restricted environment. Do not use
sudofor global installation. - Limit filesystem visibility, environment variables, and PostKing API scopes to those required for the requested operation.
- Require explicit user confirmation before file uploads, publishing, deletion, billing, API-key creation, or other consequential operations.
- Consider vendoring the reviewed CLI implementation or linking installation instructions to a reproducible, signed release artifact.
- Pin
