T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:20
- Finding
- Unpinned Third-Party Package Installation and Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 20–29 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium **Complete Code Snippet**: ```bash If missing, install one of: ```bash npm install -g git-as-memory pip install git-as-memory ``` No global install: ```bash npx git-as-memory --help python -m git_as_memory.cli --help ``` ``` ### Technical Analysis The documented installation commands resolve `git-as-memory` from npm or PyPI without pinning an exact, previously reviewed version or verifying package integrity. Consequently, the code installed can change after this skill has been audited. In particular, `npx git-as-memory --help` may download and immediately execute the registry package when it is not already available locally. The instructions do not provide a lockfile, cryptographic hash, trusted version, package-signature verification process, or canonical publisher identity. A compromised publisher account, package takeover, registry compromise, or malicious future release could therefore introduce arbitrary code into this workflow. The registries and package names shown are not themselves evidence of malicious intent. The vulnerability is the unsafe and non-reproducible dependency acquisition process. ### Attack Path 1. An attacker compromises the relevant npm or PyPI publisher account, takes over the package, or causes a malicious release to be served under the expected package name. 2. The attacker publishes a version containing malicious installation hooks or runtime behavior. 3. A user or agent follows the setup instructions without specifying a reviewed version. 4. npm, pip, or npx resolves and retrieves the attacker-controlled release. 5. Package installation hooks or the invoked CLI execute with the permissions of the user running the command. 6. The malicious package can access resources available to that user before the compromise is detected. ...[truncated 674 chars]
- Remediation
- ## Remediation Suggestions 1. Pin an exact reviewed release, for example `git-as-memory@X.Y.Z` for npm or `git-as-memory==X.Y.Z` for pip. 2. Prefer a project-local dependency managed by a committed lockfile instead of a global installation. 3. For npm, commit lockfile integrity metadata and use a reproducible installation mechanism such as `npm ci`. 4. Avoid automatic `npx` downloads. Require a verified local installation or use an explicitly pinned package version. 5. For Python, use an exact-version requirements file with cryptographic hashes and install with `pip --require-hashes`. 6. Document the canonical package publisher and source repository so operators can verify package provenance. 7. Validate downloaded artifacts against published checksums or signatures before execution. 8. Run the dependency with the minimum necessary filesystem, credential, and network access.
