Back to skill

Security audit

Firstprinciples thinking

Security checks for vulnerabilities and agentic risk

Overview

The skill’s reasoning purpose is mostly coherent, but its bundled scripts can silently save raw problem text and generated Markdown memory under the user’s home directory.

Review before installing or using the bundled scripts with sensitive personal, business, legal, financial, or strategic problems. The skill does not show exfiltration or destructive behavior, but its helper scripts can keep a long-lived local record of what you submit; use it only if that local persistence is acceptable and inspect or remove ~/.openclaw/workspace/memory/firstprinciples when needed.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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)

T02 · Agent Memory Poisoning

Warning
Location
scripts/analyze_problem.py:40
Finding

Persistent Markdown Injection into Agent Memory

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/lib/storage.py:7
Finding

Automatic Retention of Raw User Content with Process-Default File Permissions

Content
View full analysis
Remediation
View remediation
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose presents the skill as an intellectual framework for first-principles analysis. The supplied code does not implement reasoning logic, assumption-challenging, or solution synthesis; instead, it retrieves an existing case record from storage and formats it into a markdown document. While some exported field names relate to first-principles concepts, the code’s actual function is case export tooling. This is a materially different primary purpose and includes undeclared file I/O and CLI-based export behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The declared description promises a broader first-principles reasoning capability: identifying fundamentals, challenging assumptions, and rebuilding better solutions. The supplied code only exposes a command-line tool that extracts inferred assumptions from input text via infer_assumptions. That is related to one subtask of the description, but it does not demonstrate the broader reasoning, truth decomposition, or solution rebuilding behavior claimed. There are no concerning undeclared permissions or resource accesses, but the primary purpose of the code chunk is materially narrower than the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a conceptual reasoning skill focused on first-principles analysis. The supplied code does not implement any reasoning, problem decomposition, or assumption-challenging functionality. Instead, it performs a setup task: importing a storage utility, creating or verifying storage, and printing the resulting path. This is a materially different primary purpose and introduces filesystem/storage behavior that is not reflected in the declared description or permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a conceptual reasoning aid, but the supplied code chunk does not perform reasoning, assumption-challenging, or solution reconstruction. Instead, it provides storage and bookkeeping utilities for cases and patterns, including filesystem writes and persistent memory management. Those are materially different capabilities from the declared purpose and involve resource access not reflected in the description or permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

There is a clear mismatch between the declared description and the actual code behavior. The description claims a cognitive/problem-solving function centered on first-principles analysis, but the supplied code only retrieves case records from storage and outputs selected fields in JSON format. This is a materially different primary purpose and introduces undeclared data-access/reporting capability. No evidence in the code supports the claimed reasoning functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a reasoning methodology skill focused on first-principles analysis for solving problems. The code does not implement that kind of user-facing reasoning assistance. Instead, it performs backend processing of stored reasoning cases: loading data from storage, scoring a case, inferring reusable patterns, updating promotion status, saving changes, and optionally appending promoted patterns. This is a materially different primary purpose and includes undeclared data storage and workflow-management behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a cognitive/problem-solving skill focused on first-principles reasoning, with no triggers or permissions. The supplied code does not implement reasoning support or problem decomposition. Instead, it is a data-retrieval CLI tool that loads saved cases from storage, looks up a case by ID, and prints it. This is a materially different primary purpose and introduces an undeclared trigger (--id command-line argument) and storage access behavior unrelated to the description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description describes a conceptual problem-solving or reasoning skill, but the supplied code does not implement any first-principles analysis behavior. Instead, it functions as a simple data retrieval script for case scores. Its primary purpose, capabilities, and resource access pattern (loading stored cases and printing score data) are materially different from the declared purpose.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill is presented as a reasoning aid, but it defines persistent storage locations in the user's home directory for cases, exports, patterns, and indexes. That creates a local knowledge base of user-derived content not apparent from the description, which can retain sensitive prompts or derived reasoning artifacts beyond the user's expectation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

Automatically creating user-home storage and export directories is not clearly necessary for a first-principles thinking skill and increases the chance of silent retention of potentially sensitive data. Persistent storage in a fixed hidden directory can surprise users and may violate least-privilege and data-minimization expectations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code creates and appends durable index and pattern files that look like a persistent knowledge base, which materially expands the skill's behavior beyond simple reasoning assistance. Because titles and other case metadata are written into shared markdown artifacts, user-derived content may be retained and discoverable later without clear notice.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The 'Use this when the user' section describes broad situations such as wanting 'original thinking' or asking whether something is 'truly necessary, optimal, or possible.' These conditions are common across many ordinary conversations and do not define clear constraints or exclusions, which could lead to unintended invocation of the skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The file writes index content to disk without any user-facing warning or confirmation in this code path. While not directly enabling code execution, silent writes reduce transparency and can cause users to unknowingly leave sensitive case metadata on the local filesystem.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The save routine overwrites the persistent JSON case store without any visible disclosure to the user. This is primarily a transparency and integrity concern: users may not realize state is being updated on disk, and silent overwrites can complicate auditing or recovery of prior data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

These append operations write user-derived titles, scores, timestamps, and reusable pattern content into markdown index files without any visible disclosure. Because the content is appended to aggregate files, sensitive or identifying information can accumulate over time and become easier to browse or exfiltrate locally.

Content

No source excerpt is available for this finding.