Back to skill

Security audit

Workspace

Security checks for vulnerabilities and agentic risk

Overview

This skill is an automated project changer that can read agent memory, send code/context to configurable LLM endpoints, and auto-commit/push changes, so it needs careful review before installation.

Install only in a constrained, trusted environment. Keep full-auto, scheduling, GitHub posting, cross-persona recall, and host test execution disabled unless you have reviewed the exact repositories, LLM endpoint, credentials, and rollback process. Do not use it on private or sensitive code without redaction and an explicit external-data policy.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/scanner.py:142
Finding

Sensitive Persona Memory and Repository Content Are Transmitted to a Configurable External LLM Endpoint

Content
View full analysis

Vulnerability Details

File Location: scripts/memory.py:192-243, scripts/scanner.py:35-42, scripts/scanner.py:142-171, scripts/llm.py:18-45, and scripts/llm.py:68-79
Vulnerability Type: Sensitive information disclosure through excessive access and external transmission
Risk Level: High

Vulnerable Code

scripts/memory.py:192-243:

python
WORKSPACE_FILES = ("SOUL.md", "USER.md", "IDENTITY.md", "MEMORY.md", "AGENTS.md", "TOOLS.md")

def __init__(self, recall_persona: str = "", memory_source: str = "auto") -> None:
    self.effective_persona = (recall_persona.strip().lower() or detect_persona())
    if self.effective_persona == "master":
        self.effective_persona = "main"
    self.workspace = get_workspace_for_persona(self.effective_persona)
    self.context_persona = self.effective_persona
    self.source = MemorySource(memory_source)
    self.openclaw_mem = OpenClawMemory(self.workspace)
    self.hawkbridge_mem = HawkBridgeMemory(self.workspace)
    self._use_openclaw = self.source in (MemorySource.OPENCLAW, MemorySource.AUTO)
    self._use_hawkbridge = self.source in (MemorySource.HAWKBRIDGE, MemorySource.AUTO)
    if self.source == MemorySource.AUTO:
        self._use_openclaw = True
        self._use_hawkbridge = self.hawkbridge_mem.is_available()

def load_context_files(self) -> dict[str, str]:
    ctx = {}
    for fname in self.WORKSPACE_FILES:
        fp = self.workspace / fname
        if fp.exists() and fp.is_file():
            try:
                ctx[fname] = fp.read_text(encoding="utf-8", errors="ignore")
            except OSError:
                ctx[fname] = ""
        else:
            ctx[fname] = ""
    return ctx

