Back to skill

Security audit

botlearn-examiner

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent OpenClaw exam skill, but it needs Review because it directs running submitted code and retaining identifiable exam history without enough safety and retention boundaries.

Install only if you are comfortable with an examiner skill that may execute submitted code for scoring and keep detailed exam records. Before use, require sandboxed code execution, explicit consent for persistent history, clear retention/deletion controls, and more specific activation phrases.

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
strategies/Main.md:227
Finding
Unsandboxed Execution of User-Submitted Code<![CDATA[ ## Vulnerability Details **File Location**: `strategies/Main.md:227-240` **Vulnerability Type**: Unsafe execution of untrusted code **Risk Level**: High ### Vulnerable Code ```markdown ## Step 6: Scoring & Evaluation ### 6.1 Apply Rubrics For each answered question: **Load scoring criteria** from knowledge/Scoring.md: - Criteria definitions - Point scale (0-5) - Weights **Score each criterion**: - **For automated criteria**: Apply validation rules - Code correctness: Run against tests ``` ### Technical Analysis The Skill accepts code answers from examination participants and instructs the automated scoring process to run those answers against tests. User-submitted code is untrusted input, but the strategy does not require any execution isolation or security controls. No sandbox, container boundary, network restriction, read-only filesystem, privilege reduction, process limit, resource quota, or explicit execution consent is specified. If an implementation follows this strategy by running submissions directly in the Agent or host environment, arbitrary code included in an answer would execute with the privileges of the scoring process. Merely running a fixed test suite does not make a submission safe. Malicious behavior can execute during module import, initialization, test discovery, object construction, or invocation of the function under test. ### Attack Path 1. An attacker starts or participates in a Code Generation examination. 2. The examiner requests a code answer. 3. The attacker submits code containing a malicious initialization routine or function body. 4. The automated scorer follows the instruction to run the submission against tests. 5. The malicious code executes in the scoring environment. 6. Depending on the process privileges and environment, the payload attempts to read files or environment variables, modify accessible data, invoke local commands, make network requests, or consume excessive resources. ### Impact Assessme ...[truncated 688 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Treat every submitted program and generated test artifact as hostile input. - Default to static analysis without execution unless runtime validation is necessary. - Require explicit user authorization before executing submitted code. - Run code only inside a disposable, ephemeral sandbox or container. - Use a dedicated unprivileged account with no access to host credentials or user data. - Disable outbound network access by default. - Mount only the required test fixtures and mount them read-only. - Do not expose host environment variables, sockets, package-manager credentials, cloud metadata, or Agent configuration. - Apply strict CPU, memory, execution-time, disk, process-count, and output-size limits. - Disable privileged containers, host filesystem mounts, host networking, and access to container-management sockets. - Destroy the execution environment after each submission. - Validate submitted language, file count, file size, and execution entry point before testing. - Record execution failures safely without returning secrets or unrestricted process output. - Document the sandbox security boundary and test it against malicious imports, fork bombs, infinite loops, filesystem access, and network access. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
strategies/Main.md:405
Finding
Unspecified Retention of Identifiable Examination Data<![CDATA[ ## Vulnerability Details **File Location**: `strategies/Main.md:405-425` **Vulnerability Type**: Excessive and insufficiently protected sensitive-data retention **Risk Level**: Medium ### Vulnerable Code ```markdown ## Step 9: Session Cleanup & Storage ### 9.1 Save Session Data Store complete session record: ```json { "sessionId": "exam-[timestamp]", "userId": "[user-id]", "config": { /* exam configuration */ }, "questions": [ /* all questions with metadata */ ], "answers": { /* all user answers */ }, "scores": { "questions": { /* individual question scores */ }, "dimensions": { /* dimension scores */ }, "overall": /* overall score */ }, "benchmarks": { /* comparison data */ }, "report": { /* generated report */ }, "timestamp": { "started": "[start time]", "completed": "[end time]", "duration": "[total duration]" } } ``` ``` Related retention instructions include: ```markdown ### 9.2 Update User History - Add to user's exam history - Track progress over time - Calculate improvement trends - Identify patterns in performance ``` The error-handling strategy also states: ```markdown - Always preserve user answers for recovery ``` ### Technical Analysis The strategy requires storage of a user identifier, complete answers, reports, scores, and longitudinal examination history. It does not define: - Whether the user must consent to storage. - A retention period or automatic expiration policy. - The storage location or trust boundary. - Encryption requirements. - Authentication or authorization controls. - Tenant isolation requirements. - Data deletion or correction procedures. - Redaction of credentials, proprietary code, or personal information. - A distinction between temporary recovery data and permanent history. Examination answers can contain source code, internal architecture details, URLs, documents, personal preferences, or other sensitive material. Associating complete answers with a stable us ...[truncated 1590 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Default to session-only storage and require explicit opt-in consent for persistent history. - Explain what will be stored, why it is needed, where it is stored, and how long it will remain. - Avoid storing a stable user ID unless longitudinal history is explicitly requested. - Store scores and minimal metadata instead of complete answers whenever possible. - Detect and redact credentials, secrets, tokens, and unnecessary personal information before persistence. - Define separate, short expiration periods for crash-recovery data and optional historical records. - Automatically delete recovery copies after successful report generation or session resumption. - Encrypt sensitive records both in transit and at rest. - Enforce authenticated, least-privilege access and strict tenant isolation. - Maintain access logs without placing answer content or secrets in logs. - Provide user-accessible export and deletion controls. - Document backup retention and ensure deletion propagates to backups where feasible. - Obtain separate, explicit consent before contributing even anonymized results to benchmarks. - Verify that benchmark anonymization prevents re-identification through session IDs, timestamps, rare configurations, or detailed question-level data. ]]>
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (14)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger list includes very generic English words such as "exam," "test," "evaluation," and "assessment," which are likely to appear in ordinary user conversations unrelated to this skill. This can cause accidental activation, unintended context switching, or skill hijacking from more appropriate handlers, especially in shared or multilingual environments.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The example workflow appears to require English control phrases and output (for example, typing "START" and following English exam instructions) without offering a user language choice. This is not a classic security flaw, but it can create unsafe or unreliable interaction patterns where users misunderstand prompts, submit malformed responses, or are socially steered into actions they did not intend.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
96% confidence
Finding
Using "test" as a trigger conflicts with common built-in commands and ordinary user language. This shadowing can hijack intended commands or conversations, causing the wrong skill to activate and reducing reliability and safety of command routing.

Vague Triggers

Medium
Confidence
97% confidence
Finding
The trigger list includes very broad phrases such as "exam", "test", "evaluation", and short multilingual variants, which can cause the skill to activate during ordinary conversation rather than an explicit request for this specific skill. That creates prompt-routing ambiguity and increases the chance the agent enters an examination workflow unexpectedly, disrupting user intent and potentially suppressing safer or more appropriate handlers.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
94% confidence
Finding
The trigger "run exam" overlaps with the generic action verb "run", which may conflict with built-in execution semantics or user instructions unrelated to this skill. In systems with command dispatch, this can produce routing confusion or unexpected invocation of the examination flow.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
3. **Fair**: Difficulty must be appropriate for the declared level
4. **Transparent**: Scoring criteria must be clear and accessible
5. **Constructive**: Reports must provide actionable feedback, not just scores
6. **Privacy**: Exam results should not be shared without consent
7. **Reproducible**: Same conditions should yield similar results

# Examination Dimensions
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The activation logic says "WHEN user triggers examination" and then proceeds directly into selecting scope, loading question banks, and beginning a session, but it does not define a strict, user-confirmed activation boundary. In a multi-skill environment, ambiguous activation conditions can cause accidental invocation or unintended state changes, especially when paired with the broad trigger set above.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding
Suspicious Unicode normalization or mixed-script content

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding
Suspicious Unicode normalization or mixed-script content

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The strategy describes collecting and storing detailed session contents, answers, scores, report data, timestamps, and user identifiers, but the earlier user-facing introduction does not clearly disclose this scope of collection. Lack of upfront transparency prevents informed consent and makes the data handling more dangerous in a skill centered on evaluating user capability.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The strategy explicitly updates user exam history, tracks progress over time, calculates improvement trends, and identifies behavioral patterns beyond the immediate exam session. This creates persistent profiling of user performance without clear necessity, retention limits, or explicit informed consent, increasing privacy risk if the data is misused, breached, or later repurposed.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill asks users to contribute anonymized results to global benchmarks, which is a secondary data-sharing purpose beyond administering the exam. Even with anonymization claims, performance/configuration data can sometimes be re-identified or combined with other metadata, so this expands data exposure and privacy risk.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
88% confidence
Finding
The trigger "考试" is very short and semantically broad, so it may match many unrelated Chinese-language requests involving exams in general. While not inherently dangerous, it increases accidental activation risk and may interfere with normal multilingual conversations.

Natural-Language Policy Violations

Low
Confidence
89% confidence
Finding
This markdown file includes several dimension headings with Chinese parenthetical labels such as "信息检索" and "内容理解" while the rest of the document is in English. Because the file does not explain that it is intended to be bilingual or offer a user language/locale choice, it may violate the language/locale policy against forcing a specific language without opt-in.

Static analysis

No suspicious patterns detected.