Back to skill

Security audit

OEE Content Humanizer

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward Anthropic-backed text rewriting skill, with privacy and output-review caveats but no hidden persistence or destructive behavior.

Install only if you are comfortable sending the text you ask it to rewrite to Anthropic using your ANTHROPIC_API_KEY. Do not use it for secrets, regulated data, or confidential drafts unless that external processing is acceptable, and review the rewritten output before publishing or passing it into other automated workflows.

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
humanize.py:58
Finding
Untrusted Input Can Override LLM Rewrite Instructions<![CDATA[ ## Vulnerability Details **File Location**: `humanize.py`, lines 58–91 **Vulnerability Type**: Prompt injection through direct interpolation of untrusted text **Risk Level**: Medium ### Vulnerable Code ```python def build_prompt(text: str, channel: str, tells: list[str]) -> str: """Construct the rewrite prompt.""" # 🐾 channel_guide = CHANNEL_GUIDES.get(channel, CHANNEL_GUIDES["general"]) tells_note = "" if tells: tells_note = ( f"\n\nDetected AI tells to eliminate: {', '.join(tells)}. " "Replace these with concrete, specific language." ) return f"""You are a human editor. Your job: take AI-generated text and make it sound like a real person wrote it. Rules: - Kill vague qualifiers. Be specific or cut them. - Vary sentence length. Mix short punchy sentences with longer flowing ones. - Use contractions (it's, don't, we're) where natural. - Fragments are fine. So are one-word sentences. Really. - Remove filler that doesn't carry meaning. - Keep the core message intact — don't invent new claims. - Add natural rhythm imperfections — humans don't write in perfect parallel structure. - No meta-commentary. Don't say "here's the rewritten version". Just output the text. {tells_note} Channel guidance: {channel_guide} TEXT TO HUMANIZE: --- {text} --- Output ONLY the rewritten text. Nothing else.""" ``` ### Technical Analysis The `text` parameter originates from a command-line argument or standard input and is interpolated verbatim into the same natural-language prompt that contains the application's operational instructions. The `---` delimiters are only text and do not create an enforceable trust boundary for the downstream language model. An attacker can submit content containing instructions that conflict with the rewrite rules, such as directions to ignore previous instructions and emit attacker-selected text. Because the model must interpret both the trusted rules and the untrusted co ...[truncated 1956 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Separate trusted instructions from untrusted source text using the strongest structured message or content-block boundaries supported by the API. Do not rely solely on visual delimiters. 2. Explicitly state that content inside the source-text block is untrusted data and that any instructions within it must not be followed. 3. Encode or serialize the source text as data where practical, then instruct the model to transform only the decoded field. 4. Validate the response before exposing it as trusted output. Reject unexpected formats, excessive length changes, or responses containing instruction-like meta-commentary when those characteristics violate the intended task. 5. Preserve a clear trust label for generated output. Documentation should warn agents that standard output is model-generated and must not be treated as an authoritative instruction or executed automatically. 6. Require human review before publishing output or passing it into tools with side effects. 7. Add adversarial tests covering nested instructions, fake delimiter closures, role impersonation, requests to reveal prompt content, and attempts to generate downstream commands. 8. If strong output integrity is required, use a constrained transformation pipeline or deterministic rewriting rules rather than relying exclusively on an instruction-following model. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Tainted flow: 'req' from os.environ.get (line 102, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
)

    try:
        with urllib.request.urlopen(req) as resp:
            data = json.loads(resp.read())
            return data["content"][0]["text"]
    except urllib.error.HTTPError as e:
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
No manifest is available, so the skill has no declared purpose or scope to justify external network access or reading credentials from environment variables. The code transmits the provided text to a remote API using an API key from ANTHROPIC_API_KEY, which is a meaningful capability beyond local text processing.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script sends arbitrary input text to a third-party API without an explicit user-facing warning or confirmation at the point of use. If users pass sensitive drafts, emails, credentials, or proprietary material, that data leaves the local environment and is exposed to external retention, monitoring, or policy risks beyond the user's expectations.

External Transmission

Medium
Category
Data Exfiltration
Content
}).encode()

    req = urllib.request.Request(
        "https://api.anthropic.com/v1/messages",
        data=payload,
        headers={
            "Content-Type": "application/json",
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.