def get_context_summary(self) -> str:
    ctx = self.load_context_files()
    labels = {
        "SOUL.md": "价值观/风格",
        "USER.md": "偏好/习惯",
        "IDENTITY.md": "项目定位",
        "MEMORY.md": "长期记忆",
 
...[truncated 5152 chars]
Remediation
View remediation

Remediation Suggestions

  1. Disable persona-memory inclusion by default. Source-code analysis should operate without MEMORY.md, TOOLS.md, message history, or unrelated workspace files.
  2. Add explicit switches for each sensitive data class, such as --include-user-preferences and --include-memory, with secure defaults that keep them disabled.
  3. Before transmission, display the endpoint hostname, files included, approximate payload size, and data categories, then require affirmative consent.
  4. Enforce HTTPS and maintain an explicit allowlist of approved LLM provider domains. Reject URLs containing user information, unexpected ports, local metadata addresses, or unapproved hosts.
  5. Add secret detection and deterministic redaction for API keys, access tokens, private keys, credentials, connection strings, email addresses, and other personal information.
  6. Prevent cross-persona selection unless an authorization policy explicitly permits access. Do not treat a CLI string as sufficient authorization.
  7. Separate source-code prompts from persona-context prompts and minimize each excerpt to the content strictly needed for the current check.
  8. Document exactly which local files and databases are read and which content is transmitted externally.
  9. Avoid silently reading API credentials from multiple providers. Require explicit provider selection and bind each credential to its expected endpoint.

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/auto-evolve.py:1819
Finding

Remote LLM Output Can Replace Repository Code and Be Automatically Committed and Pushed

Content
View full analysis

Vulnerability Details

File Location: scripts/auto-evolve.py:1330-1403, scripts/auto-evolve.py:1460-1660, scripts/auto-evolve.py:1727-1889, and scripts/auto-evolve.py:5707-5732
Vulnerability Type: Externally supplied code retrieval and automated supply-chain modification
Risk Level: Critical

Vulnerable Code

scripts/auto-evolve.py:1386-1403:

python
req = urllib.request.Request(
    endpoint,
    data=json.dumps(body).encode("utf-8"),
    headers=headers,
    method="POST",
)
with urllib.request.urlopen(req, timeout=60) as resp:
    data = json.loads(resp.read().decode("utf-8"))
    if "anthropic" in endpoint:
        text_blocks = [
            b.get("text", "") for b in data.get("content", [])
            if b.get("type") == "text" and b.get("text", "").strip()
        ]
        if text_blocks:
            content_text = max(text_blocks, key=len)

scripts/auto-evolve.py:1819-1889:

python
# Execute LLM-driven optimization
try:
    new_code, result_msg = execute_optimization(finding_dict, code, repo)
except Exception as e:
    print(f"  ❌ [{change_item.id}] {file_path}: LLM execution error ({e})")
    stats["failed"] += 1
    continue

if not new_code:
    print(f"  ⏭️  [{change_item.id}] {file_path}: {result_msg or 'no LLM output'}")
    stats["skipped_llm"] += 1
    record_learning(finding_dict, result_msg or "skipped_llm: no valid code returned", str(repo_path))
    continue

# Skip if no actual change was made
if new_code.strip() == code.strip():
    print(f"  ⏭️  [{change_item.id}] {file_path}: no change produced")
    stats["skipped_llm"] += 1
    record_learning(finding_dict, "skipped_llm: no change produced", str(repo_path))
    continue

# Quality gate: py_compile check
quality_ok, quality_err = _quality_check(file_path, new_code)
if not quality_ok:
    print(f"  ❌ [{change_item.id}] {file_path}: quality gate failed — {qu
...[truncated 4214 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove automatic application of LLM-generated code. Treat all model responses as untrusted suggestions.
  2. Require a human-reviewed diff before any generated change can be written, committed, or pushed.
  3. Write proposed changes to an isolated patch artifact or dedicated review branch rather than replacing the working tree directly.
  4. Open a pull request instead of directly pushing generated modifications to protected branches.
  5. Enforce branch protection, mandatory reviewers, signed commits, and required security checks.
  6. Run static security analysis that rejects newly introduced network calls, process execution, credential access, persistence, unsafe deserialization, dynamic imports, and security-sensitive configuration changes.
  7. Execute validation in an ephemeral sandbox with no host credentials, no network access, read-only source inputs, and strict CPU, memory, process, and time limits.
  8. Pin approved model providers and verify TLS. Do not accept arbitrary base URLs for code-generation operations.
  9. Restrict generated changes to narrow hunks rather than accepting complete replacement files.
  10. Display the exact generated diff and security-check results, and require explicit approval for every file.
  11. Never expose repository push credentials to the process responsible for obtaining untrusted model output.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/analyzers.py:137
Finding

Repository Test Suites Are Executed on the Host Without Isolation

Content
View full analysis

Vulnerability Details

File Location: scripts/analyzers.py:137-160 and scripts/auto-evolve.py:2008-2031
Vulnerability Type: Unsafe execution of untrusted repository code
Risk Level: High

Vulnerable Code

scripts/analyzers.py:137-160:

python
def run_tests_for_hash(repo: Repository, ref: str) -> dict:
    """Run tests at a given git ref."""
    repo_path = repo.resolve_path()
    if not (repo_path / "pytest.ini").exists() and not (repo_path / "pyproject.toml").exists():
        return {"passed": False, "tests_run": 0, "failures": 0, "output": "no test config"}
    try:
        result = subprocess.run(
            ["python3", "-m", "pytest", "--tb=short", "-q"],
            cwd=str(repo_path),
            capture_output=True,
            text=True,
            timeout=120,
        )
        output = (result.stdout + result.stderr)[-500:]
        return {
            "passed": result.returncode == 0,
            "tests_run": 0,
            "failures": 1 if result.returncode != 0 else 0,
            "output": output,
        }
    except subprocess.TimeoutExpired:
        return {"passed": False, "tests_run": 0, "failures": 0, "output": "timeout"}
    except Exception as e:
        return {"passed": False, "tests_run": 0, "failures": 0, "output": str(e)}

scripts/auto-evolve.py:2008-2031:

python
def run_tests_for_hash(repo: Repository, ref: str) -> dict:
    repo_path = str(repo.resolve_path())
    if subprocess.run(["which", "pytest"], capture_output=True).returncode != 0:
        return {"passed": None, "coverage": None, "duration": 0.0, "error": "pytest not found"}
    subprocess.run(["git", "stash", "-q"], cwd=repo_path)
    try:
        subprocess.run(["git", "checkout", "-q", ref], cwd=repo_path)
        start = time.time()
        r = subprocess.run(["pytest", "--tb=short", "-q"], cwd=repo_path, capture_output=True, text=True, timeou
...[truncated 3006 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not execute repository code as part of static scanning by default.
  2. Require explicit user approval before running tests from a repository that has not been marked trusted.
  3. Run tests in a disposable container or virtual machine with:
    • No host credentials or inherited secret environment variables.
    • Network access disabled by default.
    • A read-only source mount and a separate temporary writable directory.
    • A non-root user and dropped Linux capabilities.
    • Process, memory, CPU, file-size, and time limits.
    • No access to the host Docker socket, SSH agent, home directory, or OpenClaw state.
  4. Sanitize the environment and use a known interpreter and dependency set rather than host-level pytest plugins.
  5. Disable automatic third-party pytest plugin loading, for example by setting PYTEST_DISABLE_PLUGIN_AUTOLOAD=1, while still treating local tests as untrusted.
  6. Separate static analysis results from dynamic test results so declining execution does not prevent a scan.
  7. Clearly document that tests are executable code and show the exact command and sandbox policy before execution.
  8. For full-auto generated changes, perform tests only after human review and only inside the isolated environment.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (118)

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

Critical
Category
Data Flow
Confidence
98% confidence
Finding

The tool collects API keys and base URLs from environment variables, local config, and agent model files, then sends prompts containing repository code, persona context, workspace files, and preferences to externally configured LLM endpoints. Because the endpoint can be influenced by environment/config and there is no strong consent gate or redaction step, this can exfiltrate sensitive code and memory to third-party services or attacker-controlled endpoints.

Content

Scanner excerpt · scripts/auto-evolve.py (reported line 1182)May include surrounding context.

python
endpoint = base_url.rstrip("/") + endpoint_suffix
        try:
            req = urllib.request.Request(endpoint, data=body, headers=headers, method="POST")
            with urllib.request.urlopen(req, timeout=120) as resp:
                data = json.loads(resp.read().decode("utf-8"))
                if "anthropic" in endpoint or endpoint_suffix == "/v1/messages":
                    text_blocks = [

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

Critical
Category
Data Flow
Confidence
98% confidence
Finding

This refactor path sends full file contents to a remote LLM for automated code modification, using credentials and base URLs harvested from local environment/config. In full-auto mode it can transmit proprietary source code externally and then apply returned code automatically, making both confidentiality and integrity risks significant.

Content

Scanner excerpt · scripts/auto-evolve.py (reported line 1392)May include surrounding context.

python
headers=headers,
                method="POST",
            )
            with urllib.request.urlopen(req, timeout=60) as resp:
                data = json.loads(resp.read().decode("utf-8"))
                if "anthropic" in endpoint:
                    text_blocks = [

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

Critical
Category
Data Flow
Confidence
94% confidence
Finding

The GitHub posting workflow performs authenticated outbound requests based on environment-derived tokens and repository context, enabling automatic publication of scan results. In this skill, those results can be informed by persona memory and project context, so external disclosure to GitHub is a real confidentiality risk if enabled unexpectedly.

Content

Scanner excerpt · scripts/auto-evolve.py (reported line 3927)May include surrounding context.

python
req.add_header("X-GitHub-Api-Version", "2022-11-28")
        req.add_header("User-Agent", "auto-evolve/4.2")
        try:
            with urllib.request.urlopen(req, timeout=15) as resp:
                if resp.status in (200, 201):
                    print(f"[GitHub] Posted comment on PR #{pr_number}")
                    return True

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

Critical
Category
Data Flow
Confidence
94% confidence
Finding

Creating GitHub issues with scan results is an external data transmission path that can disclose internal repository details and inferred context. Since this tool aggregates code findings and other context automatically, the outbound publication can leak sensitive operational information.

Content

Scanner excerpt · scripts/auto-evolve.py (reported line 3948)May include surrounding context.

python
req.add_header("X-GitHub-Api-Version", "2022-11-28")
        req.add_header("User-Agent", "auto-evolve/4.2")
        try:
            with urllib.request.urlopen(req, timeout=15) as resp:
                if resp.status in (200, 201):
                    result = json.loads(resp.read())
                    print(f"[GitHub] Created issue #{result.get('number', '?')}")

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

Critical
Category
Data Flow
Confidence
92% confidence
Finding

Posting issue comments is another authenticated external transmission sink. In a tool that mixes code analysis with persona/history context, this can expose internal details beyond what users expect from a scanner.

Content

Scanner excerpt · scripts/auto-evolve.py (reported line 3970)May include surrounding context.

python
req.add_header("X-GitHub-Api-Version", "2022-11-28")
        req.add_header("User-Agent", "auto-evolve/4.2")
        try:
            with urllib.request.urlopen(req, timeout=15) as resp:
                if resp.status in (200, 201):
                    print(f"[GitHub] Posted comment on issue #{issue_number}")
                    return True

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

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/auto-evolve.py (reported line 3989)May include surrounding context.

python
req.add_header("Accept", "application/vnd.github+json")
        req.add_header("X-GitHub-Api-Version", "2022-11-28")
        try:
            with urllib.request.urlopen(req, timeout=15) as resp:
                issues = json.loads(resp.read())
                for issue in issues:
                    if "Auto-Evolve Scan" in issue.get("title", ""):

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

Critical
Category
Data Flow
Confidence
93% confidence
Finding

Updating an existing GitHub issue is an authenticated outbound publication path similar to issue creation and commenting. Because the body can summarize scan results derived from local code and contextual memory, it can leak internal information externally.

Content

Scanner excerpt · scripts/auto-evolve.py (reported line 4011)May include surrounding context.

python
req.add_header("X-GitHub-Api-Version", "2022-11-28")
        req.add_header("User-Agent", "auto-evolve/4.4")
        try:
            with urllib.request.urlopen(req, timeout=15) as resp:
                return resp.status in (200, 201)
        except Exception as e:
            print(f"[GitHub] Failed to update issue #{issue_number}: {e}")

Self-Modification

High
Category
Rogue Agent
Confidence
91% confidence
Finding

The README promotes a self-evolving system that runs in the background and includes commands such as set-mode full-auto, confirm, rollback, and scheduled execution, which together describe autonomous project modification behavior. In the context of an agent skill, self-modification and unattended execution materially increase the risk of unauthorized or unsafe code changes, persistence, and difficult-to-audit actions if guardrails fail or are misconfigured.

Content

Scanner excerpt · README.md (reported line 3)May include surrounding context.

md
# Auto-Evolve v4.3

**Make your projects self-evolve — install once, they keep getting better.**

> You install it once. It runs in the background. Your projects get smarter — automatically.

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · references/RISK-CLASSIFICATION.md (reported line 19)May include surrounding context.

md
**Examples:**
- Fix typos in README or comments
- Update SKILL.md documentation
- Add/remove/fix code comments
- Lint fixes (format, import sorting)
- Add `.gitignore` entries

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Cross-persona memory recall allows this skill to access context from other personas' workspaces and message stores, exceeding least-privilege expectations for a scanner. Because the recalled content is later used in prompts and outputs, it creates a serious privacy and data-boundary violation risk.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill mines recent stored conversations to infer likes/dislikes and preferences, repurposing historical message content for future scans. This can expose sensitive behavioral or contextual information unrelated to the current repository and violates data minimization principles.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Workspace context files and memory summaries are aggregated and injected into prompts used for analysis, creating a direct path from local private files into external services. In this skill, that data can include values, identity, long-term memory, tool config, and team architecture, making leakage especially sensitive.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

In full-auto mode, the skill writes LLM-generated modifications directly to files and commits them without per-action confirmation. This is dangerous because untrusted remote model output can alter source code integrity, and the automation reduces the opportunity for human review before changes are persisted and potentially pushed.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

GitHub issue creation, issue updating, and PR commenting add remote publication capabilities that exceed a local scanner's expected scope. In combination with code analysis and persona-context ingestion, this becomes materially dangerous because the skill can both gather and broadcast sensitive information with authenticated API access.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The GitHub posting workflow can expose recalled persona context, preferences, and learnings in externally visible artifacts. Even if only summaries are posted, the combination of internal memory-derived analysis and public issue/comment creation creates a real disclosure channel to third parties.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code sends repository file contents together with persona summary, preferences, and learnings to an external LLM service via base_url/api_key configuration. This can exfiltrate sensitive source code and personal/contextual memory to a third party without clear minimization, consent, or trust-boundary controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file documents that after each commit, the skill adds a comment and closes related GitHub issues automatically. Because this behavior changes external project state and may affect workflows, the description should include an explicit warning or caution so users understand the impact before enabling or using it.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This line describes creating a git tag, pushing to origin, and creating a GitHub release, all of which modify remote state and may publish artifacts externally. The markdown does not include any caution that the command performs remote, potentially irreversible actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README explicitly markets background execution and automatic improvement of projects, but it does not clearly disclose what kinds of modifications may occur, what files or repositories may be monitored, or when user confirmation is required. For an agent skill that can inspect and execute changes on projects, this ambiguity can cause users to enable persistent autonomous behavior without informed consent, increasing the chance of unintended code changes or continuous monitoring.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documented scan --github-event pr_review capability indicates results may be posted to GitHub, but the README does not clearly warn that findings, code-derived summaries, or metadata could be transmitted to an external service. In a tool that analyzes potentially private repositories, lack of disclosure can lead to accidental data exposure outside the local environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README markets the skill as something that installs once, runs in the background, and makes projects 'automatically better' without repeated user intervention, but it does not immediately disclose that this implies continuous monitoring, possible automated code changes, and project data processing. In an agent skill context, this can cause users to enable privileged automation without understanding the operational and privacy risks, increasing the chance of unintended repository modifications or silent collection/retention of sensitive project information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The quick-start section directly instructs users to enable full-auto mode and a recurring schedule every 10 minutes, but it provides no warning at the point of use about autonomous execution, repository modification, resource usage, or the need for review gates. Because users often copy-paste quick-start commands verbatim, this creates a realistic path to unintentionally granting an agent continuous authority over codebases.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation explicitly states that complete cross-persona conversation history and owner preference recall are retained across multiple memory layers, which materially increases the risk of over-collection, long-term retention, and accidental disclosure of sensitive natural-language data. In an agent ecosystem, such memory can contain secrets, internal code context, operational habits, or personal data that may be surfaced to the wrong workflow, persona, or repository task if isolation is imperfect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill prominently markets continuous automatic improvement and later states it can execute changes and record learnings, but it does not provide an upfront warning that repository contents may be modified. In an agent context, under-disclosed write behavior is dangerous because users may invoke scanning or inspection features expecting analysis-only behavior while the system may alter files or persist state.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The command docs state that scan --dry-run is a 'Preview mode (no execution)'. Elsewhere, the skill explicitly says scan workflow step 4 can 'Execute / Notify / Record' and that auto-evolve 'executes improvements', so the documentation presents scan as having execution side effects while this specific flag claims none. This is an intent-level contradiction in the documentation about whether scanning performs actions beyond inspection.

Content

No source excerpt is available for this finding.