Back to skill

Security audit

rabbit-writes

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a coherent writing and prose-audit skill, but its optional model rewrite mode can send selected document passages and a Rabbit-scoped credential to a repository-chosen endpoint without a hard confirmation step.

Install only if you are comfortable reviewing model configuration before using `--apply-model`. Do not run model-backed rewrites in untrusted repositories unless you have checked `.rabbit-model`, `base_url`, and `api_key_env`, or supplied your own explicit endpoint. Treat any Claude Code hook/output-style installation from related tooling as persistent host behavior that should be reviewed separately.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

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

Repository-Controlled Model Configuration Can Exfiltrate Document Passages and Rabbit-Scoped Credentials

Content
View full analysis

Vulnerability Details

File Location: scripts/rwlib/endpoint.py:478-515, scripts/rwlib/endpoint.py:280-287; invocation flow in scripts/scan.py:1448-1503
Vulnerability Type: Repository configuration trust-boundary violation
Risk Level: Medium

Vulnerable Code

python
def resolve(target_path=None, overrides=None):
    """(Endpoint or None, note). Which model server applies, and who said so.

    Order: an explicit override from the command line, then the nearest
    `.rabbit-model` beside the document, then the nearest one above the working
    directory, then the environment, then nothing.
    """
    overrides = overrides or {}
    if overrides.get("base_url"):
        config = dict(overrides)
        key = config.pop("_key", None) or os.environ.get(ENV_API_KEY)
        source = "--model-endpoint"
        bad = problems(config, source)
        if bad:
            return None, " ".join(bad)
        try:
            return _build(config, key, source), "endpoint from %s" % source
        except EndpointError as exc:
            return None, str(exc)

    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 environme
