Back to skill

Security audit

Exec Truncate

Security checks for vulnerabilities and agentic risk

Overview

The skill is meant to shorten command output, but its artifact set is inconsistent and its plugin-style install/output interception can materially affect what users and agents see from shell commands.

Review this carefully before installing. Use it only where losing nonessential command output is acceptable, keep an easy way to rerun commands without truncation, avoid enabling oversized-output logging for commands that may contain secrets, and verify the exact plugin package/version before activating it in the OpenClaw gateway.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
filtered-executor.ts:74
Finding

Sensitive Command Arguments May Be Disclosed Through Oversized-Output Logging

Content
View full analysis
0 && raw.length > this.config.oversizedOutputLog ) { console.error( `[exec-truncate] oversized output: ${raw.length} chars for "${command}" — truncated` ); } ``` ### Technical Analysis When `oversizedOutputLog` is enabled and the command produces output exceeding the configured threshold, the complete command string is written to stderr without redaction. Command arguments may contain API keys, passwords, bearer tokens, signed URLs, database connection strings, authorization headers, private file paths, or environment-variable assignments. The implementation does not distinguish between executable names and sensitive arguments. Although the project delegates execution to a caller-provided function and does not itself inject commands, it receives the original command and may expose its contents through logs. stderr may be collected by CI systems, service managers, centralized logging platforms, terminal capture systems, or the OpenClaw host. ### Attack Path 1. An application enables `oversizedOutputLog` with a positive threshold. 2. A command containing a secret is passed to `FilteredExecutor.run()`, such as a command with an authorization header, token argument, or signed URL. 3. The command produces output larger than the configured threshold. 4. `FilteredExecutor` writes the entire command, including its sensitive arguments, to stderr. 5. An attacker or lower-privileged operator with access to application, CI, container, or centralized logs retrieves the exposed secret. 6. The attacker uses the secret with whatever privileges the credential provides. ### Impact Assessment Successful exploitation can disclose credentials or confidential command arguments to anyone able to read the relevant log ...[truncated 362 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:40
Finding

Documentation Installs and Activates an Unpinned Third-Party Plugin

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
mod.ts:253
Finding

Duplicate Closing Expression Causes a Parse-Time Module Failure

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (10)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
} from "./mod.ts";

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
} from "./mod.ts";

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
} from "./mod.ts";

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 · filtered-executor.ts (reported line 44)May include surrounding context.

ts
*
 *   // With config (Phase 3)
 *   const executor = createFilteredExecutor(myExecFn, {
 *     outputTransform: false,      // bypass filters
 *     oversizedOutputLog: 10000,  // log when raw output > 10KB
 *   });
 */

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 · index.ts (reported line 17)May include surrounding context.

ts
*
 *   // With config (Phase 3)
 *   const executor = createFilteredExecutor(myExecFn, {
 *     outputTransform: false,      // bypass filters
 *     oversizedOutputLog: 10000,  // log when raw output > 10KB
 *   });
 */

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README promotes a plugin that automatically intercepts and truncates exec output, but it does not clearly warn users that important security-relevant context may be omitted from command results. In an agent setting, this can mislead downstream decision-making by hiding warnings, deleted lines, non-addition diff context, or other evidence the model/operator needed to see before acting.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The docstring says the function 'Strips headers, hunk markers, unchanged context' and 'Keeps only additions (+)'. In practice, the code preserves certain header lines like diff --git and --- in the head window, does not explicitly remove hunk markers throughout the diff, and only samples additions from the first/last windows rather than transforming the whole diff as described.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This code reads process.env.HOME to strip home-directory prefixes from command output, which is access to a potentially sensitive environment value. Although the access is limited and used for redaction, there is no explicit user-facing disclosure, prompt, or warning in this code about reading environment-derived path information.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation describes behavior such as returning build status summaries like [build OK ...] or focusing on first/last relevant lines for large outputs. However, when lines.length > BUILD_FOCUS_THRESHOLD at L232-L235, the function returns early with relevant lines only, making the later summary-building branch unreachable for large builds.

Content

No source excerpt is available for this finding.