T08 · Insecure Dependencies
- Location
references/invoke-rules.md:13- Finding
Unpinned Third-Party Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
references/invoke-rules.md, line 13
Vulnerability Type: Unsafe execution of an unpinned third-party dependency
Risk Level: MediumComplete Code Snippet:
markdown If the global command is unavailable, use `npx aios-apps-invoke-cli ...`.The original instruction is:
markdown 全局命令不可用时,可使用 `npx aios-apps-invoke-cli ...`。Technical Analysis
The fallback executes
aios-apps-invoke-clithroughnpxwithout specifying an exact package version, integrity digest, lockfile, or trusted registry. If the package is not already available in a trusted local cache,npxcan download and immediately execute the package and its dependency lifecycle code.Consequently, the code ultimately executed can change after the Skill has been reviewed. Security depends on the current npm package release, its transitive dependencies, registry resolution, and local npm configuration rather than solely on the audited project contents.
This creates a software supply-chain risk. Exploitation could occur if the package or one of its dependencies is compromised, ownership is transferred to a malicious party, a malicious version is published, or npm is configured to use an attacker-controlled registry. The project contains no evidence that such a compromise has occurred; the vulnerability is the unsafe unpinned execution mechanism.
Attack Path
- The expected globally installed
aios-apps-invoke-clicommand is unavailable. - The Agent follows the documented fallback and runs
npx aios-apps-invoke-cli .... npxresolves the unversioned package through the configured npm registry or cache.- A compromised package version or transitive dependency is downloaded.
- Package or lifecycle code executes with the permissions of the Agent process.
- The malicious code can access resources available to that process, potentially including request files, returned busin ...[truncated 894 chars]
- The expected globally installed
- Remediation
View remediation
Remediation Suggestions
- Remove the ad hoc
npxfallback and require a preinstalled, administrator-managed, audited CLI. - If
npxis operationally necessary, pin an explicitly approved exact version, for exampleaios-apps-invoke-cli@X.Y.Z; do not use version ranges or tags such aslatest. - Verify package and dependency integrity through a reviewed lockfile and integrity hashes before execution.
- Enforce the approved npm registry explicitly and prevent project, user, or environment-controlled registry overrides.
- Disable lifecycle scripts where compatible, or audit every required lifecycle script before installation.
- Install the approved dependency during a controlled build or deployment stage rather than downloading executable code at Skill runtime.
- Run the CLI in a least-privilege sandbox with narrowly scoped filesystem, environment, network, and local-socket access.
- Fail closed if the trusted CLI is unavailable instead of automatically resolving mutable third-party code.
- Remove the ad hoc
