T08 · Insecure Dependencies
- Location
SKILL.md:39- Finding
Unpinned Third-Party CLI Executes in a Sensitive Key-Bearing Context
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 39-45
Vulnerability Type: Unpinned executable dependency
Risk Level: MediumVulnerable Code
markdown Install globally so the binary is available locally: ```bash npm install -g unifai-sdkOr use via npx (no install needed)
bash -npx -p unifai-sdk unifai <command>text The package is also declared without an exact version in the metadata at `SKILL.md:5`: ```yaml "install":[{"id":"node","kind":"node","package":"unifai-sdk","bins":["unifai"],"label":"Install unifai-sdk (node)"}]Technical Analysis
The installation instructions and package metadata identify
unifai-sdkwithout pinning an audited version or integrity digest. Both global npm installation and npx package execution can therefore resolve to a package release that differs from the version reviewed when this Skill was published.This is particularly sensitive because the installed executable requires
UNIFAI_AGENT_API_KEYand may run withSOLANA_PRIVATE_KEYorEVM_PRIVATE_KEYavailable. It is also authorized to sign and submit financial transactions. A compromised package release, registry account, or transitive dependency could consequently execute arbitrary code with the invoking user's privileges and access credentials present in the process environment.The documentation references source code on GitHub, but it does not establish that the registry artifact installed at runtime corresponds to reviewed source. The leading
-in the npx example also appears to be a syntax error, though that typo is not itself the security vulnerability.Attack Path
- An attacker compromises the npm package publisher, package release process, or a dependency incorporated into a later
unifai-sdkrelease. - The attacker publishes a malicious or backdoored version under the existing package name.
- A user or agent follows
npm install -g unifai-sdkor invokes the unversioned package through npx. - npm ...[truncated 1244 chars]
- An attacker compromises the npm package publisher, package release process, or a dependency incorporated into a later
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, independently reviewed release in both metadata and commands, for example
unifai-sdk@1.0.3, provided that version has been verified. - Use a lockfile and registry integrity hashes where the installation framework supports them.
- Verify npm provenance, publisher identity, signatures, and correspondence between the registry artifact and referenced source repository.
- Avoid runtime npx downloads in workflows where API keys or wallet private keys are available.
- Install dependencies in a controlled build phase and scan the resolved package and complete transitive dependency tree before use.
- Run the CLI with least privilege and expose sensitive environment variables only to the specific signing operation that requires them.
- Isolate transaction signing from service discovery and remote invocation where feasible.
- Before signing, decode and display the complete transaction—including network, recipient, assets, amounts, approvals, and fees—and require explicit user confirmation.
- Use restricted or low-value wallets for automation, and prefer hardware-backed or policy-controlled signing over raw private keys in environment variables.
- Correct the malformed
-npxexample to prevent ambiguous or failed execution.
- Pin the dependency to an exact, independently reviewed release in both metadata and commands, for example