...[truncated 4123 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not trust repository-local endpoint configuration by default. Refuse .rabbit-model files located inside a Git working tree unless the user supplies an explicit trust flag.
  2. Require destination confirmation before transmission. For repository-controlled configurations, display the resolved scheme, hostname, port, model, configuration path, credential-variable name, and planned passage count, then require affirmative confirmation before the first request.
  3. Provide a noninteractive trust mechanism. Add an explicit option such as --trust-model-config PATH or --allow-repository-model-config for CI and scripted use. The option should be required for each untrusted configuration source.
  4. Move endpoint trust to user-owned storage. Prefer a configuration file outside project repositories with restrictive permissions, and allow repository files to reference only a pre-approved endpoint alias rather than an arbitrary URL.
  5. Prevent repositories from selecting credentials. Resolve api_key_env only from user-owned configuration or require an explicit command-line selection. Repository configuration should never choose which environment variable becomes an authorization credential.
  6. Implement an endpoint allowlist or trust database. Record user-approved origins and reject unexpected changes to the URL, scheme, hostname, or port.
  7. Make planning the safe first step. Require --model-plan before using an untrusted or newly observed endpoint, or combine planning and confirmation into the first-run workflow.
  8. Preserve current transport controls. Continue rejecting non-loopback plaintext HTTP by default, scrubbing credentials from errors, limiting environment-variable names, and sending only the minimum passages needed.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (69)

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
94% confidence
Finding

The declared description presents a broad prose-generation and editing skill that can write, rewrite, humanize, de-slop, match a person's voice, and audit whether text sounds AI-generated. The supplied code instead implements attain.py, a verification/measurement script for stylometric voice attainment. It reads one or two text files, resolves a voice profile, loads a fingerprint, computes document statistics and stylometric distance, compares before/after movement toward the target profile, prints reports or JSON, and may fail --check on regressed/flat results. This aligns only with a narrow subset of the declared purpose: detect-only auditing of whether a rewrite landed in the target voice. The primary declared capabilities—editing, rewriting, drafting, humanizing, stripping AI patterns, and applying a saved voice—are not present in this code chunk. Because the actual code is mainly an evaluator rather than a prose transformation skill, the description materially overstates and misstates the behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is about prose generation/editing in a person's voice and making text sound less AI-generated. The supplied code does not perform any writing, rewriting, style matching, voice conversion, or AI-ism detection. Instead, it defines tables and helper functions for scanning text for invisible Unicode artifacts, concealment mechanisms, and control characters, with special handling for emoji ZWJ sequences, plus a function to remove AI-tracking parameters from URLs. That is a materially different primary purpose and includes undeclared capabilities unrelated to prose style editing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is about prose editing, voice matching, AI-writing detection, and rewriting text for publication as the user. The supplied code does none of that. Instead, it implements command-line error formatting helpers and a custom argparse parser for clearer usage/error messages. This is a materially different primary purpose and an unrelated capability set, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is about editing prose in a person's voice, humanizing text, removing AI-writing patterns, and auditing whether text sounds machine-generated. The supplied code does none of that. Instead, it is infrastructure for a README-analysis corpus: file path discovery, JSON loading, summary derivation, and consistency checking between shipped and generated corpus statistics. This is a materially different primary purpose and involves undeclared access to repository research data and README files. There is no evidence of text rewriting, style transfer, AI-sounding detection, or drafting behavior in this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is about prose transformation and stylistic auditing: rewriting text in a person's voice, removing AI-like writing patterns, drafting prose, and checking whether writing sounds machine-generated. The supplied code does none of that. Instead, it is a document-ingestion and security-scanning utility specifically for Word documents. It identifies whether a file is a .docx/.docm, opens the ZIP/XML structure, extracts visible body text, and produces findings about hidden runs such as vanished text, white-on-white text, tiny-font text, and hidden content in comments, headers, footers, footnotes, and endnotes. It also classifies hidden directives versus hidden prose using injection-related logic. This is a materially different primary purpose and introduces undeclared capabilities related to file parsing and hidden-content/injection detection. Therefore the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is about user-facing writing assistance: rewriting prose in a saved voice, de-slopping text, auditing whether writing sounds AI-generated, and drafting content. The supplied code does not implement any of those text-transformation or style-audit behaviors directly. Instead, it is infrastructure code for locating and safely calling a language-model endpoint. Its primary purpose is endpoint configuration, security validation, request construction, response parsing, and error handling. While this may support a rewriting skill, it is not itself a prose-editing or voice-matching implementation. Therefore the description materially misrepresents what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description focuses on generating or editing prose in a person's voice, humanizing text, detecting AI-like writing, and drafting publishable text. The supplied code does not perform style transfer, voice matching, drafting, AI-slop removal, or AI-generated-text detection. Instead, it implements factual consistency checks used to audit whether rewritten text changed numbers, dates, quotes, or named entities. That is a materially different primary purpose: rewrite verification rather than prose generation or stylistic editing. While such checking could be a supporting component of a larger writing tool, the described skill emphasizes voice/humanization workflows and explicitly broad authoring/editing capabilities, whereas this code chunk is narrowly about factual extraction and comparison support.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The declared description promises a comprehensive writing assistant for voice imitation, humanization, AI-style detection, in-place rewriting, and drafting. The supplied code chunk is much narrower and more mechanical. It only computes/apply deterministic edits with 'one correct answer': deleting hidden Unicode, replacing some space-like characters, stripping AI-related URL tracking parameters, and applying explicitly configured preferred substitutions when they are simple/mechanical. It explicitly avoids judgment-based rewriting and even declines to fix stylistic punctuation like em dashes. That means the actual primary purpose is safe low-level text cleanup, not broad prose generation, humanization, or voice conversion. Additionally, URL tracking-parameter cleanup is an undeclared capability, though relatively minor compared with the larger underdelivery on the declared writing functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill writes, edits, audits prose style, applies a saved voice, and removes AI-writing patterns. The supplied code does none of that. Its primary purpose is security/safety analysis: identifying prompt injections and hidden instructions aimed at an agent, then producing findings that can halt rewriting. The module explicitly says it 'surfaces and quarantines' and 'never fixes.' That is materially different from prose rewriting, voice matching, or AI-ism removal. This is not merely a supporting detail of a writing tool; it is a separate security capability with a different function and trigger profile.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is focused on rewriting or auditing prose style and voice, especially making text sound human or like a specific person. The supplied code does not perform any rewriting, voice matching, AI-ism removal, authorship-style audit, or prose generation. Instead, it computes an ASCII-letter ratio over filtered prose and returns a caveat when the document may not be predominantly English. That is a materially different primary purpose and an undeclared capability unrelated to the stated skill behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is for a user-facing prose rewriting/style-transfer/humanization skill. The supplied code does not rewrite, edit, audit prose in a person's voice, or generate text. Instead, it is infrastructure for a detection/scanning system: it reads a shared lexicon JSON file, provides regex helpers, validates pattern metadata, caches compiled patterns, and defines synthetic finding IDs and priorities used by scan/verify tooling. While there is a loose relation to detecting machine-writing patterns, this module itself is not implementing the described skill's primary behavior; it is a backend lexicon/catalog manager for a rule-based scanner, including injection-related checks. That is a materially different purpose from the declared description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The declared purpose is centered on voice/style rewriting, de-slopping, AI-writing detection, and drafting prose as the user. The supplied code does not implement voice transfer, rewriting, drafting, or AI-style detection. Instead, it provides pattern libraries for evaluating vague link text and claim/caveat phrasing, likely for documentation or README quality checks. These behaviors are materially different from the declared prose-style/voice functionality, so this is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description is about user-facing prose rewriting, voice matching, AI-sounding-text detection, and drafting. The supplied code chunk does not implement rewriting, style transfer, voice application, or draft generation. Instead, it is an internal text-processing library focused on identifying and blanking Markdown/HTML/code spans, preserving text offsets, detecting entities and invisible characters, classifying prose blocks, and stripping markup before analysis. While some of these utilities could support a larger writing-audit system, this chunk’s primary purpose is markup parsing/preprocessing rather than writing or voice transformation. That is a material description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is about prose rewriting and voice/style transformation for user-authored text. The supplied code does not edit prose in a person's voice, humanize text, remove AI-like writing, or audit whether text sounds machine-generated. Instead, it is a repository-internal utility module for managing a 'tolerance matrix' configuration: loading JSON, deriving skip/relax tables, validating consistency rules, detecting register categories from structural signals, rendering a markdown table, and writing/checking documentation files. This is a materially different primary purpose with several undeclared capabilities related to configuration validation and documentation maintenance, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description centers on prose authoring and style/voice transformation for text the user will publish as themselves. This code does none of that. Its primary purpose is to serialize existing findings into SARIF format so annotations appear inline in GitHub pull requests, plus warn about URI shapes GitHub will drop. Although the module's comments mention writing-related findings and audit bands, the code itself is infrastructure for reporting findings, not prose editing, humanization, or voice matching. This is a material purpose mismatch, not merely an implementation detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is about prose transformation and style/voice editing, including de-slopping, AI-writing detection, and drafting text. The actual code does none of that. It contains static keyword tables and functions to classify headings into README-related section types and to detect whether headings match IMRaD research-paper categories. There is no functionality for editing prose, matching a user's voice, detecting chatbot-like writing, or drafting text. This is a materially different primary purpose, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a user-facing writing transformation and audit tool focused on rewriting text in a person's voice, humanizing prose, and detecting AI-like writing. The supplied code does none of that. It is a helper module for English sentence segmentation, word tokenization, and syllable estimation. These are supporting NLP primitives, but on their own they do not deliver the declared skill behavior, and the primary purpose is materially different from the description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is about voice-preserving or voice-applying prose generation/editing: rewriting text to sound like a specific person, removing AI-isms, auditing whether text sounds machine-generated, and drafting human-sounding prose. The supplied code does not implement those behaviors. Instead, it is a report-only checker for Simplified Technical English rules and related lexical/style constraints. It analyzes text and emits findings for sentence/paragraph limits, banned punctuation, passive voice, condition placement, modals, banned verbs, phrasal verbs, and vocabulary. While there is a small overlap in that it flags some 'AI slop' vocabulary and audits prose style, that is only a narrow sub-feature inside a broader STE compliance scanner. The primary purpose and capabilities are materially different from the declared voice-writing/editing skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is about prose rewriting, style/voice transformation, and AI-text humanization/detection. The supplied code does none of that. Instead, it is part of a scanning/linting framework that manages suppression directives for findings in documents. Its primary purpose is suppression parsing and audit logic, not writing assistance. Although one function references a 'voice profile', that is only to import exemption rules into the suppression system, not to rewrite or audit prose style. This is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is for an end-user writing/voice-transformation skill that works on prose the user will send or publish. The supplied code does something materially different: it validates the structure and consistency of voice profile support files used by a broader system. Its checks are focused on JSON schema/shape, regex compilation, register names, template leftovers, missing markdown companions, and stylometry fingerprint metadata. While this may support a larger voice-writing system, this chunk itself does not rewrite text, match a user's voice in output prose, detect AI-sounding writing in user drafts, or perform in-place prose edits. The primary purpose and effective capabilities are therefore mismatched.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a broad prose-writing/voice-rewriting skill for composing or humanizing user-authored text. The supplied code only partially matches that: it does audit prose for AI-like patterns and can apply some rewrites, but its primary implementation is a mechanical scanner with security and forensic checks. A substantial part of the code is devoted to detecting hidden Unicode, concealed agent-addressed text/prompt injection, producing structured CLI reports, and enforcing register/voice/style rules. It does not implement general drafting-from-scratch, and its rewrite features are constrained to finding-based passage rewrites or safe mechanical substitutions. Because the actual code has a materially different primary purpose—security-/forensics-flavored text scanning and gated fixing/reporting—than the declared broad writing/editing assistant, this is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description is for an authoring/editing skill that writes, rewrites, humanizes, or audits prose in a user's voice. The supplied code does not perform prose generation, style transfer, or file editing. Its primary purpose is verification: it reads an original and rewritten markdown document and checks whether the rewrite preserved protected content and did not worsen AI-writing indicators. While this supports a rewriting workflow, it is a distinct capability from the declared user-facing behavior. The code's focus on markdown-preservation validation, fact comparison, and CLI diagnostics is materially different from the declared purpose, so this is a mismatch.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_prompt_injection_hidden_instructions': Prompt injection or hidden instructions embedded in AI agent skill text [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · references/injection.md (reported line 58)May include surrounding context.

md
ooks empty. That is categorically different from the stray zero-width space `hidden-unicode` reports as a paste artifact: one is debris, the other is a message. A run is only reported when it decodes to at least two words, so a stray character or two stays where it belongs.

## Directive shapes

Matched case-insensitively, and shaped to attack idioms rather than to meaning. Ordinary English about models and agents must not fire, which is why several of these are narrower than they first look.

- **Override**. `ignore all previous instructions`, `disregard the above`, `forget everything you were told`.
- **Role and turn injection**. A fabricated `system:` or `assistant:` at the start of a line, ChatML tokens, `[INST]`, an invented `System prompt:` header, `you are now`.
- **Fabricated tool calls**. Anything shaped like the agent's own action syntax.
- **Exfiltration and secrecy**. `do not tell the user`, `send this to`, `reply with the contents`.
- **An imperative aimed at an agent by n

Instruction Override

High
Category
Prompt Injection
Confidence
80% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · references/injection.md (reported line 60)May include surrounding context.

md
Matched case-insensitively, and shaped to attack idioms rather than to meaning. Ordinary English about models and agents must not fire, which is why several of these are narrower than they first look.

- **Override**. `ignore all previous instructions`, `disregard the above`, `forget everything you were told`.
- **Role and turn injection**. A fabricated `system:` or `assistant:` at the start of a line, ChatML tokens, `[INST]`, an invented `System prompt:` header, `you are now`.
- **Fabricated tool calls**. Anything shaped like the agent's own action syntax.
- **Exfiltration and secrecy**. `do not tell the user`, `send this to`, `reply with the contents`.

Static analysis

Detected: suspicious.dynamic_code_execution, suspicious.exposed_secret_literal, suspicious.prompt_injection_instructions

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/rwlib/voices.py:688

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/rwlib/endpoint.py:54

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
references/injection.md:60