Back to skill

Security audit

Auto Skill Evolver

Security checks for vulnerabilities and agentic risk

Overview

This skill is meant to improve other skills, but it has broad local command and file-changing power with under-scoped restore and command safeguards.

Install only in an isolated development environment and point it at a narrow skills directory you are willing to modify. Do not expose its command, approval, or restore functions to untrusted input, and review proposed diffs and backup restores manually before applying them.

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:22
Finding

Command Validation Can Be Bypassed Through Shells and Interpreters

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 ``` ### Technical Analysis The validation only rejects shell operators when they appear directly in the original non-JSON command string or as standalone elements of the final argument list. It does not restrict which executable may be launched. Setting `shell=False` prevents Python from implicitly invoking a command shell, but it does not make arbitrary executables safe. A caller can explicitly choose ...[truncated 2140 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/version_control.py:82
Finding

Version Restore Accepts Arbitrary Files and Bypasses Update Security Controls

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (42)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the advertised workflow says propose/status/approve orchestration but the actual capability set includes direct backup, restore, and file-management operations, users may misjudge the trust boundary and grant access too broadly. In a meta-skill that edits other skills, hidden or underdeclared file-management power increases the blast radius of misuse or compromise.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the advertised workflow says propose/status/approve orchestration but the actual capability set includes direct backup, restore, and file-management operations, users may misjudge the trust boundary and grant access too broadly. In a meta-skill that edits other skills, hidden or underdeclared file-management power increases the blast radius of misuse or compromise.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

If the advertised workflow says propose/status/approve orchestration but the actual capability set includes direct backup, restore, and file-management operations, users may misjudge the trust boundary and grant access too broadly. In a meta-skill that edits other skills, hidden or underdeclared file-management power increases the blast radius of misuse or compromise.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

If the advertised workflow says propose/status/approve orchestration but the actual capability set includes direct backup, restore, and file-management operations, users may misjudge the trust boundary and grant access too broadly. In a meta-skill that edits other skills, hidden or underdeclared file-management power increases the blast radius of misuse or compromise.

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 = [

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill explicitly describes capabilities to read and write local files, execute local CLI commands, and process logs, yet it declares no tool scope such as permissions or allowed-tools. In a self-modifying skill, missing capability boundaries materially increases risk because the runtime may grant broader file, shell, environment, or network access than reviewers and users expect.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description states the skill is optimized to recognize Chinese/English intents, which imposes a specific language/locale scope in natural-language behavior. The file does not present this as an opt-in choice or clearly justify the restriction as a region-specific tool, so it may violate language/locale policy expectations.

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.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger design is explicitly limited to Chinese and English natural phrases, and the surrounding documentation does not offer locale selection or broader language support. This is a natural-language policy concern because the skill behavior is language-constrained by default.

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":

Static analysis

No suspicious patterns detected.