T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:91
- Finding
- Unpinned Coda Pack SDK Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:91-104` and `SKILL.md:187-189` **Vulnerability Type**: Unpinned third-party dependency installation and execution **Risk Level**: Medium ### Vulnerable Code ```bash # Install Pack SDK npm install -g @codahq/packs-sdk # Initialize Pack project npx @codahq/packs-sdk init karakeep-pack # Develop your Pack (edit pack.ts) # See: https://coda.io/packs/build/latest/guides/quickstart/ # Build and upload npx @codahq/packs-sdk build npx @codahq/packs-sdk upload # Submit to Gallery (when ready) npx @codahq/packs-sdk release ``` Additional instructions repeat the unpinned execution: ```bash 1. Use Pack SDK CLI: `npx @codahq/packs-sdk init karakeep-pack` 2. Implement Karakeep API integration (see https://docs.karakeep.app/api/) 3. Build and upload: `npx @codahq/packs-sdk build && npx @codahq/packs-sdk upload` ``` ### Technical Analysis The Skill instructs users to install and execute `@codahq/packs-sdk` without pinning an audited version or verifying package integrity. Both `npm install -g` and `npx` can retrieve mutable content from the npm registry. Consequently, the code executed by a user may differ from the code available when the Skill was audited. The package name and linked Coda documentation are consistent with the declared functionality, and the project does not automatically execute these commands. Nevertheless, following the documented workflow creates a supply-chain trust boundary that is not constrained by a lockfile, an exact version, or integrity verification. Global installation also expands the package's local footprint. ### Attack Path 1. An attacker compromises the npm package publisher, a transitive dependency, or the relevant registry delivery path. 2. The attacker publishes a malicious version under the same package name or compromises a version selected by the unpinned dependency resolution. 3. A user follows the Skill instructions and runs `npm install -g @codahq/packs-sdk` ...[truncated 864 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the SDK to an exact, reviewed version, for example: ```bash npx --yes @codahq/packs-sdk@<audited-version> build ``` 2. Prefer a project-local development dependency over global installation: ```bash npm install --save-dev --save-exact @codahq/packs-sdk@<audited-version> ``` 3. Commit and enforce a lockfile, and use `npm ci` for reproducible installation. 4. Verify package provenance, registry source, and integrity before execution. 5. Review transitive dependencies and npm lifecycle scripts for the pinned release. 6. Run dependency tooling as an unprivileged user and never recommend elevated installation. 7. Update every SDK command in `SKILL.md` to reference the same audited version. ]]>
