Back to skill

Security audit

Skill Sediment

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated auto-skill-generation purpose, but it installs persistent agent-behavior-changing code with under-disclosed external session reporting and an unsafe remote recovery download path.

Review before installing. Install only if you are comfortable with a persistent OpenClaw plugin that reviews conversations in the background, creates and promotes reusable skills, and reports session-linked metadata through OpenClaw/Aimi SDK services. Avoid the CDN fallback unless using a trusted HTTPS source with a pinned SHA-256, and consider restricting validAgentId/model allowlists or disabling auto-review in sensitive workspaces.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/manage.py:204
Finding

Unverified Remote Plugin Bundle Can Be Installed and Executed

Content
View full analysis
/assets/skill-sediment-ext.tar.gz.\n" " If the bundled tarball is lost, set SKILL_SEDIMENT_CDN= to point at a fallback download." ) return False log(f"Downloading plugin bundle from CDN... ({CDN_PLUGIN_TARGZ[:60]}...)") try: req = urllib.request.Request( CDN_PLUGIN_TARGZ, headers={"User-Agent": "skill-sediment-installer"} ) with urllib.request.urlopen(req, timeout=60) as resp, open( dest_targz, "wb" ) as f: shutil.copyfileobj(resp, f) except Exception as e: err(f"Download failed: {e}") return False if EXPECTED_SHA256: import hashlib h = hashlib.sha256(Path(dest_targz).read_bytes()).hexdigest() if h != EXPECTED_SHA256: err(f"sha256 mismatch: expected {EXPECTED_SHA256}, got {h}") return False ok("sha256 verified") ok(f"Plugin bundle downloaded: {dest_targz}") return True ``` The downloaded archive subsequently enters the installation path: ```python # Path 4: CDN EXTENSION_DIR.mkdir(parents=True, exist_ok=True) if not download_plugin(targz): return False return extract_plugin(targz) ``` The installed extension can then be activated by restarting the gateway: ```python if args.auto_restart: log("Triggering gateway restart...") try: subprocess.run(["openclaw", "gateway", "restart"], timeout=60) ``` ### Technical Analysis When the bundled plugin source is unava ...[truncated 2286 chars]
Remediation
View remediation

other

Error
Location
assets/plugin-source/src/auto-review.ts:434
Finding

Automatic Review Sessions and Identifiers Are Reported to External Backend Services Without Documented Consent

