Back to skill

Security audit

Auto Skill Evolver 1.5.1

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed local tool for improving and rewriting skills, but it needs review because it can run arbitrary local commands and persistently change other skill instructions.

Install only in an isolated development workspace. Point it only at skills you are willing to modify, prefer hash-based or interactive approval, read every diff before applying, and do not feed it untrusted traces, feedback, token files, or commands unless you are comfortable giving them your local account's authority.

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

Error
Location
scripts/train_loop.py:14
Finding

JSON Command Mode Permits Shell-Interpreter Injection

Content
View full analysis
", ">>", "<"]): raise ValueError("Shell operators are not allowed in command string.") args = shlex.split(command, posix=(os.name != "nt")) dangerous_tokens = {"&&", "||", ";", "|", ">", ">>", "<", "2>", "&"} if any(token in dangerous_tokens for token in args): raise ValueError("Shell operators are not allowed. Provide a direct executable command.") return args def run_command(command): """ Runs the command safely with shell disabled and captures output. """ args = parse_safe_command(command) print(f"Executing (safe argv): {args}") try: result = subprocess.run(args, shell=False, check=True, capture_output=True, text=True) return result.stdout, result.stderr except subprocess.CalledProcessError as e: print(f"Command failed with error: {e}") return e.stdout, e.stderr ``` ### Technical Analysis The non-JSON command branch rejects shell operators appearing anywhere in the command string. The JSON branch, however, only rejects an operator when an entire argument exactly equals an entry in `dangerous_tokens`. Consequently, a complete shell expres ...[truncated 2006 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/optimize_skill.py:313
Finding

Untrusted Trace and Feedback Content Is Embedded into the Optimizer Instruction Channel

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (42)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If the skill does not actually implement the conversational routing and approval workflows it claims, operators may invoke it under incorrect assumptions about what actions it can take and what review steps occur. For a meta-skill that edits other skills, misleading capability claims materially increase operational risk even if the flaw is partly documentary.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the skill does not actually implement the conversational routing and approval workflows it claims, operators may invoke it under incorrect assumptions about what actions it can take and what review steps occur. For a meta-skill that edits other skills, misleading capability claims materially increase operational risk even if the flaw is partly documentary.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

If the skill does not actually implement the conversational routing and approval workflows it claims, operators may invoke it under incorrect assumptions about what actions it can take and what review steps occur. For a meta-skill that edits other skills, misleading capability claims materially increase operational risk even if the flaw is partly documentary.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the skill does not actually implement the conversational routing and approval workflows it claims, operators may invoke it under incorrect assumptions about what actions it can take and what review steps occur. For a meta-skill that edits other skills, misleading capability claims materially increase operational risk even if the flaw is partly documentary.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 147)May include surrounding context.

md
1. **Prompt Isolation**: The optimizer is explicitly instructed to treat logs as untrusted data and ignore any instructions found within them.
2. **Multi-layer Security Scans**: Before apply, generated content goes through multiple scanners:
   - Diff-aware high-risk behavior detection (new dangerous commands compared with original version)
   - Absolute high-risk blocklist scan (e.g., `curl`, `rm -rf`, `chmod 777`, disk destructive patterns)
   - Prompt-injection marker scan (e.g., instruction-override phrases, role-escalation terms)
3. **Permission Validation**: Target skill/trace/feedback paths are validated (regular file only, no symlink redirection, required read/write access).
4. **Atomic Writes**: Skill proposals, applied updates, and update reports are written atomically (`tempfile + os.replace`) to prevent partial writes and race-condition corruption.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/security_utils.py (reported line 47)May include surrounding context.

python
subprocess.run(['icacls', path, '/grant:r', f'{username}:(OI)(CI)F'], check=True, capture_output=True)
                
        else:
            # Linux/Mac: chmod 700 (rwx------)
            os.chmod(path, 0o700)
            
    except Exception as e:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/security_utils.py (reported line 177)May include surrounding context.

python
r"\bkillall\b",
    r"\bcurl\b",
    r"\bwget\b",
    r"\b(cat|type)\s+(/etc/passwd|/etc/shadow)\b",
]

PROMPT_INJECTION_PATTERNS = [

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/security_utils.py (reported line 177)May include surrounding context.

python
r"\bkillall\b",
    r"\bcurl\b",
    r"\bwget\b",
    r"\b(cat|type)\s+(/etc/passwd|/etc/shadow)\b",
]

PROMPT_INJECTION_PATTERNS = [

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The training loop is explicitly designed to run arbitrary local commands provided through --command, which exceeds the manifest’s described propose/status/approve evolution workflows. In context, this makes the skill materially more dangerous because a conversational trigger could be turned into a general-purpose local execution mechanism rather than a bounded skill-management flow.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises and documents shell execution, file reads/writes, environment use, and local CLI invocation, but it does not declare any explicit tool scope such as allowed-tools or permissions. That omission weakens policy enforcement and increases the chance that a host agent grants broader capabilities than reviewers or users expect, especially for a self-modifying skill.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 35)May include surrounding context.

Command:

bash
python skills/auto-skill-evolver/scripts/train_loop.py \
  --skill-path "skills/target-skill/SKILL.md" \
  --command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
  --iterations 10 \
  --interval 300 \

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 61)May include surrounding context.

Command:

bash
python skills/auto-skill-evolver/scripts/train_loop.py \
  --skill-path "skills/target-skill/SKILL.md" \
  --command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
  --iterations 10 \
  --interval 300 \

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 70)May include surrounding context.

Command:

bash
python skills/auto-skill-evolver/scripts/train_loop.py \
  --skill-path "skills/target-skill/SKILL.md" \
  --command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
  --iterations 10 \
  --interval 300 \

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 76)May include surrounding context.

Command:

bash
python skills/auto-skill-evolver/scripts/train_loop.py \
  --skill-path "skills/target-skill/SKILL.md" \
  --command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
  --iterations 10 \
  --interval 300 \

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 83)May include surrounding context.

Command:

bash
python skills/auto-skill-evolver/scripts/train_loop.py \
  --skill-path "skills/target-skill/SKILL.md" \
  --command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
  --iterations 10 \
  --interval 300 \

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 89)May include surrounding context.

Command:

bash
python skills/auto-skill-evolver/scripts/train_loop.py \
  --skill-path "skills/target-skill/SKILL.md" \
  --command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
  --iterations 10 \
  --interval 300 \

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 99)May include surrounding context.

Command:

bash
python skills/auto-skill-evolver/scripts/train_loop.py \
  --skill-path "skills/target-skill/SKILL.md" \
  --command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
  --iterations 10 \
  --interval 300 \

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 118)May include surrounding context.

Command:

bash
python skills/auto-skill-evolver/scripts/train_loop.py \
  --skill-path "skills/target-skill/SKILL.md" \
  --command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
  --iterations 10 \
  --interval 300 \

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 123)May include surrounding context.

Command:

bash
python skills/auto-skill-evolver/scripts/train_loop.py \
  --skill-path "skills/target-skill/SKILL.md" \
  --command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
  --iterations 10 \
  --interval 300 \

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 169)May include surrounding context.

Command:

bash
python skills/auto-skill-evolver/scripts/train_loop.py \
  --skill-path "skills/target-skill/SKILL.md" \
  --command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
  --iterations 10 \
  --interval 300 \

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 172)May include surrounding context.

Command:

bash
python skills/auto-skill-evolver/scripts/train_loop.py \
  --skill-path "skills/target-skill/SKILL.md" \
  --command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
  --iterations 10 \
  --interval 300 \

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 175)May include surrounding context.

Command:

bash
python skills/auto-skill-evolver/scripts/train_loop.py \
  --skill-path "skills/target-skill/SKILL.md" \
  --command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
  --iterations 10 \
  --interval 300 \

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 147)May include surrounding context.

md
1. **Prompt Isolation**: The optimizer is explicitly instructed to treat logs as untrusted data and ignore any instructions found within them.
2. **Multi-layer Security Scans**: Before apply, generated content goes through multiple scanners:
   - Diff-aware high-risk behavior detection (new dangerous commands compared with original version)
   - Absolute high-risk blocklist scan (e.g., `curl`, `rm -rf`, `chmod 777`, disk destructive patterns)
   - Prompt-injection marker scan (e.g., instruction-override phrases, role-escalation terms)
3. **Permission Validation**: Target skill/trace/feedback paths are validated (regular file only, no symlink redirection, required read/write access).
4. **Atomic Writes**: Skill proposals, applied updates, and update reports are written atomically (`tempfile + os.replace`) to prevent partial writes and race-condition corruption.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Mapping deictic phrases like 'this skill' or '当前技能' to auto-skill-evolver can cause unintended self-target selection, especially in chat contexts where reference resolution is ambiguous. In a self-modifying skill, accidental self-targeting raises the chance of unauthorized or unsafe mutation of the very guardrails meant to constrain behavior.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/hook_wrapper.py (reported line 25)May include surrounding context.

python
# If the user passed paths, we use them.
    # But for extra security, we could mandate they be in secure_dir, or we just rely on optimize_skill reading them.
    # Since optimize_skill runs locally, reading files is generally okay. 
    # The risk is if the trace file contains malicious content AND is world-readable/writable while we process it.
    
    # Let's assume the trace_file and feedback_file provided by caller are already where they need to be.
    # But to answer the user's request of "restricting access during update":