Back to skill

Security audit

AgentGit

Security checks for vulnerabilities and agentic risk

Overview

The skill is purpose-aligned but asks users to run and optionally link an unpinned external GitHub CLI that can validate and merge repository changes.

Review the AgentGit repository before installing, prefer a pinned commit or signed release, avoid npm link unless you trust the package, and run it only in repositories where you are comfortable giving the external CLI git and filesystem access.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

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

Vulnerable 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 status

If that fails, clone it once:

bash
git clone https://github.com/Tryboy869/AgentGit.git

Then either run commands with the full path to bin/agentgit.js, or run npm link inside the cloned folder to get a plain agentgit command (see

text

### 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 link installation. 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-scripts where 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.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (2)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The listed triggers such as "validate agent output before merging," "merge only if tests pass," and "check subagent result before trusting it" are generic phrases that could arise in many ordinary git or CI conversations. The file describes a fairly specific AgentGit workflow, but the trigger list does not clearly constrain activation to this tool or provide exclusion conditions, increasing the risk of unintended invocation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The skill makes a strong security-relevant guarantee that merge cannot occur unless validation happened in the same session, but the surrounding documentation does not show how that property is enforced. If operators rely on this claim without an actual technical control, they may assume stale, bypassed, or previously-approved work is safe to merge when it is not.

Content

No source excerpt is available for this finding.