T08 · Insecure Dependencies
- Location
- SKILL.md:84
- Finding
- Execution of an Unpinned Remote npm Package with Access to Sensitive Athlete Data<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:79-84`, `SKILL.md:107-113`, `SKILL.md:129-134`, `SKILL.md:206-211`, `SKILL.md:497-502`, `reference/queries.md:3-7` **Vulnerability Type**: Unpinned third-party package execution and supply-chain exposure **Risk Level**: High ### Vulnerable Code ```markdown ### Step 2: Generate Authorization URL Run the auth command to generate the OAuth URL: ```bash npx claude-coach auth --client-id=CLIENT_ID --client-secret=CLIENT_SECRET ``` ``` ```markdown ### Step 4: Exchange Code and Sync Run these commands to complete authentication and sync (the CLI extracts the code from the URL automatically): ```bash npx claude-coach auth --code="FULL_REDIRECT_URL" npx claude-coach sync --days=730 ``` ``` ```markdown ### Refreshing Data To get latest activities before creating a new plan: ```bash npx claude-coach sync ``` ``` ```markdown ## Database Access The athlete's training data is stored in SQLite at `~/.claude-coach/coach.db`. Query it using the built-in query command: ```bash npx claude-coach query "YOUR_QUERY" --json ``` ``` ```markdown ### Step 2: Render to HTML After writing the JSON file, render it to an interactive HTML viewer: ```bash npx claude-coach render plan.json --output plan.html ``` ``` The same unpinned query invocation also appears in `reference/queries.md`: ```markdown Run these queries using the claude-coach CLI: ```bash npx claude-coach query "YOUR_QUERY" --json ``` ``` ### Technical Analysis The Skill repeatedly instructs the agent to execute `claude-coach` through `npx` without specifying an exact package version, integrity digest, trusted registry, or verified publisher. Depending on the local npm configuration and cache, `npx` can retrieve the current package release from a remote registry and execute it immediately. This creates a mutable code-execution channel: the package executed at Skill invocation time may differ from the package that existed when the Skill was audi ...[truncated 2673 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `claude-coach` to an exact, audited version in every invocation, rather than relying on the latest registry release. 2. Prefer a project-local installation governed by a committed lockfile and npm integrity metadata. 3. Document the package's official registry URL, publisher identity, source repository, and release-verification process. 4. Require an explicit user confirmation before downloading or executing the package. 5. Install and audit the dependency separately instead of allowing `npx` to download and execute it in one operation. 6. Run synchronization in a sandbox with access limited to: - The Strava API endpoints required for OAuth and activity retrieval. - A dedicated configuration directory. - `~/.claude-coach/coach.db`. - Explicit plan input and output paths. 7. Deny access to unrelated home-directory files, SSH material, browser profiles, and other credential stores. 8. Keep the manual-data workflow available without package installation or network access. 9. Add update controls so a new package release is reviewed before the pinned version is changed. 10. Validate and escape query and output arguments in the CLI implementation, although that implementation was not included in the audited project. ]]>
