Back to skill

Security audit

Command Output Display

Security checks for vulnerabilities and agentic risk

Overview

This skill is a command-output formatting guide, but it broadly tells agents to show full raw terminal output without redaction or control-character sanitization.

Review before installing. The main risk is that an agent using this skill may paste raw command output, logs, or command arguments into chat, including tokens, passwords, private paths, or misleading terminal escape sequences. Use it only with an added rule that secrets must be redacted, unsafe control characters escaped, and file/service-changing commands confirmed first.

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

Warning
Location
SKILL.md:44
Finding

Unredacted Command Output and Unsafe Terminal Control-Sequence Rendering

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 44–46; reinforced by lines 5 and 341
Vulnerability Type: Sensitive information disclosure and unsafe rendering of terminal output
Risk Level: Medium

Vulnerable Instructions

The following is an English translation of the relevant instructions at lines 44–46:

text
- Display stdout and stderr in full.
- Preserve the original formatting, including color codes when present.
- Do not truncate important information.

Line 5 additionally requires users to see every command and its complete output, while line 341 requires verification that the complete command was displayed.

Technical Analysis

The skill directs the agent to reproduce complete command lines and raw standard output and error streams without requiring secret redaction or control-character sanitization.

Command arguments and output can contain sensitive values such as API tokens, passwords, authorization headers, cookies, private keys, environment variables, session identifiers, internal paths, and confidential log records. Displaying these values in an agent response can cause them to be retained in conversation history, application logs, telemetry, or downstream integrations.

Preserving original color codes also permits ANSI and other terminal control sequences originating from attacker-controlled filenames, log messages, process output, or remote data. If a client interprets those sequences instead of escaping them, they may alter colors, overwrite displayed text, hide warnings, create misleading links, or otherwise manipulate the presentation of the output.

The long-output handling described elsewhere in the file limits output volume but does not establish secret filtering, data classification, or safe control-character encoding.

Attack Path

  1. An attacker causes a command, service log, filename, or process to emit a secret or attacker-controlled terminal escape sequence. ...[truncated 1529 chars]
Remediation
View remediation

Remediation Suggestions

  1. Add an explicit rule that security and privacy requirements override complete-output presentation.
  2. Redact passwords, API keys, access tokens, authorization headers, cookies, private keys, connection strings, and sensitive environment variables from commands and output.
  3. Use both key-name detection and secret-value pattern detection, while allowing users to define additional sensitive fields.
  4. Replace detected secrets with stable placeholders such as [REDACTED_TOKEN] so output remains understandable without exposing values.
  5. Strip or visibly escape ANSI escape sequences, bidirectional text controls, carriage returns, and other non-printing control characters by default.
  6. Display output in bounded sections and require explicit confirmation before revealing additional potentially sensitive content.
  7. Avoid printing command arguments when they contain credentials. Prefer secure input mechanisms such as standard input, protected files, or environment references.
  8. Add a warning before displaying logs or configuration files that may contain confidential information.
  9. Preserve an unmodified output copy only when strictly necessary, in access-controlled storage, and never place it directly into chat history by default.
  10. Add tests covering secrets in command arguments, environment dumps, authorization headers, private keys, malicious filenames, and ANSI/control-sequence injection.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill includes concrete file-creation examples that write configuration files under user-controlled paths but does not warn that these commands can overwrite existing files or alter live service configuration. In an agent setting, presenting such commands as routine steps increases the risk of unintended destructive changes, especially if the user assumes the examples are safe to run verbatim.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The multi-step workflow performs mkdir and recursive copy operations into application directories without cautioning about clobbering files, merging stale state, or changing a running system. Because the skill's purpose is to guide terminal actions closely, these omissions make accidental configuration drift or data loss more likely when users or agents follow the steps directly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

All instructional content and required output labels are presented in Chinese, and the document does not indicate that users may choose another language. The policy requires flagging language or locale constraints when they are effectively imposed without opt-in or justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.