T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:108
- Finding
- Global wallet CLI installation without cryptographic dependency verification## Vulnerability Details **File Location**: `SKILL.md`, lines 108–116 **Vulnerability Type**: Supply-chain exposure through a globally installed npm dependency **Risk Level**: Medium **Affected code:** ```bash npm install -g awal@2.12.1 awal --version ``` The surrounding instructions explain that this CLI signs payments: ```text Pinning matters here: this CLI signs payments, so resolving it through `npx` without a version would fetch whatever the registry serves at the moment you run it. Newer versions are usually fine — read the upstream release notes before moving the pin. ``` ### Technical Analysis The exact version pin is a useful safeguard against unexpected upgrades, but it does not authenticate the package contents against a project-controlled digest, signature, or lockfile. The skill directs the operator to install the package globally, potentially giving npm package installation and lifecycle scripts access to all resources available to the invoking user. This is particularly sensitive because `awal` is subsequently trusted to authenticate a wallet and sign USDC payment authorizations. A compromised npm account, malicious package version present before review, registry/source substitution, or compromised transitive dependency could place attacker-controlled code in the wallet execution path. A global installation also exceeds the minimum filesystem scope required to execute a project-specific CLI. Depending on the npm configuration and user account, it may require elevated installation privileges or modify a shared executable location. The skill does not instruct the user to use `sudo`, so administrative compromise is not guaranteed, but the installed package receives the privileges of whichever account performs the command. ### Attack Path 1. An attacker compromises the package publication pipeline, a dependency resolved by `awal@2.12.1`, or the registry/source used by npm. 2. The operator follows th ...[truncated 1131 chars]
- Remediation
- ## Remediation Suggestions - Avoid a global installation where possible. Install the CLI into a dedicated, unprivileged project directory or isolated container. - Distribute and verify a project-controlled SHA-256 digest or trusted package signature before execution. - Provide a lockfile or equivalent dependency manifest that fixes the complete transitive dependency graph, not only the top-level package version. - Use npm provenance and signature verification when supported, and document the expected publisher and registry. - Initially install with lifecycle scripts disabled, where compatible: ```bash npm install --ignore-scripts --save-exact awal@2.12.1 ``` If lifecycle scripts are required, document and audit each script before allowing it to run. - Never recommend running the installation with `sudo`; use an unprivileged account with minimal access to unrelated credentials and files. - Verify the resolved package metadata and executable before entering wallet credentials or authorizing payments. - Prefer a vendor-supplied signed binary or a reproducible build whose digest can be independently checked.
