Back to skill

Security audit

rabbit-claude-md

Security checks for vulnerabilities and agentic risk

Overview

The skill mainly audits agent memory files, but it also includes under-scoped model networking and a dormant hook that can rewrite commit or pull-request commands.

Install only if you want a memory-file auditing tool and are comfortable reviewing its optional extras. Do not run --apply-model inside an untrusted checkout unless you have verified the resolved endpoint host and whether a credential will be sent, and do not register the shipped Claude hook unless you explicitly want it to rewrite commit messages and PR bodies.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/rwlib/endpoint.py:494
Finding

Repository-Controlled Endpoint Can Receive Document Excerpts Without Per-Endpoint Confirmation

Content
View full analysis

Vulnerability Details

File Location: scripts/rwlib/endpoint.py:274-289 and scripts/rwlib/endpoint.py:494-525
Vulnerability Type: Untrusted repository configuration controlling sensitive-data transmission
Risk Level: Medium

Vulnerable Code

python
def _request(self, system, user, temperature, opener, thinking_off):
    payload = {
        "model": self.model,
        "messages": [{"role": "system", "content": system},
                     {"role": "user", "content": user}],
        "temperature": (self.temperature if temperature is None
                        else float(temperature)),
        "max_tokens": self.max_output_tokens,
        "stream": False,
    }
    if thinking_off:
        payload.update(THINKING_OFF)
    body = json.dumps(payload).encode("utf-8")
    headers = {"Content-Type": "application/json"}
    if self.api_key:
        headers["Authorization"] = "Bearer %s" % self.api_key
    url = self.base_url + "/chat/completions"
    request = urllib.request.Request(url, data=body, headers=headers,
                                     method="POST")
    opener = opener or urllib.request.urlopen
python
start_dirs = []
if target_path:
    start_dirs.append(os.path.dirname(os.path.abspath(target_path)))
start_dirs.append(os.getcwd())
path = next((p for p in (_find_config(d) for d in start_dirs) if p), None)

if path:
    try:
        with open(path, encoding="utf-8") as fh:
            config = json.load(fh)
    except (OSError, ValueError) as exc:
        return None, "%s could not be read: %s" % (path, exc)
    bad = problems(config, path)
    if bad:
        return None, " ".join(bad)
    env_name = config.pop("api_key_env", None)
    key = os.environ.get(env_name) if env_name else None
    if env_name and not key:
        return None, ("%s names api_key_env %r but that variable is not "
                      "set in this envir
...[truncated 3334 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not automatically trust .rabbit-model files located inside the target Git working tree.
  2. Require an interactive confirmation before the first transmission to a repository-selected endpoint. Display the normalized scheme, hostname, port, configuration source, and whether a credential will be attached.
  3. Provide a non-interactive option such as --trust-model-endpoint HOST, requiring the caller to identify the expected host explicitly.
  4. Prefer user-level configuration outside the audited repository, such as a file under the user's configuration directory.
  5. Allow administrators to define an endpoint allowlist and reject all other hosts.
  6. Do not send an API credential selected through repository configuration unless the endpoint has been independently trusted.
  7. Make --model-plan the required first step for repository-local endpoint configurations so the user can review which excerpts would be transmitted.
  8. Document clearly that --apply-model may transmit portions of the target document to a third party.

T07 · Tool Hijacking and Spoofing

Note
Location
scripts/claude_hook.py:263
Finding

Optional Claude Hook Silently Rewrites Commit and Pull-Request Commands

Content
View full analysis

Vulnerability Details

File Location: scripts/claude_hook.py:263-304 and scripts/claude_hook.py:315-330
Vulnerability Type: Tool-input modification and command integrity violation
Risk Level: Low

Vulnerable Code

python
def _strip_attribution(text):
    """`text` with every attribution line dropped, trailing blanks collapsed."""
    kept = [ln for ln in text.split("\n")
            if not any(p.search(ln) for p in ATTRIBUTION_PATTERNS)]
    while kept and not kept[-1].strip():
        kept.pop()
    return "\n".join(kept)


def _mechanical_pass(text):
    """`text` through scan.py's mechanical fixes, or unchanged on any failure."""
    if not text.strip():
        return text
    argv = [sys.executable, SCAN_PATH, "--apply-safe", "--stdout",
            "--voice", "auto"]
    try:
        proc = subprocess.run(argv, input=text.encode("utf-8"),
                              stdout=subprocess.PIPE,
                              stderr=subprocess.DEVNULL, timeout=COMMIT_TIMEOUT)
    except (OSError, subprocess.SubprocessError):
        return text
    out = proc.stdout.decode("utf-8", "replace")
    return out.rstrip("\n") if out.strip() else text


def _clean_body(body):
    return _mechanical_pass(_strip_attribution(body))
python
def on_pre_tool_use(payload):
    if payload.get("tool_name") != "Bash":
        _emit("PreToolUse")
    tool_input = payload.get("tool_input")
    command = tool_input.get("command") if isinstance(tool_input, dict) else None
    if not isinstance(command, str) or not any(
            c in command for c in GIT_GH_COMMANDS):
        _emit("PreToolUse")
    rewritten = _rewritten_command(command)
    if rewritten is None:
        _emit("PreToolUse")
    _emit("PreToolUse", updated_input={"command": rewritten})

Technical Analysis

When externally registered as a Claude Code PreToolUse hook, the module interc ...[truncated 2602 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the hook from this memory-file auditing Skill unless it is required for its declared functionality.
  2. Package command-rewriting behavior as a separate, explicitly installed feature with clear consent and uninstall instructions.
  3. Default to advisory additionalContext rather than returning a replacement command through updatedInput.
  4. Require confirmation whenever the rewritten command differs from the original.
  5. Show a concise diff of the commit or pull-request message before allowing execution.
  6. Make attribution removal separately configurable and disabled by default.
  7. Preserve attribution when repository policy requires generated-content provenance.
  8. Replace substring command detection with structured command parsing where the host API permits it.
  9. Record locally that a command was modified, without recording sensitive message content, so users can audit hook behavior.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (78)

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · SECURITY.md (reported line 74)May include surrounding context.

md
- It writes four paths and no others: two markdown files under
  `~/.claude/output-styles/`, the `hooks` and `outputStyle` keys inside
  `~/.claude/settings.json`, and a record of those at
  `~/.claude/rabbit-writes-host.json`.
- `--dry-run` prints every one of them and writes nothing, and the skill's
  own instructions require showing that output to the user before running the

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This aggregate mismatch finding synthesizes the core risk: the skill appears to scan arbitrary text and DOCX, detect hidden instructions, perform stylometric analysis, emit reports, and apply fixes or rewrites well beyond memory-file maintenance. In this context, the gap between user expectation and actual capability materially increases the chance of unintended data exposure, unauthorized edits, and unsafe invocation decisions by humans or orchestrators.

Content

No source excerpt is available for this finding.