T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:12
- Finding
- Unverified Third-Party Package Execution with Wallet and Sensitive-Data Access<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 12-16 and 56-61 **Vulnerability Type**: Third-party supply-chain exposure and execution through `npx` **Risk Level**: Medium ### Vulnerable Code ```bash npx awal@2.0.3 status # check if authenticated npx awal@2.0.3 auth login <email> # if not authenticated npx awal@2.0.3 balance # check USDC balance (mainnet) ``` ```bash npx awal@2.0.3 x402 pay \ https://anicca-proxy-production.up.railway.app/api/x402/buddhist-counsel \ -X POST \ -d '{"who_is_suffering":"my_human","situation":"<describe the suffering>","language":"en"}' ``` ### Technical Analysis The Skill directs agents to execute the third-party `awal@2.0.3` package using `npx`. Depending on the local npm configuration and cache state, `npx` can retrieve executable package content from a remote registry and run it immediately. The Skill does not specify package-integrity verification, a reviewed local installation, an approved registry, or a trusted package hash. The package is used for authentication, querying a cryptocurrency balance, generating or handling x402 payment authorization, and submitting request data. This gives the dependency access to a security-sensitive workflow involving an email identity, wallet-related operations, USDC payments on Base Mainnet, and potentially sensitive mental-health descriptions. The external API invocation is disclosed and is part of the stated functionality; there is no evidence in the audited file of covert exfiltration or a deliberately malicious dependency. Nevertheless, the unverified execution model creates a supply-chain trust boundary that cannot be independently audited from this repository. ### Attack Path 1. An agent follows the Skill prerequisite and invokes `npx awal@2.0.3`. 2. If the package is not already available locally, `npx` retrieves executable content from the configured npm registry. 3. A compromised publisher account, registry, package ...[truncated 1550 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. **Vendor and review the dependency** - Install an audited copy through a controlled build process rather than downloading and executing it during Skill use. - Review both `awal@2.0.3` and its transitive dependencies before approval. 2. **Verify package integrity** - Pin the exact package version and expected npm integrity hash. - Use a lockfile and a trusted internal registry or allowlisted package mirror. - Fail closed if the retrieved artifact does not match the approved digest. 3. **Separate installation from execution** - Do not rely on interactive `npx` behavior that may automatically download missing code. - Preinstall the approved package and invoke the verified local binary with download behavior disabled. 4. **Require explicit financial authorization** - Display the endpoint, network, token, amount, and recipient before each payment. - Require explicit user confirmation for every charge rather than treating payment as an automatic side effect. - Enforce wallet spending limits and use a wallet containing only the minimum required balance. 5. **Minimize sensitive-data disclosure** - Inform users that their text will be sent to an external service. - Obtain consent before transmitting mental-health information. - Remove names, contact details, account identifiers, locations, and other unnecessary identifying information from the `situation` field. - Document the service's retention, deletion, encryption, access-control, and model-training policies. 6. **Constrain runtime privileges** - Execute the dependency in a sandbox or isolated container. - Restrict filesystem access, environment variables, credentials, and outbound network destinations. - Allow network access only to the approved registry during installation and the documented API endpoint during use. 7. **Improve operational monitoring** - Record package hashes, payment amounts, destination endpoints, an ...[truncated 164 chars]
