Back to skill

Security audit

Evolution Toolkit

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent local self-improvement toolkit, but it needs review because it can persist sensitive behavioral memory and send local playbooks/test cases to Gemini using workspace credentials with limited disclosure.

Review before installing, especially if your workspace contains private notes, customer data, proprietary prompts, or broad .secrets files. Use a dedicated test workspace, prefer explicit environment variables over workspace .secrets, avoid running the optimizer on confidential playbooks unless external Gemini processing is acceptable, and treat the thinking-partner protocol as opt-in rather than a default behavior policy.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
protocols/thinking-partner.md:5
Finding
Cross-Task Agent Behavior Hijacking Through a Default Personalized Protocol<![CDATA[ ## Vulnerability Details **File Location**: `protocols/thinking-partner.md:5, 21-93, 160-181` **Vulnerability Type**: Agent instruction and goal hijacking **Risk Level**: High ### Vulnerable Content ```markdown **How to use:** Ergo reads this before engaging with Miguel on any non-trivial problem. The goal is not faster answers. It's better thinking. ``` The protocol then imposes behavior such as: ```markdown ### Phase 1 — Exploration _Miguel doesn't know what he thinks yet._ **Do:** - Ask the question that opens the space, not the one that closes it - "What does success look like to you here, not in output terms but in terms of how you'd feel?" - "What's the thing about this you haven't said yet?" - "What are you most trying to avoid — not achieve, but avoid?" **Don't:** - List options. He hasn't generated his own yet. - Recommend. You don't know his values here. - Structure the problem. That's his job at this stage. ``` ```markdown ### Phase 4 — Decision _A choice needs to be made. This is the most dangerous phase._ **Do:** - Play devil's advocate HARD - "What would have to be true for the OTHER option to be right?" - "Are you deciding what you want to do, or rationalizing what you've already decided?" - "What's the decision you're NOT making here — the one this forecloses?" - "What's the simplest test you could run before committing?" **Don't:** - Say "I would go with X." Even if you think you know. - Make the choice legible before he's struggled with it - Resolve the tension he needs to feel ``` ```markdown ### Phase 5 — Execution _Decided. Now doing._ **Do:** - Reduce friction ruthlessly - Take the mechanical work - Move fast, don't slow down for reflection **Don't:** - Re-examine the decision - Introduce doubt at the moment of action - Add scope unless it's critical ``` ### Technical Analysis The protocol directs the agent to load a personalized behavioral policy before every non-trivial interaction with a named user. This scope c ...[truncated 2116 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace the default-use statement with explicit opt-in language: - Load the protocol only when the user requests Socratic questioning or thinking-partner behavior. - Do not apply it automatically to unrelated tasks. 2. Remove references that bind the skill to a named individual or a universal default engagement style. 3. Add an explicit precedence rule stating that system instructions, safety requirements, and the user's current request override the protocol. 4. Treat phase classifications as suggestions rather than mandatory behavior. 5. Permit direct answers, recommendations, planning, and decision review whenever the user requests them. 6. Replace absolute instructions such as “Do not re-examine the decision” with contextual guidance that preserves safety review and user autonomy. 7. Keep the scope consistent with `SKILL.md`: problem-framing tasks only, unless the user explicitly opts in. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:23
Finding
Unpinned Third-Party Package Execution in Installation Instructions<![CDATA[ ## Vulnerability Details **File Location**: `README.md:23` **Vulnerability Type**: Mutable supply-chain dependency execution **Risk Level**: Medium ### Vulnerable Content ```bash npx clawhub install ergopitrez/evolution-toolkit ``` ### Technical Analysis The documented installation command invokes `npx clawhub` without specifying an exact audited version. Depending on the local environment and package-manager state, `npx` can retrieve and execute the current registry version of the `clawhub` package. Because the package reference is mutable and no integrity digest or signature is supplied, the code executed during installation can differ from the version reviewed when these instructions were written. A compromised package publisher, registry account, dependency, or later malicious release could therefore turn the installation procedure into a code-execution channel. The audit did not establish that the referenced package is currently malicious. The vulnerability is the lack of version and integrity controls around executable installation tooling. ### Attack Path 1. An attacker compromises the `clawhub` package, one of its dependencies, or its publishing account. 2. The attacker publishes a malicious version under the same package name. 3. An operator follows the README and runs the unpinned `npx` command. 4. The package manager downloads the mutable current version. 5. Package lifecycle or CLI code executes with the invoking user's privileges. 6. The malicious package can access files, credentials, network resources, and other assets available to that user. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the user running the installation command. The accessible scope may include the user's workspace, environment variables, package-manager credentials, SSH configuration, and other files available to the account. No privilege escalation beyond the invoking user's existing permission ...[truncated 181 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the installer to an exact audited version, for example `clawhub@x.y.z`. 2. Publish and verify a cryptographic checksum or package signature before execution. 3. Use a lockfile where the installation workflow permits one. 4. Document the expected package publisher, registry, version, and integrity value. 5. Recommend running installation with an unprivileged account in an isolated environment. 6. Prefer downloading and inspecting the installer before execution rather than relying on an implicitly mutable `npx` resolution. 7. Add a maintenance process for reviewing and deliberately updating the pinned installer version. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/skill-optimizer.js:69
Finding
Automatic Workspace Secret Access and External Transmission of Local Playbook Content<![CDATA[ ## Vulnerability Details **File Location**: `scripts/skill-optimizer.js:69-89, 139-158, 177-279` **Vulnerability Type**: Excessive credential access and insufficiently guarded external data disclosure **Risk Level**: Medium ### Vulnerable Code The script automatically reads the workspace-wide `.secrets` file: ```javascript function loadSecrets() { const secretsPath = path.join(WORKSPACE, '.secrets'); const secrets = {}; if (!fileExists(secretsPath)) return secrets; fs.readFileSync(secretsPath, 'utf8').split('\n').forEach((line) => { const match = line.match(/^([A-Z0-9_]+)=(.+)$/); if (match) secrets[match[1]] = match[2].trim(); }); return secrets; } function getApiKey(config = {}) { const envKey = process.env.GEMINI_API_KEY || process.env.GOOGLE_API_KEY; if (envKey) return envKey; const secrets = loadSecrets(); if (secrets.GEMINI_API_KEY) return secrets.GEMINI_API_KEY; if (secrets.GOOGLE_API_KEY) return secrets.GOOGLE_API_KEY; if (config.apiKeyEnvVar && process.env[config.apiKeyEnvVar]) { return process.env[config.apiKeyEnvVar]; } return null; } ``` The API key is embedded in the request URL: ```javascript const options = { hostname: 'generativelanguage.googleapis.com', path: `/v1beta/models/${model}:generateContent?key=${apiKey}`, method: 'POST', headers: { 'Content-Type': 'application/json' } }; ``` Configured test cases and local playbook content are placed into prompts sent to the external API: ```javascript async function generateOutput(skill, testCase, playbook, apiKey) { const prompt = `You are improving a reusable playbook through realistic task trials. TASK CASE: ${JSON.stringify(testCase, null, 2)} PLAYBOOK: """ ${playbook} """ GENERATION INSTRUCTION: ${skill.generatorPrompt} Output ONLY the final artifact for this test case.`; return callGemini(prompt, apiKey, skill.model); } ``` The improvement flow also sends up to 4,000 characters from the current playbook: ```javasc ...[truncated 3208 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove automatic parsing of the workspace-wide `.secrets` file. 2. Require one explicitly named environment variable, preferably configured through `apiKeyEnvVar`. 3. If file-based credentials are necessary, use a dedicated credential file containing only the Gemini key and enforce restrictive file permissions. 4. Avoid loading unrelated secret values into a general JavaScript object. 5. Use an authorization header instead of a URL query parameter when supported by the API. 6. Before the first external request, display the destination and categories of data to be transmitted and require explicit operator confirmation. 7. Add a `--dry-run` or `--preview-payload` mode that performs no network request and shows redacted outbound content. 8. Support field-level redaction and configurable exclusion patterns for credentials, personal data, customer identifiers, and confidential text. 9. Clearly document that playbooks, test cases, generated outputs, and evaluation content are sent to Google Gemini. 10. Add request timeouts, response-size limits, and sanitized error handling so credentials and sensitive response bodies are not exposed in logs. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (31)

Ae1

High
Category
analysis-evasion
Content
`scripts/session-imprint.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/session-imprint.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/cognitive-fingerprint.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/cognitive-fingerprint.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/contradiction-scanner.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/contradiction-scanner.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/predict.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/predict.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/skill-optimizer.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/skill-optimizer.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/skill-optimizer.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/socratic-mode.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/socratic-mode.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/session-coherence.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
`scripts/session-coherence.js`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
}
    }
  });
  return directives;
}

function extractFilePaths(content, source) {
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The README instructs users to run `npx clawhub install ergopitrez/evolution-toolkit` without pinning the `clawhub` package to a specific version. Because `npx` fetches and executes the latest matching package at runtime, a compromised upstream package, typo-squatted package, or malicious new release could result in arbitrary code execution on the operator's machine during installation.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The phase-detection rules use very broad trigger phrases such as 'Build', 'Write', and 'Create' to infer Execution mode. In practice, ordinary exploratory or advisory requests can contain these words, causing the agent to prematurely switch into a mode that 'reduce[s] friction ruthlessly' and 'move[s] fast' while suppressing re-examination. That can bypass useful caution or clarification and lead to over-eager action on ambiguous requests.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The script’s header and usage text present it as a computation/display tool, but later logic automatically persists generated fingerprints to disk by default. Because these fingerprints are derived from potentially sensitive text samples and stored in a user workspace history file, the undocumented persistence can violate user expectations and create privacy risk.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The script auto-saves single-run fingerprints unless --no-save is passed, which means users may persist behavioral or cognitive-profile metadata without realizing it. Even if the raw text is not stored, the resulting history can still reveal patterns about a user’s writing, reasoning style, and activity over time, making the silent default persistence privacy-sensitive.

Intent-Code Divergence

Medium
Confidence
91% confidence
Finding
The module header says the scanner will surface 'Orphaned decisions' and 'Model/tool name drift'. In the implementation, there is no logic for orphaned decision detection, and although TOOL_DRIFT is defined, it is never used to scan content or report findings, so the documented capabilities actively overstate what the script does.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The script generates a sensitive behavioral/profile report from memory logs and writes it to a persistent file under the workspace without an explicit consent step, privacy warning, or opt-in save behavior. In this context, the output includes recurring themes, emotional markers, and lessons learned, which can expose personal or operationally sensitive information if the workspace is shared, synced, backed up, or later accessed by other tools/users.

Ssd 3

Medium
Confidence
90% confidence
Finding
The script is explicitly designed to preserve prior session context for future runs, creating a persistent natural-language memory channel. In agent environments, such channels can unintentionally carry forward sensitive instructions, internal data, or secrets into later sessions where they may be exposed more broadly than intended.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The tool persistently stores free-form user reflections plus copied content from CURRENT.md without an explicit consent, privacy, or retention warning at the point of capture. Because users may enter sensitive operational notes, credentials, personal data, or internal context, this creates a durable disclosure channel within the workspace that later users, agents, backups, or sync processes may access.

Ssd 3

Medium
Confidence
95% confidence
Finding
Copying the first 20 lines of CURRENT.md into each persistent imprint duplicates potentially sensitive task context into an additional file, increasing the attack surface and long-term exposure of that information. Even without network exfiltration, this broadens disclosure to any process or person with access to the workspace or its backups.

Static analysis

No suspicious patterns detected.