Back to skill

Security audit

Agent Task Logger

Security checks for vulnerabilities and agentic risk

Overview

This task-logging skill is mostly coherent, but its logger can write persistent command details to local files with weak destination controls.

Review this before installing if your tasks may include secrets in command lines or sensitive project paths. Use it only in trusted workspaces, avoid putting tokens or credentials in logged commands, and prefer a fixed log filename and workspace until the logger validates paths and sanitizes log fields.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/logger.sh:29
Finding

Unrestricted Log Destination Allows Path Traversal and Symlink-Based File Writes

Content
View full analysis
> "$LOG_PATH" } ``` ### Technical Analysis The logger constructs its output path by directly concatenating an unvalidated workspace path, the fixed `logs` directory, and the caller-controlled `LOG_FILE` environment variable. Workspace values can also originate from `WORKSPACE`, `OPENCLAW_WORKSPACE`, or the positional argument to `init`. No validation, canonicalization, filename restriction, or containment check is performed. Consequently, a `LOG_FILE` value containing traversal sequences such as `../../../tmp/target` can resolve outside the intended workspace log directory. The append redirection also follows symbolic links. If an attacker can create or replace the selected log file or log directory with a symbolic link, subsequent logger invocations can append data to the link target. This is an arbitrary append rather than a fully arbitrary overwrite because the shell uses `>>`. Exploitation remains limited to files writable by the operating-system account running the skill. ### Attack Path 1. An attacker gains ...[truncated 1401 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/logger.sh:40
Finding

Unsanitized User Input Permits Multiline Log Forgery and Terminal Control Injection

Content
View full analysis
> "$LOG_PATH" } ``` Caller-supplied task identifiers, task names, commands, statuses, and error messages are passed into this function without validation or encoding. ### Technical Analysis The `log` function interpolates the `thread` and `message` values directly into a line-oriented log record. These values ultimately originate from command-line arguments supplied to the `start`, `command`, `status`, and `error` actions. Because carriage returns, line feeds, escape sequences, and other control characters are not rejected or encoded, an attacker can provide a value containing a newline followed by a fabricated record. The generated log then contains attacker-controlled lines that are visually indistinguishable from legitimate records. Terminal escape sequences can also be stored in the log. When an operator invokes the supported `tail` action, those sequences may alter terminal presentation, hide text, change colors, or misrepresent the displayed output. The script does not execute the logged command strings, so this issue is log and display manipulation rather than shell command injection. ### Attack Path 1. An attacker is able to invoke the logger or influence an argument passed to it. 2. The attacker supplies a task name, status, command, error, or task identifier containing a newline and a fabricated log entry. 3. The selected action passes the value unchanged to `log`. 4. `echo` writes the embedded newline into the file, creating one or more forged records. 5. An administrator or automated parser later reads the log and may interpret the forged record as a legitimate task result. 6. If the pa ...[truncated 768 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README presents the skill name bilingually, but the invocation phrases, examples, and stated log display format are all defined in Chinese, including '中文显示'. There is no indication that users can opt into another language or that the skill is intentionally limited to a Chinese-only environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README explicitly instructs the skill to log executed shell commands and auto-detect workspace paths, but provides no warning or safeguards for secrets, tokens, credentials, internal paths, or sensitive operational details embedded in commands. If commands or detected paths are written verbatim to a shared or persistent log, this can leak confidential information and increase post-compromise impact.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented trigger phrases are broad, generic action words like '记录任务开始' and '查看任务日志' with no explicit scoping, confirmation, or namespace. In an agent environment, this can cause accidental invocation from ordinary conversation or adjacent task text, leading the skill to log data or manipulate files when the user did not explicitly intend to activate it.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill prominently describes automatic workspace detection and task logging, but it does not clearly warn users up front that commands, task names, errors, and statuses may be written to persistent local log files. This creates a privacy and data exposure risk because sensitive shell commands, file paths, project names, or operational details could be stored on disk without informed user consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are generic action-oriented commands such as '初始化日志系统' and '查看任务日志' without any scoping to a specific namespace, confirmation step, or explicit mention that they will write to local files. In an agent setting, broad triggers increase the chance of accidental invocation from ordinary conversation or task descriptions, which can cause unintended persistent logging of user activity or commands.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation explicitly says the log format uses “中文显示”, and all trigger phrases and status examples are defined in Chinese. There is no indication that users may choose another language or that the Chinese-only locale is required for a region-specific purpose, which conflicts with the policy against forcing a language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description is written as Chinese-language functionality labeling ("Agent 任务日志系统 - 类似 Tomcat catalina.out 的实时任务日志") with no indication that users may choose another language or locale. Per the policy, a language-specific constraint should be opt-in or explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.