Back to skill

Security audit

Skill 激活器

Security checks for vulnerabilities and agentic risk

Overview

This skill is useful for OpenClaw recommendations, but it can inspect and print sensitive local identity and environment details without a clear consent step.

Install only if you are comfortable with the skill inspecting local OpenClaw/workspace context. Before using scan mode, review SOUL.md, USER.md, and IDENTITY.md for private content, avoid running it in sensitive workspaces, and treat generated fusion scripts as code that needs review before packaging or running.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/scan_environment.sh:14
Finding

Environment scan exposes identity content and performs overbroad workspace reconnaissance

Content
View full analysis

Vulnerability Details

File Location: scripts/scan_environment.sh:14-15, 47-58, 63-72, 78-98; workflow invocation documented in SKILL.md:30-34
Vulnerability Type: Excessive collection and disclosure of local identity and environment data
Risk Level: Medium

Vulnerable Code

bash
WORKSPACE="${1:-$(pwd)}"
SKILL_DIRS=("$HOME/.agents/skills" "$HOME/git/openclaw/skills" "$WORKSPACE/skills")
bash
# --- 2. User Identity ---
echo "## USER IDENTITY"
echo ""
for f in SOUL.md USER.md IDENTITY.md; do
  fpath="$WORKSPACE/$f"
  if [ -f "$fpath" ]; then
    echo "### $f"
    head -30 "$fpath" 2>/dev/null
    echo ""
  else
    echo "### $f — NOT FOUND"
    echo ""
  fi
