T08 · Insecure Dependencies
- Location
scripts/setup.sh:32- Finding
Unpinned Runtime Dependency Installation
- Content
View full analysis
/dev/null || npm install aliaskit@latest 2>/dev/null ``` ### Technical Analysis The setup script installs `aliaskit@latest` every time setup runs. No exact version, lockfile, or integrity hash constrains the downloaded package. npm installation can also execute package lifecycle scripts. The dependency is subsequently trusted with the AliasKit API key and processes identity information, email, SMS, TOTP data, card-encryption material, and potentially payment-card information. Consequently, a compromised package release, maintainer account, npm distribution channel, or transitive dependency could execute arbitrary code in the context of the user running setup. The network installation is related to the Skill's declared functionality, but automatically downloading the mutable latest release exceeds the minimum safe privilege necessary. A fixed, reviewed SDK version would provide the same functionality with a substantially narrower supply-chain trust boundary. ### Attack Path 1. An attacker compromises the `aliaskit` npm package, one of its dependencies, or its publishing account. 2. The attacker publishes a malicious version that becomes the package tagged as `latest`. 3. A user runs `scripts/setup.sh`. 4. npm downloads the malicious package and may execute its lifecycle scripts immediately. 5. The malicious code runs with the privileges of the user executing setup. 6. It can access local files and environment variables, including `ALIASKIT_API_KEY`. 7. During later SDK operations, it may also access the identity ID, inbox contents, card key, TOTP secrets, and payment information. ### Impact Assessment Successful exploitation pro ...[truncated 445 chars]- Remediation
View remediation
