T08 · Insecure Dependencies
Error
- Location
- SKILL.md:39
- Finding
- Execution of an Unpinned Mutable npm Package< personal homepage 2. Enable the API Token feature 3. Copy the generated Token **Step 0.3: Configure the Token** ```bash npx daxiapi-cli@latest config set token YOUR_TOKEN_FROM_DAXIAPI ``` ``` The same mutable package reference is also used for financial-report retrieval: ```bash npx daxiapi-cli@latest report finance <code> ``` ### Technical Analysis The Skill repeatedly instructs the agent to invoke `npx daxiapi-cli@latest`. Unless the package is already available locally, `npx` can retrieve the named package from the configured npm registry and execute it immediately. The `@latest` tag is mutable, so the effective executable code can change after this Skill has been reviewed. The project does not provide an exact package version, lockfile, integrity hash, verified publisher information, or a locally audited implementation. Consequently, review of the files in this project cannot establish the safety of the code that will execute at runtime. This creates a third-party supply-chain boundary. Compromise of the npm package, its publisher account, its release workflow, or the registry resolution path could cause arbitrary package lifecycle or CLI code to execute under the privileges of the user or agent running the Skill. ### Attack Path 1. An attacker compromises the `daxiapi-cli` npm publisher account, release pipeline, or another relevant package-distribution component. 2. The attacker publis ...[truncated 1372 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed version, for example: ```bash npx --yes daxiapi-cli@1.2.3 report finance <code> ``` 2. Maintain a package lockfile and verify the package's integrity hash before execution. 3. Document the expected npm registry, official package name, and verified publisher identity. 4. Prefer installing the reviewed version as a declared project dependency and invoking its local binary rather than downloading code on every run: ```bash npm ci ./node_modules/.bin/daxiapi report finance <code> ``` 5. Run the CLI with least privilege in a restricted environment that exposes only required files, environment variables, and network destinations. 6. Disable unnecessary npm lifecycle scripts where compatible with the package and deployment process. 7. Establish a controlled upgrade process in which new versions are reviewed and tested before the pinned version is changed. 8. Avoid supplying unrelated credentials or sensitive directories to the process executing the CLI. ]]>