done
bash
# --- 3. Channel Configuration ---
echo "## CHANNELS"
echo ""
config_dir="$HOME/.openclaw"
if [ -d "$config_dir" ]; then
  # Check for common channel configs
  for channel in feishu wecom telegram discord slack whatsapp signal; do
    if grep -rql "$channel" "$config_dir"/*.yaml "$config_dir"/*.yml "$config_dir"/*.json 2>/dev/null; then
      echo "- ✅ $channel (configured)"
    fi
  done
else
  echo "- No OpenClaw config directory found"
fi
bash
# --- 4. Workspace State ---
echo "## WORKSPACE STATE"
echo ""
for f in HEARTBEAT.md MEMORY.md AGENTS.md TOOLS.md; do
  fpath="$WORKSPACE/$f"
  if [ -f "$fpath" ]; then
    lines=$(wc -l < "$fpath" 2>/dev/null || echo "0")
    size=$(wc -c < "$fpath" 2>/dev/null || echo "0")
    echo "- $f: ${lines} lines, ${size} bytes"
  else
    echo "- $f: NOT FOUND"
  fi
done

# Check memory directory
if [ -d "$WORKSPACE/memory" ]; then
  mem_count=$(ls "$WORKSPACE/memory"/*.md 2>/dev/null | wc -l || echo "0")
  echo "- memory/: ${mem_count} daily files"
else
  echo "- memory/: NOT FOUND"
fi

Technical Analysis

The scan directly copies the first 30 lines of SOUL.md, USER.md, and ...[truncated 2397 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit user approval before reading each category of local information: identity, installed skills, channel configuration, memory state, and workspace metadata.
  2. Do not print raw identity-file lines by default. Extract only an explicitly permitted field such as a role name, or report only that the file exists.
  3. Add an opt-in flag such as --include-identity-content; keep the secure default metadata-only.
  4. Redact secrets, tokens, email addresses, phone numbers, private URLs, and other sensitive values before writing any content to standard output.
  5. Resolve the workspace with realpath and verify it is within an approved root before scanning it. Reject arbitrary or unexpected paths.
  6. Make home-directory skill and configuration scans individually optional rather than enabling them automatically.
  7. Replace broad configuration-file content searches with a parser that reads only documented, non-secret channel-enable fields.
  8. Clearly label generated reports as potentially sensitive and discourage retaining them in shared logs or model contexts.
  9. Add tests confirming that credentials and unrelated identity content never appear in default output.

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:62
Finding

Untrusted source skill instructions can influence generated fused skills and glue scripts

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:62-67; references/fusion-guide.md:7-14, 31-38
Vulnerability Type: Missing trust boundary when processing source skill instructions
Risk Level: Medium

Vulnerable Instructions

From SKILL.md:

markdown
1. Read `references/fusion-guide.md` for fusion patterns and templates
2. Read each source skill's SKILL.md to understand inputs, outputs, dependencies
3. Design the pipeline (sequential, fan-out, aggregation, or enhancement)
4. Generate new fused SKILL.md with proper frontmatter, workflow steps, and error handling
5. Add any glue scripts to `scripts/` if data format conversion is needed
6. Package with `package_skill.py` for distribution

From references/fusion-guide.md:

markdown
### Step 1: Analyze Source Skills

For each source skill, extract:
- **Inputs**: What data/triggers does it accept?
- **Outputs**: What does it produce?
- **Dependencies**: What tools/APIs does it need?
- **Trigger patterns**: What user phrases activate it?

Read each source SKILL.md frontmatter + body to build this understanding.
markdown
### Step 3: Generate Fused SKILL.md

Create a new SKILL.md that:

1. Has a clear name describing the combined workflow
2. Has a description covering all trigger scenarios
3. Contains step-by-step instructions referencing source skill patterns
4. Includes any glue scripts needed for data conversion
5. Lists all dependencies from all source skills

Technical Analysis

The fusion workflow directs the agent to read the complete frontmatter and body of every source SKILL.md, use their instruction patterns, aggregate their dependencies, and then generate a new skill and executable glue scripts. It does not establish that source skill documents are untrusted input or require schema validation, instruction isolation, provenance checks, dependency verification, or human review.

A malicious or ...[truncated 2165 chars]

Remediation
View remediation

Remediation Suggestions

  1. Explicitly classify all source SKILL.md content as untrusted data that must not override system, developer, user, or fusion-workflow instructions.
  2. Parse source skills into a strict schema containing only approved fields such as name, declared inputs, outputs, and dependency identifiers.
  3. Do not follow free-form operational directives found in source skill bodies during analysis.
  4. Maintain an allowlist of permitted dependency sources, commands, filesystem locations, network destinations, and tool capabilities.
  5. Reject or flag source skills containing instruction-override phrases, encoded content, undeclared commands, remote bootstrap commands, credential access, persistence behavior, or unrelated filesystem operations.
  6. Generate scripts in a staging directory and present a complete diff for explicit human approval before packaging or execution.
  7. Run static analysis on generated shell or program files and scan dependencies before permitting use.
  8. Execute generated glue code in a sandbox with minimal filesystem, network, environment-variable, and tool access.
  9. Preserve provenance for every generated instruction and dependency so reviewers can identify the source skill responsible for each element.
  10. Require a separate confirmation step between generation, packaging, installation, and execution.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill’s declared purpose is recommendation and skill fusion, but its workflow explicitly instructs scanning identity files, connected channels, and workspace state. That expands access into sensitive local context without clear purpose limitation or disclosure, creating a privacy and over-collection risk and increasing the chance the skill is invoked with broader authority than users expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger conditions are very broad and include generic phrases like asking what OpenClaw can do or mentioning activation/recommendation themes. That can cause unintended invocation of a skill that performs environment scanning and file access, leading to privacy-sensitive actions being selected in contexts where the user did not specifically request inspection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs reading SOUL.md / USER.md / IDENTITY.md, channel configuration, and workspace state without a user-facing warning or consent prompt. These sources may contain personal profile data, account linkage information, and operational state, so silent collection materially increases privacy exposure and user surprise.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The fusion workflow includes generating new SKILL.md files, adding scripts, and packaging artifacts, but it does not tell the user that files may be created or modified. Silent code or configuration generation can introduce unsafe automation, overwrite local content, or create executable artifacts the user did not knowingly approve.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The template says to scan the user's environment and match their identity to a role, but provides no privacy warning or boundary on what may be inspected to infer that identity. Even if intended for personalization, inferring role from local context can expose personal or professional information and normalize collection beyond user expectations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file explicitly instructs the agent to run an environment-scanning script to determine the user's installed skills and identity, which goes beyond simple recommendation logic and introduces unnecessary collection of potentially sensitive local context. In a skill-activation context, this can lead to overbroad inspection of user data or system state without clear user consent, notice, or minimization.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The usage instructions operationalize privacy-sensitive behavior by directing execution of a script to determine installed skills and user identity, again without notice, consent, or limits on data access. Because this is an actionable step rather than a vague description, the risk is higher that an agent would actually inspect local files or metadata and expose sensitive context during recommendation generation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script reads and prints the first 30 lines of SOUL.md, USER.md, and IDENTITY.md directly to stdout, which can expose personal profile, preferences, operational notes, or other sensitive identity data unrelated to the minimum needed for skill discovery. Because this is an environment-scan helper likely to be run for broad 'activation' or recommendation workflows, the disclosure can occur silently in normal use and leak into logs, transcripts, or downstream LLM context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code emits user identity file contents to stdout without any explicit runtime warning or confirmation, making sensitive data disclosure easy during routine execution. Stdout is commonly captured by shells, logs, agent traces, and chat responses, so even partial file output can unintentionally propagate private information beyond the local environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The channel scan reveals which messaging or collaboration platforms are configured, which is environmental metadata that can aid profiling of the user's tooling and attack surface. While lower sensitivity than raw identity documents, this still discloses potentially private operational details without clear runtime notice and may be unnecessary for many recommendation flows.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.