T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:40- Finding
Unpinned Remote Code Retrieval and Local Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 40–50
Vulnerability Type: Mutable external code retrieval and execution
Risk Level: HighVulnerable Code:
markdown The `agentgit` CLI must be reachable. It is not yet published to npm — check first: ```bash node /path/to/AgentGit/bin/agentgit.js statusIf that fails, clone it once:
bash git clone https://github.com/Tryboy869/AgentGit.gitThen either run commands with the full path to
bin/agentgit.js, or runnpm linkinside the cloned folder to get a plainagentgitcommand (seetext ### Technical Analysis The Skill directs users to clone a mutable default branch from an external GitHub repository without pinning a reviewed commit or release and without verifying a checksum or cryptographic signature. It then instructs users to execute the downloaded Node.js entry point directly or expose it as a command through `npm link`. Consequently, the effective executable payload can change after this Skill has been audited. Compromise of the referenced repository, its owner account, or its distribution workflow could replace the expected AgentGit implementation with attacker-controlled code. Running `npm link` may additionally execute package lifecycle scripts and makes the downloaded package available as a local command. The external AgentGit repository was not included in the audited project, so its current implementation and installation scripts could not be independently assessed. ### Attack Path 1. An attacker compromises the referenced GitHub account or repository, or introduces a malicious change into its mutable default branch. 2. A user follows the Skill instructions and runs `git clone https://github.com/Tryboy869/AgentGit.git`. 3. Because no immutable revision or integrity value is specified, Git retrieves the attacker-controlled version. 4. The user runs `npm link` or directly invokes `node /path/to/AgentGit ...[truncated 973 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a reviewed immutable commit hash rather than cloning the mutable default branch.
- Prefer a signed, versioned release maintained through an organization-controlled distribution channel.
- Publish and verify a cryptographic checksum or signature before executing downloaded files.
- Document the expected repository identity, release version, commit hash, and verification procedure directly in the Skill.
- Audit
package.json, lifecycle scripts, transitive dependencies, and the executable entry point before installation. - Avoid global or user-wide
npm linkinstallation. Invoke a verified local file through an explicit path in an isolated environment. - Disable unnecessary npm lifecycle scripts during installation, for example by using
npm install --ignore-scriptswhere compatible. - Run the tool with least privilege and without unnecessary credentials or access to unrelated repositories.
- Re-audit the pinned AgentGit implementation whenever the approved version is updated.
