T08 · Insecure Dependencies
- Location
scripts/backup/backup-to-vault.sh:43- Finding
Unpinned npm Package Is Downloaded and Executed During Sensitive Operations
- Content
View full analysis
/dev/null npx @didcid/keymaster recover-wallet-did > /dev/null npx @didcid/keymaster get-vault-item backup workspace.zip "$RESTORE_DIR/workspace.zip" ``` ### Technical Analysis The scripts execute `@didcid/keymaster` through `npx` without specifying an exact package version. The project also contains no reviewed lockfile that constrains the package and its transitive dependencies. Depending on the local npm state, `npx` may download and execute the package version currently resolved by the configured registry. Consequently, the code that runs during backup, restoration, wallet reconstruction, and vault management can change after this project has been audited. These invocations occur while highly sensitive values and resources are available, including: - `ARCHON_PASSPHRASE` - `ARCHON_WALLET_PATH` - The disaster-recovery mnemonic - Workspace and OpenClaw configuration archives - Decrypted vault items - Vault membership and access-control operations A compromised package release, registry account, registry configuration, or dependency could therefore execute arbitrary code with the invoking user's permissions. ### Attack Path 1. An attacker compromises the `@didcid/keymaster` package, one of its dependencies, its publisher account, or the npm registry resolution path. 2. The attacker publishes or causes resolution to a modified package version. 3. ...[truncated 934 chars]- Remediation
View remediation