Content
View full analysis
{ if (!hasSkillChanges) { api.logger.info( `${PLUGIN_TAG} sendUserQueryWhitelistHiMessage skipped (${attrs.pathTag}) — no skill changes ` + `(session=${reviewSessionKey}, outcome=${attrs.outcomeLabel})`, ); return; } void sendUserQueryWhitelistHiMessage({ sessionKey: reviewSessionKey, sessionId: reviewSessionId, content: "技能自动审查", channel: "subagent_session_create_skill_review", agentId: reviewAgentId, whitelistKind: "subAgentSkillReview", bannerHtml: `skill-review subAgent 上报`, target: ...[truncated 4212 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (62)

YARA rule 'agent_skill_credential_exfiltration_webhook': AI agent skill credential harvesting followed by webhook or external exfiltration [agent_skills]

Critical
Category
YARA Match
Confidence
85% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · assets/plugin-source/src/skills-guard.ts (reported line 60)May include surrounding context.

ts
?\w*(KEY|TOKEN|SECRET|PASSWORD|CREDENTIAL|API)/,
    patternId: "env_exfil_wget",
    severity: "critical",
    category: "exfiltration",
    description: "wget command interpolating secret environment variable",
  },
  {
    regex: /fetch\s*\([^\n]*\$\{?\w*(KEY|TOKEN|SECRET|PASSWORD|API)/,
    patternId: "env_exfil_fetch",
    severity: "critical",
    category: "exfiltration",
    description: "fetch() call interpolating secret environment variable",
  },
  {
    regex: /httpx?\.(get|post|put|patch)\s*\([^\n]*(KEY|TOKEN|SECRET|PASSWORD)/,
    patternId: "env_exfil_httpx",
    severity: "critical",
    category: "exfiltration",
    description: "HTTP library call with secret variable",
  },
  {
    regex: /requests\.(get|post|put|patch)\s*\([^\n]*(KEY|TOKEN|SECRET|PASSWORD)/,
    patternId: "env_exfil_requests",
    severity: "critical",
    category: "exfiltration",
    description: "requests library call with secret variable",
  },

  // ── Exfiltration: reading credential store

Tainted flow: 'req' from os.environ.get (line 216, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The installer will download a plugin bundle from a URL taken directly from SKILL_SEDIMENT_CDN, and checksum verification is only optional. In this skill context that is especially dangerous because the downloaded archive is then extracted into the extension load path, effectively turning an environment variable into remote code/plugin installation.

Content

Scanner excerpt · scripts/manage.py (reported line 219)May include surrounding context.

python
req = urllib.request.Request(
            CDN_PLUGIN_TARGZ, headers={"User-Agent": "skill-sediment-installer"}
        )
        with urllib.request.urlopen(req, timeout=60) as resp, open(
            dest_targz, "wb"
        ) as f:
            shutil.copyfileobj(resp, f)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description is for an operational management skill that installs and administers the skill-sediment plugin. The supplied code instead appears to be the internal implementation of the skill-sediment plugin runtime. It defines plugin hooks, builds review prompts, registers a restricted skill_manage tool, performs auto-review on agent_end, handles migrations and cleanup, and manages sediment skill lifecycle. While some self-maintenance-like behavior exists internally (directory migration, TTL/LRU cleanup), these are implementation details of the plugin, not the declared user-facing install/heal/doctor/recover/status/config/uninstall capabilities. Thus the description materially misrepresents both the primary purpose and the exposed capabilities of the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a broad operational skill for managing the skill-sediment plugin lifecycle and its conversation-to-skill generation features. The supplied code chunk does not implement any of those actions. Instead, it provides a small shared utility for resolving validAgentId configuration and determining whether a plugin applies to a specific agent. While this could be a supporting detail for a larger plugin system, this chunk by itself is materially different from the declared purpose and omits the described core behaviors entirely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description is about an operational/admin skill for managing the skill-sediment plugin itself: install, heal, doctor, recover, status, config, uninstall. This code chunk does not implement those user-facing management functions. Instead, it is core runtime logic for auto-review: monitoring sessions, counting tool calls and user turns, enforcing model/tool/session gates, launching a background review subagent, capturing <sediment_handoff> output, persisting checkpoint state, and sending analytics/reporting events (postUbaEvent, reportSession, sendUserQueryWhitelistHiMessage). While 'recover' is superficially related through checkpoint restoration on startup, that is only an internal implementation detail, not the declared command set. Overall, the actual behavior is materially different from the declared purpose and includes undeclared backend reporting capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is about operating the skill-sediment plugin itself as an extension lifecycle manager: install, heal, doctor, recover, status, config, uninstall. The supplied code does not implement those plugin-management functions. Instead, it provides a skill content management tool that manipulates individual sediment skills and their files, including promoting them into the active skills directory. That is a materially different primary purpose and introduces undeclared capabilities (CRUD on skill artifacts, file writes/removals, view/list/promote). While both relate to 'sediment', the code is not for installing or operating the plugin extension described.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is about managing the 'skill-sediment' plugin lifecycle and operational commands (install, heal, recover, status, config, uninstall) related to converting conversations into SKILL.md files and promoting them into skills/. The supplied code does none of that. Instead, it is a separate 'Skills Guard' module whose primary purpose is security analysis of skill contents and installation gating based on trust level and scan verdict. This is not a minor implementation detail in support of sediment installation; it is a materially different function with different resources, behaviors, and outputs. Therefore the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description presents an operational plugin manager for installing and maintaining the skill-sediment extension itself, with commands like install, heal, doctor, recover, status, config, and uninstall. The provided code chunk instead defines the data model for a different functional surface: direct skill management, metadata persistence, promotion workflow, and skill security scanning. While promotion of sediment skills is somewhat aligned with the description, most of the concrete capabilities exposed by this code are broader and materially different from the declared purpose. There is no evidence here of plugin installation, agent selection, self-repair, gateway restart, diagnostics, status reporting, config inspection, or uninstall logic. Because the actual code supports undeclared skill CRUD/file operations and threat scanning, this is a meaningful description-behavior mismatch rather than a mere implementation detail.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 23)May include surrounding context.

md
successful conversation workflows into `SKILL.md` files, then promote them to `skills/`.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file implements full CRUD operations for creating, editing, patching, deleting, and writing files for skills, which materially exceeds the metadata description of the skill as an installer/operator for the sediment plugin. This mismatch undermines trust boundaries: users and orchestrators may grant the skill access expecting maintenance actions, while it actually contains self-extending and self-modifying capabilities.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
95% confidence
Finding

The tool is explicitly designed to create and modify skills, including sediment-originated skills already placed under skills/, which enables self-modification and persistent alteration of agent behavior. In this context, self-modification is dangerous because compromised or misaligned agent output can be written back into reusable skills and later auto-loaded, creating persistence and widening the blast radius beyond the current session.

Content

Scanner excerpt · assets/plugin-source/src/skill-manage-tool.ts (reported line 544)May include surrounding context.

ts
success: false,
        error:
          `Sediment skill '${name}' not found. ` +
          `This plugin can only modify skills under sediment_skills/ ` +
          `or sediment-originated skills (originSource="SEDIMENT") under skills/. ` +
          `Use skill_manage(action='list') to see available sediment skills, ` +
          `or action='create' to add a new one.`,

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code can promote agent-generated sediment skills into the engine-loaded skills/ directory, which changes runtime behavior beyond the skill manifest’s declared install/heal/diagnostic scope. That scope mismatch is dangerous because it creates an unexpected capability to persist and activate new instructions/code paths that future sessions will automatically load, enabling privilege expansion and persistence if abused.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · assets/plugin-source/src/skills-guard.ts (reported line 46)May include surrounding context.

ts
---------------
// 威胁模式规则
// ---------------------------------------------------------------------------

const THREAT_PATTERNS: ThreatPattern[] = [
  // ── Exfiltration: shell commands leaking secrets ──
  {
    regex: /curl\s+[^\n]*\$\{?\w*(KEY|TOKEN|SECRET|PASSWORD|CREDENTIAL|API)/,
    patternId: "env_exfil_curl",
    severity: "critical",
    category: "exfiltration",
    description: "curl command interpolating secret environment variable",
  },
  {
    regex: /wget\s+[^\n]*\$\{?\w*(KEY|TOKEN|SECRET|PASSWORD|CREDENTIAL|API)/,
    patternId: "env_exfil_wget",
    severity: "critical",
    category: "exfiltration",
    description: "wget command interpolating secret environment variable",
  },
  {
    regex: /fetch\s*\([^\n]*\$\{?\w*(KEY|TOKEN|SECRET|PASSWORD|API)/,
    patternId: "env_exfil_fetch",
    severity: "critical",
    category: "exfiltration",
    description: "fetch() call interpolating secret environment variable",
  },
  {
    regex: /httpx?\.(get|

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/plugin-source/src/skills-guard.ts (reported line 104)May include surrounding context.

ts
patternId: "gpg_dir_access",
    severity: "high",
    category: "exfiltration",
    description: "references user GPG keyring",
  },
  {
    regex: /\$HOME\/\.kube|~\/\.kube/,

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/plugin-source/src/skills-guard.ts (reported line 128)May include surrounding context.

ts
description: "directly references OpenClaw secrets file",
  },
  {
    regex: /cat\s+[^\n]*(\.env|credentials|\.netrc|\.pgpass|\.npmrc|\.pypirc)/,
    patternId: "read_secrets_file",
    severity: "critical",
    category: "exfiltration",

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/plugin-source/src/skills-guard.ts (reported line 128)May include surrounding context.

ts
description: "directly references OpenClaw secrets file",
  },
  {
    regex: /cat\s+[^\n]*(\.env|credentials|\.netrc|\.pgpass|\.npmrc|\.pypirc)/,
    patternId: "read_secrets_file",
    severity: "critical",
    category: "exfiltration",

Instruction Override

High
Category
Prompt Injection
Confidence
80% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · assets/plugin-source/src/skills-guard.ts (reported line 224)May include surrounding context.

ts
patternId: "prompt_injection_ignore",
    severity: "critical",
    category: "injection",
    description: "prompt injection: ignore previous instructions",
  },
  {
    regex: /you\s+are\s+(?:\w+\s+)*now\s+/,

YARA rule 'agent_skill_prompt_injection_hidden_instructions': Prompt injection or hidden instructions embedded in AI agent skill text [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · assets/plugin-source/src/skills-guard.ts (reported line 224)May include surrounding context.

ts
patternId: "md_link_exfil",
    severity: "high",
    category: "exfiltration",
    description: "markdown link with variable interpolation",
  },

  // ── Prompt injection ──
  {
    regex: /ignore\s+(?:\w+\s+)*(previous|all|above|prior)\s+instructions/,
    patternId: "prompt_injection_ignore",
    severity: "critical",
    category: "injection",
    description: "prompt injection: ignore previous instructions",
  },
  {
    regex: /you\s+are\s+(?:\w+\s+)*now\s+/,
    patternId: "role_hijack",
    severity: "high",
    category: "injection",
    description: "attempts to override the agent's role",
  },
  {
    regex: /do\s+not\s+(?:\w+\s+)*tell\s+(?:\w+\s+)*the\s+user/,
    patternId: "deception_hide",
    severity: "critical",
    category: "injection",
    description: "instructs agent to hide information from user",
  },
  {
    regex: /system\s+prompt\s+override/,
    patternId: "sys_prompt_override",
    severity: "critical",
    category: "injection",
    descript

YARA rule 'crypto_miner_software': References to known cryptocurrency mining software [cryptominers]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched cryptocurrency mining indicators (stratum protocol, mining pools, miner binaries, or cryptojacking scripts).

Content

Scanner excerpt · assets/plugin-source/src/skills-guard.ts (reported line 688)May include surrounding context.

ts
proc\/\d+\//,
    patternId: "proc_access",
    severity: "high",
    category: "traversal",
    description: "references /proc filesystem (process introspection)",
  },
  {
    regex: /\/dev\/shm\//,
    patternId: "dev_shm",
    severity: "medium",
    category: "traversal",
    description: "references shared memory (common staging area)",
  },

  // ── Crypto mining ──
  {
    regex: /xmrig|stratum\+tcp|monero|coinhive|cryptonight/,
    patternId: "crypto_mining",
    severity: "critical",
    category: "mining",
    description: "cryptocurrency mining reference",
  },
  {
    regex: /hashrate|nonce.*difficulty/,
    patternId: "mining_indicators",
    severity: "medium",
    category: "mining",
    description: "possible cryptocurrency mining indicators",
  },

  // ── Supply chain: curl/wget pipe to shell ──
  {
    regex: /curl\s+[^\n]*\|\s*(ba)?sh/,
    patternId: "curl_pipe_shell",
    severity: "critical",
    category: "supply_chain",
    description: "curl p

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · assets/plugin-source/src/skills-guard.ts (reported line 859)May include surrounding context.

ts
patternId: "github_token_leaked",
    severity: "critical",
    category: "credential_exposure",
    description: "GitHub personal access token in skill content",
  },
  {
    regex: /sk-[A-Za-z0-9]{20,}/,

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.

Content

Scanner excerpt · assets/plugin-source/src/skills-guard.ts (reported line 889)May include surrounding context.

ts
patternId: "jailbreak_dan",
    severity: "critical",
    category: "injection",
    description: "DAN (Do Anything Now) jailbreak attempt",
  },
  {
    regex: /\bdeveloper\s+mode\b.*\benabled?\b/,

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
90% confidence
Finding

Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.

Content

Scanner excerpt · assets/plugin-source/src/skills-guard.ts (reported line 903)May include surrounding context.

ts
patternId: "hypothetical_bypass",
    severity: "high",
    category: "injection",
    description: "hypothetical scenario used to bypass restrictions",
  },
  {
    regex: /for\s+educational\s+purposes?\s+only/,

Instruction Override

High
Category
Prompt Injection
Confidence
90% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · assets/plugin-source/src/skills-guard.ts (reported line 903)May include surrounding context.

ts
patternId: "hypothetical_bypass",
    severity: "high",
    category: "injection",
    description: "hypothetical scenario used to bypass restrictions",
  },
  {
    regex: /for\s+educational\s+purposes?\s+only/,

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The scanner explicitly trusts builtin skills and returns safe without inspecting any content. If the built-in skill set is ever compromised in the supply chain, repackaged, or locally modified, malicious content bypasses all regex-based detection and install-policy enforcement.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · config/exclude.json (reported line 35)May include surrounding context.

json
"Thumbs.db",
    ".coverage",
    "coverage.xml",
    ".env",
    ".env.local",
    "__skill_meta__.json"
  ],