Back to skill

Security audit

audit-exec

Security checks for vulnerabilities and agentic risk

Overview

This is a command-audit skill, but its whitelist can incorrectly hide dangerous commands, so it should be reviewed before relying on it.

Use this skill only as an advisory audit aid until the whitelist logic is fixed. Review transcript commands manually, especially compound commands, and avoid trusting the OK/whitelisted section as proof that a command was safe. Be aware that the skill reads local OpenClaw command transcripts, which may contain sensitive command history.

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

T09 · Insecure Skill Coding Practices

Error
Location
audit_transcript.py:109
Finding

High-Risk Commands Can Be Misclassified as Whitelisted

Content
View full analysis
目录查看,安全 Get-Content -> 读取文件内容,安全 type -> 读取文件内容,安全 cat -> 读取文件内容,安全 dir -> Windows目录查看 # Unix 目录查看 ls -> 目录列表,安全 # 文件查看 type -> 查看文件内容,安全 cat -> 查看文件内容,安全 ``` ### Technical Analysis Whitelist patterns are passed directly to `re.search()` and are therefore treated as unanchored regular expressions. Generic patterns such as `cat`, `ls`, `dir`, and `type` can match anywhere inside a command rather than matching only an intended executable and safe argument structure. The script calculates the command's risk level before checking the whitelist, but the final classification gives the whitelist absolute precedence. Consequently, a command that matches both a HIGH-risk rule and any whitelist pattern is placed in `LOW_WHITELISTED` instead of the HIGH-risk report. For example: ```shell rm -rf /tmp/data; cat harmless.txt ``` The `rm -rf` component matches a HIGH-risk deletion rule, while `cat` matches the generic whitelist entry. Because the whitelist branch is evaluated first, the complete compound command is reported as whitelisted. Whitelist configuration also accepts arbitrary regular-expression metacharacters ...[truncated 1733 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

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

md
#### 🟡 中风险 (Yellow Line) - 标黄记录
| 风险类型 | Linux | Windows |
|---------|-------|---------|
| 提权执行 | sudo | runas、Start-Process -Verb RunAs |
| 外部下载 | curl、wget | Invoke-WebRequest、iwr、bitsadmin |
| 安装软件 | apt/pip/npm install -g | choco install、winget install、pip install |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrase "执行审计" is very broad and resembles normal conversational language a user might naturally say. That makes accidental or adversarial invocation likely, causing the skill to run when the user did not explicitly intend to invoke this specific audit capability.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
#### 🟡 中风险 (Yellow Line) - 标黄记录
| 风险类型 | Linux | Windows |
|---------|-------|---------|
| 提权执行 | sudo | runas、Start-Process -Verb RunAs |
| 外部下载 | curl、wget | Invoke-WebRequest、iwr、bitsadmin |
| 安装软件 | apt/pip/npm install -g | choco install、winget install、pip install |

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring is written entirely in Chinese and presents the skill purpose only in that language. This imposes a specific language/locale on users without offering an alternative or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The natural-language instructions and usage guidance are entirely in Chinese, and the file does not indicate that users may choose another language or that the skill is intentionally region- or locale-specific. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This plain-text configuration uses Chinese-only natural-language labels and comments throughout, starting at the header and format description. Under the language/locale policy rule, forcing a specific language without opt-in or documented justification can be a policy violation.

Content

No source excerpt is available for this finding.