Back to skill

Security audit

Verified Research

Security checks for vulnerabilities and agentic risk

Overview

This research skill has a legitimate purpose, but it should be reviewed before use because it writes research summaries into agent memory and includes unsafe file-writing and cleanup scripts.

Install only after reviewing the persistence behavior. Avoid using it for sensitive research unless MEMORY.md archival, learning-log writes, and SKILL.md self-modification are removed or made explicit opt-in. Run cleanup only in a sandbox or least-privileged account until path validation and deletion containment are fixed.

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 (3)

T02 · Agent Memory Poisoning

Error
Location
scripts/cleanup.sh:139
Finding

Untrusted research content is persisted into long-term agent memory

Content
View full analysis
/dev/null || echo "") ``` ```bash { # Add newline if MEMORY.md doesn't end with one if [ -s "${MEMORY_PATH}" ]; then last_char=$(tail -c1 "${MEMORY_PATH}" | xxd -p 2>/dev/null || echo "") [ "${last_char}" != "0a" ] && echo "" fi echo "${ENTRY}" } >> "${MEMORY_PATH}" ``` The related Skill instructions also direct the agent to append research results to `.learnings/research-log.md` and modify `SKILL.md` when research identifies perceived methodology problems. ### Technical Analysis Research claim content can originate from user-controlled input or untrusted external sources. Claim previews are loaded from `manifest.json`, selected as core conclusions, inserted into `ENTRY`, and appended to `/root/.openclaw/workspace/MEMORY.md`. The implementation performs no trust-boundary validation, instruction neutralization, provenance enforcement, or human approval before placing this content in persistent agent memory. Markdown or natural-language instructions embedded in a source can therefore be stored alongside trusted long-term context. The Skill's self-improvement guidance compounds this risk by encouraging durable changes to the Skill instructions based on research-derived material. Although the shell script does not itself edit `SKILL.md`, the instruction can cause the executing agent to do so. ### Attack Path 1. An attacker supplies a research sourc ...[truncated 1246 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/claim-card.sh:19
Finding

Path traversal in claim identifiers permits writes outside the claims directory

Content
View full analysis
"${CLAIMS_DIR}/${CLAIM_ID}.md" <`, so an existing writable `.md` file is truncated and replaced. `CACHE_DIR` is also entirely caller-controlled. An attacker who can influence both variables can select an arbitrary writable parent directory and then use traversal or symlink behavior to expand the write scope. The computed `CONTENT_ESCAPED` value is unused and does not protect the output path or the YAML front matter. ### Attack Path 1. The attacker influences environment variables passed to `claim-card.sh`. 2. The attacker supplies a traversal-bearing identifier, such as: ```bash CLAIM_ID="../../workspace/MEMORY" ``` 3. The script constructs: ```text ${CACHE_DIR}/claims/../../workspace/MEMORY.md ``` 4. The operating system resolves the traversal components outside the inten ...[truncated 895 chars]
Remediation
View remediation
&2; exit 1 ;; esac ``` 2. Canonicalize the cache root and destination using `realpath` or equivalent. 3. Verify that the canonical destination begins with the canonical claims-directory path followed by a path separator. 4. Restrict `CACHE_DIR` to descendants of a fixed, application-owned cache root. 5. Reject symlinked cache directories and destination files, or create files using no-follow semantics. 6. Use restrictive directory and file permissions, such as `0700` for session directories and `0600` for claim files. 7. Create new claim files atomically and refuse unintended overwrites where duplicate claim IDs are not expected. 8. Validate all front-matter fields separately to prevent malformed generated documents. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/cleanup.sh:18
Finding

Unsafe path interpolation in cleanup permits Python code injection and destructive deletion

Content
View full analysis
/dev/null || echo "") ``` ```bash MANIFEST_UPDATED=$(python3 -c "import json; d=json.load(open('${MANIFEST}')); print(d.get('updated_at',''))" 2>/dev/null || echo "") ``` ```bash TOPIC_NAME=$(python3 -c "import json; d=json.load(open('${MANIFEST}')); print(d.get('topic','${TOPIC_SLUG}'))" 2>/dev/null || echo "${TOPIC_SLUG}") TOTAL_CLAIMS=$(python3 -c "import json; d=json.load(open('${MANIFEST}')); print(d.get('total_claims',0))" 2>/dev/null || echo 0) TIERS=$(python3 -c "import json; d=json.load(open('${MANIFEST}')); t=d.get('source_tier_counts',{}); print(f'T1={t.get(\"T1\",0)} T2={t.get(\"T2\",0)} T3={t.get(\"T3\",0)} T4={t.get(\"T4\",0)}')" 2>/dev/null || echo "T1=0 T2=0 T3=0 T4=0") ``` ```bash # Delete the entire topic dir (all sessions) rm -rf "${topic_dir}" ``` ### Technical Analysis Filesystem paths are interpolated directly into source code passed to `python3 -c`. A single quote in `MARKER`, `MANIFEST`, or `TOPIC_SLUG` can terminate the Python string literal. Additional path characters can then become executable Python syntax. Shell quoting does not prevent this issue. The shell expands the variable inside a double-quoted argument and passes the resulting characters to Python; Python then parses attacker-controlled content as source code. The cleanup root is also configurable through `CACHE_DIR` without canonicalization or containment validation. Once a topic is considered expired, the script executes `rm -rf` against a directory derived from that root. Forged cache structures and cleanup markers can therefore cause recursively destructive operation ...[truncated 1930 chars]
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 Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (16)

