T08 · Insecure Dependencies
- Location
SKILL.md:8- Finding
Execution of an Unpinned Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 8-9
Vulnerability Type:T08: Insecure Dependencies
Risk Level: HighVulnerable Code
yaml allowed-tools: - "Bash(npx agnic@latest status*)" - "Bash(npx agnic@latest balance*)"The unpinned package is also invoked at
SKILL.md:15,SKILL.md:19,SKILL.md:38, andSKILL.md:41.Technical Analysis
The Skill authorizes and instructs the Agent to execute
agnic@latestthroughnpx. Thelatestnpm tag is mutable and does not identify a specific, previously audited package artifact. Depending on the local npm environment,npxmay download the current package release and immediately execute its code.Consequently, the code ultimately executed is not included in this project and can change after the Skill has been reviewed. No exact version, lockfile, package integrity hash, or other artifact verification mechanism is provided. This creates a supply-chain trust boundary in which compromise of the package, its publisher account, or a future release can introduce arbitrary executable behavior.
The exposure is particularly sensitive because the documented CLI consumes
AGNIC_TOKEN, performs wallet authentication, accesses wallet addresses, and retrieves financial balance information.Attack Path
- An attacker compromises the
agnicpackage publisher, npm account, release process, or a future package version. - The attacker publishes a malicious release and causes the mutable
latesttag to resolve to it. - A user asks the Agent to check a wallet balance or authentication status.
- The Skill authorizes the Agent to run
npx agnic@latest balance ...ornpx agnic@latest status .... npxretrieves and executes the malicious package artifact with the permissions of the Agent process.- The malicious package can inspect process-accessible data, including authentication tokens and wallet-related information, and pe ...[truncated 820 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Replace
agnic@latestwith an exact, reviewed package version in every allowed-tool rule, command, and example. - Install the dependency through a committed lockfile rather than allowing
npxto resolve and download a mutable release at invocation time. - Verify the package artifact with npm lockfile integrity metadata or an independently maintained checksum before execution.
- Record and verify the expected npm package owner, source repository, and release provenance. Review package ownership changes before upgrades.
- Introduce a controlled dependency-update process that audits new versions before changing the pinned version.
- Run the CLI with least privilege in an isolated environment with restricted filesystem and network access.
- Expose
AGNIC_TOKENonly to the specific command that requires it, use a narrowly scoped and revocable token, and prevent credentials from appearing in command output or logs. - Ensure the allowed-tool patterns accept only the required fixed commands and validated network options after the dependency has been pinned.
- Replace
