T08 · Insecure Dependencies
Warning
- Location
- README.md:46
- Finding
- Unpinned Package Execution Through npx## Vulnerability Details **File Location**: `README.md:46-50` **Vulnerability Type**: Supply-chain risk from an unpinned executable dependency **Risk Level**: Medium ```markdown ### skills.sh ```bash npx skills add Crevita/ciso-agent-security ``` ``` ### Technical Analysis The installation instructions invoke the `skills` package through `npx` without specifying an exact package version or verifying its integrity. Depending on the local environment and cache state, `npx` can retrieve the current package release from the configured npm registry and execute it. Consequently, the code executed by this command is not immutable relative to the audited repository. A compromised registry account, malicious future package release, registry substitution, or unsafe registry configuration could cause users to execute code that was never reviewed as part of this skill. The repository itself contains no malicious script or executable payload. The risk arises specifically from recommending execution of an unpinned third-party package. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or an upstream dependency used by the `skills` package. 2. The attacker publishes a malicious release under the package name resolved by `npx`. 3. A user follows the documented installation command. 4. `npx` resolves and downloads the attacker-controlled release from the configured registry. 5. Package lifecycle logic or the invoked CLI executes with the installing user's permissions. 6. The malicious code can access resources available to that user and potentially alter the project or local environment. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the user running the installation command. The reachable scope may include the current project, user-owned files, environment variables, accessible credentials or tokens, and network resources available to that account. No privilege escalation be ...[truncated 184 chars]
- Remediation
- ## Remediation Suggestions - Pin the installer to an explicitly reviewed package version rather than allowing `npx` to resolve the latest release. - Use an organization-controlled lockfile and verify package integrity with the expected registry checksum. - Document the trusted registry, exact publisher identity, approved version, and expected integrity digest. - Review the package's lifecycle scripts and transitive dependencies before recommending execution. - Prefer a non-executing installation method, such as downloading and verifying the skill file before manually copying it into place. - In automated environments, install dependencies using reproducible, lockfile-enforcing commands and disable lifecycle scripts unless they are explicitly required and audited. - Run installation under a least-privileged account without production credentials or unnecessary filesystem access.