Vague Triggers

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match common requests like 'search', 'check', or 'help me investigate', causing the skill to activate in many ordinary conversations. Because this skill performs persistence to /tmp, MEMORY.md, and learning logs, overbroad triggering can silently expand data collection and side effects beyond what users reasonably expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README describes automatic caching, later archival to MEMORY.md, and deletion behavior, but it does not clearly warn users that their research content may be persisted across sessions and summarized into a longer-lived store. In a research skill, cached content may include sensitive prompts, copied source excerpts, or user-provided data, so undocumented persistence creates a real privacy and data-handling risk even if the feature is intended for usability.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README instructs users to save the report to the workspace but does not clearly warn that this creates a persistent copy outside the temporary cache lifecycle. That is dangerous because users may assume the 3-day cleanup applies universally, while a workspace copy could retain sensitive research results indefinitely and broaden exposure to later users, tools, or processes with workspace access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The top-level description presents the skill as a research methodology but does not clearly disclose that artifacts are cached for 3 days and summarized into MEMORY.md. Omitting this at the entry point undermines informed user consent and increases the chance sensitive topics are retained unexpectedly.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Persisting topic, date, core conclusions, source statistics, and report path into MEMORY.md creates durable natural-language records of user research activity. This is risky because research topics can contain sensitive business, personal, legal, medical, or security information that may later be disclosed to other tools, users, or sessions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The note encouraging the agent to proactively copy the full report into the workspace allows broader persistence and exposure of potentially sensitive research results without requiring explicit user approval. Workspace files are often longer-lived, easier to access, and more likely to be shared than temporary cache directories.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill's persistent learning log and potential SKILL.md modification are not disclosed as part of user-facing behavior. Hidden persistence and self-editing make the skill more dangerous because users cannot reasonably anticipate that their topics may be memorialized or that the skill definition may change over time based on prior interactions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The cumulative research log stores each problem topic and quality notes in plain language, creating a longitudinal record of user interests and requests. Over time this increases disclosure risk and can reveal sensitive patterns even if any single entry seems harmless.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The instruction to update SKILL.md based on research-time 'methodology problems' gives the skill a self-modification capability unrelated to fulfilling a single user research request. Self-modifying prompts can introduce persistence, drift, or attacker-seeded changes that survive across sessions and may weaken future safeguards.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script specifically extracts from a report section titled "## 关键结论" and writes multiple Chinese-language fallback/output strings into MEMORY.md. This imposes a specific language/locale behavior in natural-language content without offering a user choice or documenting why the skill is region-specific.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file header at L003 describes the script as generating the final report and scheduling cleanup. In implementation, the cleanup-related behavior is limited to writing a .cleanup_scheduled marker JSON file under /tmp at L144-L146, with no timer, cron job, background task, or deletion logic present. This is an active mismatch between stated intent and actual behavior, not merely omitted detail.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script defaults the topic to Chinese ('未知主题') and emits the generated report headings, status labels, and terminal messages in Chinese. This imposes a specific language/locale choice without any visible option for the user to select or opt into that locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The natural-language instructions and user trigger examples are presented only in Chinese, which effectively forces a specific language for use of the skill. The file does not offer multilingual support, user opt-in, or any justification that the skill is intended only for a Chinese-language context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Appending every research run to a persistent '.learnings/research-log.md' exceeds the core task and creates ongoing state unrelated to the immediate answer. Even if intended for quality improvement, it stores user topics and workflow metadata in a durable location that can later leak sensitive interests or be mined by other processes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script writes to a path derived from the env-controlled CACHE_DIR and CLAIM_ID without validating or constraining either value. An attacker who can influence these inputs could cause writes outside the intended cache area via path traversal or overwrite arbitrary files accessible to the process, which is more serious than a mere missing warning in an automation context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code writes a JSON marker to /tmp/deep-research-cache/.../.cleanup_scheduled, which is a separate filesystem side effect from generating the report. Although the file header mentions 'schedule cleanup' and there is a post-action log, there is no user disclosure before the write that an additional marker file will be created under /tmp.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.