T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:40
- Finding
- Unpinned Third-Party npm Packages Permit Supply-Chain Code Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:11-16`, `SKILL.md:40-45`, and `SKILL.md:51-58` **Vulnerability Type**: Unpinned executable third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```yaml requires: bins: ["npx"] env: ["GITHUB_TOKEN (optional, only for register_agora_public)"] network: - "mcp.aeoess.com (remote MCP server, SSE mode)" - "api.aeoess.com (Intent Network API)" install: - id: node kind: node package: agent-passport-system bins: ["agent-passport"] ``` ```bash npm install agent-passport-system # SDK, /core subpath is the curated default npm install agent-passport-system-mcp # MCP server, APS_PROFILE=essential is the default ``` ```bash # Identity (passport + Ed25519 keypair, tied to the principal) npx agent-passport join --name my-agent --owner alice # Scoped authority (scope, spend limit, depth, expiry; only narrows) npx agent-passport delegate --to <publicKey> --scope web_search --limit 500 --depth 1 --hours 24 # Record work (Ed25519-signed receipt, traceable through the chain) npx agent-passport work --scope web_search --type research --result success --summary "..." ``` ### Technical Analysis The skill directs users to install `agent-passport-system` and `agent-passport-system-mcp` without exact versions, lockfile enforcement, or integrity verification. Package names without versions resolve to mutable registry releases. Consequently, the code installed at a future point may differ from the code originally reviewed. npm dependencies can execute package lifecycle scripts during installation. The documented `npx agent-passport` commands also explicitly execute package-provided code. If a package release, maintainer account, registry distribution channel, or transitive dependency is compromised, following these instructions could execute altered code on the local system. The project contains only documentation and metadata, with no vendored implementation, lockfile, ch ...[truncated 1582 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin each package to a reviewed exact version rather than relying on the registry's current release: ```bash npm install --save-exact agent-passport-system@<reviewed-version> npm install --save-exact agent-passport-system-mcp@<reviewed-version> ``` 2. Provide and retain a lockfile containing resolved transitive dependency versions and integrity hashes. 3. Use `npm ci` in automated or reproducible environments instead of resolving dependencies dynamically with `npm install`. 4. Verify package provenance, publisher identity, signatures or attestations, and npm integrity metadata before installation. 5. Disable lifecycle scripts during acquisition where operationally possible by using `--ignore-scripts`, then explicitly review and run only required installation steps. 6. Invoke the locally installed, version-pinned executable rather than allowing `npx` to retrieve or resolve an unexpected package release. For example: ```bash ./node_modules/.bin/agent-passport join --name my-agent --owner alice ``` 7. Run package installation and CLI operations inside a least-privileged, isolated environment with narrowly scoped filesystem, network, and credential access. 8. Document a dependency update and security-review process so version changes are assessed before users receive revised installation instructions. ]]>
