T03 · Remote Payload Retrieval and Execution
- Location
references/cli-reference.md:88- Finding
Mutable Remote Installation Script Is Executed Directly by a Shell
- Content
View full analysis
Vulnerability Details
File Location:
references/cli-reference.md:88
Vulnerability Type: Remote payload retrieval and execution
Risk Level: CriticalComplete Code Snippet:
bash # Standalone bundle — no Node, no toolchain (recommended) curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | shTechnical Analysis
The recommended installation command downloads
install.shfrom the mutablemainbranch of a personal GitHub repository and passes the response directly tosh. The retrieved content is neither pinned to an immutable commit or release nor verified with a checksum or cryptographic signature.Piping a network response directly into a shell prevents meaningful inspection before execution. The effective payload can change after this Skill has been reviewed without requiring any change to the audited files. An attacker who compromises the repository, maintainer account, release infrastructure, or delivery path could replace the installer with arbitrary shell commands.
Installing the external CLI may be necessary to use the Skill, but immediate execution of mutable remote content exceeds the minimum mechanism necessary. Installation could instead use a pinned, integrity-verified artifact with a separate download and approval step.
SKILL.mdrequires installation authorization, which reduces accidental execution but does not establish the provenance or safety of the payload.Attack Path
- An agent follows
SKILL.mdand determines that thecodegraphexecutable is unavailable. - The user authorizes installation.
- The agent follows the recommended standalone installation command in
references/cli-reference.md. - An attacker has previously compromised the repository, maintainer account, mutable
mainbranch, or relevant delivery infrastructure. curlretrieves the attacker-controlledinstall.sh.- The pipe sends the response directly ...[truncated 765 chars]
- An agent follows
- Remediation
View remediation
Remediation Suggestions
- Remove the direct
curl | shinstallation instruction. - Pin downloads to an immutable, reviewed release version or commit rather than the mutable
mainbranch. - Publish a cryptographic checksum and preferably a verifiable signature for each release artifact.
- Separate retrieval from execution: download the installer to a local file, verify its integrity and provenance, permit inspection, and request explicit approval before running it.
- Ensure the installer fails closed if signature or checksum validation fails.
- Document every security-relevant installer action, including filesystem changes, PATH changes, network access, telemetry defaults, and agent integration changes.
- Run installation with ordinary user privileges and avoid recommending
sudoor other privilege elevation unless a narrowly scoped operation demonstrably requires it.
- Remove the direct
