Back to skill

Security audit

Improvement Generator

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a real improvement generator, but it needs review because it can automatically send target skill content to an external Claude CLI and can emit file-change plans that are not contained to the target skill.

Review this skill before installing or running it on private skills. Use it only with non-sensitive targets unless external Claude processing is explicitly acceptable, and do not let downstream executors apply generated candidates without independent path containment, action allowlisting, and human approval.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/propose.py:268
Finding

Undisclosed transmission of target and evaluation data to an external model CLI

Content
View full analysis
dict | None: """Use LLM to propose a SKILL.md fix based on evaluator failures. Reads the current SKILL.md, sends it + failure details to claude -p, and asks for a targeted fix. """ import shutil import subprocess import json as _json skill_md = target / "SKILL.md" if target.is_dir() else target if not skill_md.exists(): return None if shutil.which("claude") is None: return None skill_content = skill_md.read_text(encoding="utf-8") failures_text = "\n".join( f"- Task '{t['task_id']}': {t.get('details', t.get('error', 'unknown'))}" for t in failed_tasks ) prompt = ( "You are improving a SKILL.md file based on evaluator task failures.\n\n" f"## Current SKILL.md\n```\n{skill_content[:3000]}\n```\n\n" f"## Failed Tasks\n{failures_text}\n\n" "Analyze why these tasks failed and propose a TARGETED change to SKILL.md " "that would fix the failures without breaking what already works.\n\n" "Respond with ONLY a JSON object:\n" '{{"section_heading": "## ", ' '"action": "append_markdown_section" or "replace_markdown_section", ' '"content_lines": ["line1", "line2", ...], ' '"rationale": "why this fixes the failures"}}' ) try: result = subprocess.run( ["claude", "-p", "--output-format", "json"], input=prompt, capture_output=True, text=True, timeout=120, ) ``` The default analysis path performs the same operation: ```python skill_content = skill_md.read_text(encoding="utf-8") prompt = ( "You are a skill quality analyst. Analyze this S ...[truncated 3180 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/propose.py:365
Finding

Prompt-injected model output can create uncontained downstream file-operation plans

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises operational behavior that involves reading targets, writing output artifacts, and invoking local scripts, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization gap where an orchestrator or user cannot reliably constrain file, shell, or possible network access, increasing the chance of over-privileged execution or unintended side effects.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description and several trigger phrases are written in Chinese, while the file does not state that the skill is region-specific or that users may choose their preferred language. This creates a natural-language policy concern because it imposes a locale/language expectation without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill is framed as a local improvement generator, but this code delegates analysis and fix synthesis to an external LLM CLI. That mismatch matters because users may reasonably expect local processing, while the implementation actually exports target content and failure traces to a third-party analysis path, increasing privacy and prompt-injection exposure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Executing an external claude subprocess introduces a separate execution and data-processing boundary that the rest of the skill does not constrain. Because the input includes repository content and prior traces, a malicious or sensitive target file can influence what is sent externally, creating confidentiality and integrity risks even absent shell injection.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

This subprocess call invokes an external LLM CLI with prompt content derived from local SKILL.md and evaluator-failure data. While it does not use a shell and is therefore not a classic command-injection bug, it does exfiltrate potentially sensitive repository content to an external tool without explicit consent, policy gating, or trust-boundary enforcement.

Content

Scanner excerpt · scripts/propose.py (reported line 304)May include surrounding context.

python
)

    try:
        result = subprocess.run(
            ["claude", "-p", "--output-format", "json"],
            input=prompt, capture_output=True, text=True, timeout=120,
        )

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code invokes an external LLM CLI without any user-facing disclosure that SKILL.md content and related failure context may leave the local trust boundary. In a security-sensitive analysis pipeline, silent outbound transfer is itself a meaningful vulnerability because operators cannot make informed consent or policy decisions.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

This second subprocess call sends SKILL.md content to the external claude CLI for analysis and proposal generation. The primary risk is unintended data disclosure and trust-boundary crossing: adversarial or sensitive skill content is transmitted outside the process without any approval step, warning, or sanitization.

Content

Scanner excerpt · scripts/propose.py (reported line 388)May include surrounding context.

python
)

    try:
        result = subprocess.run(
            ["claude", "-p", "--output-format", "json"],
            input=prompt, capture_output=True, text=True, timeout=120,
        )

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code path silently sends SKILL.md to an external analysis tool for general improvement generation. The danger is heightened by the skill context: target files are treated as potentially adversarial, so exporting them to an LLM without disclosure, sanitization, or policy checks can leak sensitive content and let hostile prompt text shape downstream recommendations.

Content

No source excerpt is available for this finding.