Back to skill

Security audit

codegraph

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent code-analysis helper, but its documented installation path asks users to execute mutable remote code and install an unpinned global package.

Install only if you are comfortable with a third-party CLI indexing your repositories and changing your user environment. Prefer a pinned, verified release over the documented `curl | sh` or unpinned global npm install, do not authorize agent wiring or upgrades unless you specifically need them, and review telemetry and daemon behavior before use.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
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: Critical

Complete Code Snippet:

bash
# Standalone bundle — no Node, no toolchain (recommended)
curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh

Technical Analysis

The recommended installation command downloads install.sh from the mutable main branch of a personal GitHub repository and passes the response directly to sh. 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.md requires installation authorization, which reduces accidental execution but does not establish the provenance or safety of the payload.

Attack Path

  1. An agent follows SKILL.md and determines that the codegraph executable is unavailable.
  2. The user authorizes installation.
  3. The agent follows the recommended standalone installation command in references/cli-reference.md.
  4. An attacker has previously compromised the repository, maintainer account, mutable main branch, or relevant delivery infrastructure.
  5. curl retrieves the attacker-controlled install.sh.
  6. The pipe sends the response directly ...[truncated 765 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the direct curl | sh installation instruction.
  2. Pin downloads to an immutable, reviewed release version or commit rather than the mutable main branch.
  3. Publish a cryptographic checksum and preferably a verifiable signature for each release artifact.
  4. 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.
  5. Ensure the installer fails closed if signature or checksum validation fails.
  6. Document every security-relevant installer action, including filesystem changes, PATH changes, network access, telemetry defaults, and agent integration changes.
  7. Run installation with ordinary user privileges and avoid recommending sudo or other privilege elevation unless a narrowly scoped operation demonstrably requires it.

T08 · Insecure Dependencies

Warning
Location
references/cli-reference.md:90
Finding

Unpinned Package Is Installed Globally from the npm Registry

Content
View full analysis

Vulnerability Details

File Location: references/cli-reference.md:90
Vulnerability Type: Insecure dependency installation
Risk Level: Medium

Complete Code Snippet:

bash
# npm (requires Node >=20 <25)
npm i -g @colbymchenry/codegraph

Technical Analysis

The alternative installation command globally installs the latest version of @colbymchenry/codegraph without pinning an exact reviewed release or supplying integrity metadata. Consequently, the installed package can differ from the version described by this artifact and can change after the Skill audit.

npm packages may execute lifecycle scripts during installation. If the publisher account, package, or supply chain is compromised, a malicious newly published version could execute code during the global installation. A global installation also places the resulting executable in a shared user-level or system-level command path, increasing its reach compared with a project-local or isolated installation.

The package name is internally consistent with the documented project, so there is no evidence in the reviewed files of typosquatting or dependency confusion. The confirmed issue is the use of an unpinned, mutable dependency in a global installation context.

Attack Path

  1. An attacker compromises the npm publisher account or package release process.
  2. The attacker publishes a malicious version under the legitimate package name.
  3. An agent or user executes the documented command without an explicit version.
  4. npm resolves the command to the current registry-selected release.
  5. npm downloads the malicious package and executes any applicable installation lifecycle scripts.
  6. The installed CLI remains available through the global command path and can execute further attacker-controlled behavior when invoked.

Impact Assessment

Installation-time code can execute with the permissions of the account running npm. It may read or m ...[truncated 454 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the package to an exact, reviewed version rather than installing the latest release.
  2. Publish and verify package provenance and integrity information through the registry.
  3. Prefer a project-local or isolated installation over a global installation where operationally feasible.
  4. Document whether the package uses npm lifecycle scripts and what those scripts perform.
  5. Require explicit authorization before installation and clearly distinguish installation from normal read-only graph queries.
  6. Establish a controlled update process that reviews new versions before changing the documented pin.
  7. Avoid elevated npm installation and ensure the selected installation directory is writable without administrator privileges.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Agent installation and uninstallation are materially different from code analysis because they modify host tooling and agent integrations. In this skill context, such capabilities are more dangerous because they could let a compromised or misdirected workflow alter other agents, establish persistence, or disable tooling outside the user’s immediate request.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

The | sh construct is the critical element that turns an external fetch into immediate command execution, removing the opportunity for inspection or integrity validation. Within a skill ecosystem, this is especially risky because users may trust the documentation and run it reflexively, resulting in arbitrary code execution from a mutable remote source.

Content

Scanner excerpt · references/cli-reference.md (reported line 88)May include surrounding context.

bash
# Standalone bundle — no Node, no toolchain (recommended)
curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh
# npm (requires Node >=20 <25)
npm i -g @colbymchenry/codegraph

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The CLI reference exposes capabilities beyond passive code-graph analysis, including agent wiring, uninstall, telemetry, and upgrade operations. In a skill intended for repository analysis, documenting and potentially enabling environment-modifying commands expands the action surface and could be misused by an agent or operator for persistence, tampering, or unexpected system changes.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

A self-update command allows the tool behavior to change after deployment, which undermines review assumptions and can introduce unvetted code or functionality. For an analysis-only skill, this increases supply-chain and integrity risk because the executable can fetch and apply changes unrelated to the immediate analysis task.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The installation instructions recommend piping a remotely fetched script directly into the shell, which executes unreviewed network content immediately. This is dangerous because any compromise of the source, transport, repository, or account can lead to arbitrary code execution on the user's machine with the user's privileges.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest focuses on indexing and querying local code graphs, but the documented telemetry command introduces a usage-tracking control surface unrelated to codebase analysis. While not inherently dangerous, it is outside the stated analytical intent of the skill.

Content

No source excerpt is available for this finding.

External Script Fetching

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The document instructs fetching a script from an external source during installation, introducing a supply-chain dependency at execution time. In isolation this is common, but in combination with direct shell execution it creates a clear path for remote code execution if the external content changes maliciously or is intercepted.

Content

Scanner excerpt · references/cli-reference.md (reported line 88)May include surrounding context.

bash
# Standalone bundle — no Node, no toolchain (recommended)
curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh
# npm (requires Node >=20 <25)
npm i -g @colbymchenry/codegraph