T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:17
- Finding
- Unpinned Third-Party CLI Installation and Build<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 17-28 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g posty-cli posty auth:login ``` The alternative source installation method is also unpinned: ```bash git clone https://github.com/norbertlevente/posty-agent.git cd posty-agent pnpm install && pnpm run build npm link ``` ### Technical Analysis The Skill instructs users to globally install and execute the latest available version of `posty-cli` without specifying an audited version, integrity hash, or verifiable package provenance. This allows the code ultimately executed by the Skill to change after the Skill itself has been reviewed. The alternative installation process similarly clones the repository's current default branch rather than a specific reviewed commit or signed release. It then installs dependencies and runs the project's build process. Package installation and build operations may execute lifecycle scripts supplied by the project or its transitive dependencies. Because this artifact contains only `SKILL.md`, the implementation of the installed executable, its dependency lockfile, and its lifecycle scripts cannot be reviewed as part of this audit. A malicious or compromised package release, repository update, maintainer account, or transitive dependency could therefore introduce arbitrary executable code. ### Attack Path 1. An attacker compromises the npm package, source repository, maintainer credentials, or a transitive dependency. 2. The attacker publishes a malicious update under the expected package name or adds malicious code to the repository's default branch. 3. A user or Agent follows the Skill's installation instructions. 4. `npm install`, `pnpm install`, or the build process retrieves the attacker-controlled version and executes applicable lifecycle or build scripts. 5. The malicious code runs with the privileges of the user performin ...[truncated 1355 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `posty-cli` to a specifically reviewed release rather than installing the latest version: ```bash npm install -g posty-cli@<reviewed-version> ``` 2. Publish and verify the expected npm integrity digest or package provenance before installation. Use npm provenance attestations and signed release artifacts where available. 3. Pin source-based installation instructions to a full reviewed commit hash or signed tag: ```bash git clone https://github.com/norbertlevente/posty-agent.git cd posty-agent git checkout --detach <reviewed-full-commit-hash> ``` 4. Ship and enforce a committed lockfile. Use a frozen installation mode, such as: ```bash pnpm install --frozen-lockfile ``` 5. Review lifecycle and build scripts before execution. Where compatible with the package, initially install dependencies with lifecycle scripts disabled and explicitly run only audited build steps. 6. Avoid global installation where practical. Use a dedicated unprivileged environment, container, or project-local installation to reduce the files and credentials exposed if the dependency is compromised. 7. Never perform installation with administrative privileges unless it is strictly necessary. Document that the CLI should run as an ordinary user. 8. Add an update-review policy so that version or commit changes require a fresh security review before the Skill's installation instructions are updated. ]]>
