Back to skill

Security audit

sn-infographic

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed infographic-generation workflow, with external model calls and temporary files that users should understand before use.

Install only if you are comfortable with your infographic prompt and generated images being sent through the sn-image-base provider tools and written temporarily under /tmp. Avoid using sensitive or confidential source material unless the sn-image-base dependency and local temp-file handling are acceptable in your environment.

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:146
Finding

Predictable and Insufficiently Protected Temporary Workspace

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 146–151
Vulnerability Type: Predictable temporary directory, insecure file creation, and potential symbolic-link attacks
Risk Level: Medium

Vulnerable Code:

bash
TASK_ID=$(date +%Y%m%d_%H%M%S)
TEMP_DIR="/tmp/openclaw/sn-infographic/${TASK_ID}"
mkdir -p "$TEMP_DIR"

Subsequent workflow stages write user content and generated artifacts into this directory, including analysis.json, structured-content.md, expanded-prompt.txt, and round_N.png.

Technical Analysis

The temporary directory name is derived from a timestamp with one-second granularity. It is therefore predictable and may collide when multiple tasks start during the same second. The use of mkdir -p does not provide atomic, exclusive directory creation and does not fail if an attacker or another process has already created the path.

The workflow does not set a restrictive umask, explicitly assign owner-only permissions, verify directory ownership, or check whether destination files are symbolic links before writing them. Shell redirections and downstream image writes can consequently follow attacker-created links within a pre-created workspace.

No cleanup operation is defined, so prompts, analysis results, and generated images may remain in the shared temporary filesystem after task completion.

Attack Path

  1. A local attacker identifies the predictable base path /tmp/openclaw/sn-infographic/.
  2. The attacker predicts a task directory from the current timestamp and creates it before the Skill starts.
  3. The attacker gives the directory permissive or otherwise attacker-controlled permissions and creates symbolic links for expected files such as analysis.json, expanded-prompt.txt, or round_1.png.
  4. The Skill executes mkdir -p, which accepts the existing directory instead of detecting the collision.
  5. Subsequent workflow stages write user data or genera ...[truncated 1217 chars]
Remediation
View remediation

Remediation Suggestions

  1. Set a restrictive file-creation mask before creating any artifacts:

    bash
    umask 077
    
  2. Replace the timestamp-derived directory with an atomically created, unpredictable directory:

    bash
    BASE_TEMP_DIR="/tmp/openclaw/sn-infographic"
    mkdir -p -- "$BASE_TEMP_DIR"
    chmod 700 -- "$BASE_TEMP_DIR"
    
    TEMP_DIR=$(mktemp -d "$BASE_TEMP_DIR/task.XXXXXXXXXX") || {
      echo "Unable to create a secure temporary workspace" >&2
      exit 1
    }
    chmod 700 -- "$TEMP_DIR"
    
  3. Verify that the base directory and generated workspace are owned by the current process user and are actual directories rather than symbolic links.

  4. Create sensitive files with owner-only permissions. For critical writes, use exclusive file creation and reject symbolic links rather than relying solely on ordinary shell redirection.

  5. Ensure downstream tools do not follow attacker-controlled symbolic links when opening output files. Where supported, use secure open flags equivalent to exclusive creation and no symbolic-link following.

  6. Add guarded cleanup so artifacts are removed when the workflow exits successfully, fails, or receives a termination signal:

    bash
    cleanup() {
      if [ -n "${TEMP_DIR:-}" ] && [ -d "$TEMP_DIR" ]; then
        rm -rf -- "$TEMP_DIR"
      fi
    }
    trap cleanup EXIT INT TERM
    
  7. If generated images must remain available after worker completion, move only the required final files into an application-controlled output directory and delete all prompt and analysis intermediates immediately.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (14)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

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 69)May include surrounding context.

md
**`$SN_IMAGE_BASE` path explanation**: `$SN_IMAGE_BASE` is the installation directory of the `sn-image-base` skill (`SKILL.md` exists).

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger set includes broad everyday phrases such as 'diagram' and 'data visualization', which can cause the skill to activate for general requests that were not intended to invoke infographic generation. In an agent ecosystem, overbroad invocation can route unrelated user content into this skill's workflow, causing unintended tool use, prompt rewriting, external API calls, and image generation against irrelevant or sensitive input.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The optional questions explicitly check for use of domain-relevant English terminology and distinguish Chinese versus English labels. This introduces a language/locale preference into the evaluation standard, but the document does not indicate that users can choose another language policy or that the constraint is limited to a justified bilingual context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The style-selection policy hard-maps 'Chinese domain' and 'Japanese domain' prompts to locale-specific visual styles without requiring explicit user intent. This can stereotype users based on language or subject matter, produce culturally inappropriate outputs, and create policy or trust issues in a content-generation skill where users expect neutral or user-directed styling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instruction explicitly requires all revised_description content to be written in English only. This is a natural-language locale policy constraint, and the file does not offer a user language choice or explain why English is required for a region- or compliance-specific reason.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/runtime-parameters.md (reported line 21)May include surrounding context.

md
## Image Size

If the Main Agent already resolved an explicit `image_size` (the user stated a supported size upstream), use it directly. Otherwise infer it — the inference currently has a **single option, `2k`**. Never ask the user about it.

Rules:

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/runtime-parameters.md (reported line 72)May include surrounding context.

md
## Image Size

If the Main Agent already resolved an explicit `image_size` (the user stated a supported size upstream), use it directly. Otherwise infer it — the inference currently has a **single option, `2k`**. Never ask the user about it.

Rules:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file hard-codes Chinese terms like 分辨率 and 清晰度 as recognized lead-ins for explicit size parsing, alongside English terms, but nowhere explains a locale policy or offers user language selection. This creates a natural-language locale preference embedded in the skill behavior without documented opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The orientation rules explicitly recognize Chinese tokens such as 竖屏, 横屏, and 方形, but the document does not state that the skill is intentionally bilingual or region-specific. Under the policy, locale-specific behavior should be optional or clearly justified rather than silently baked into the skill instructions.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
93% confidence
Finding

The trigger '图解' is very short and semantically broad, so it can match many ordinary Chinese requests that merely mention explanation-by-image rather than asking to run this specific skill. This increases accidental invocation risk and may lead to unnecessary processing, external model calls, and confusing behavior for users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instruction mandates that all text content use the specified language, and the template also defines a fixed language field. This can violate language/locale choice expectations if the language is imposed by the skill rather than selected or confirmed by the user.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

Line L23 requires absolute language parity and forbids code-switching, which is a natural-language locale policy constraint. Because it mandates language behavior without presenting a user option or documenting a justified region-specific need, it fits the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The file recommends 'Japanese text and anime elements' and 'Japanese katakana accents' as part of the style, which imposes a specific language/locale element in the output without any user opt-in or alternative. This can conflict with policy requiring language or locale choice rather than forcing a specific linguistic style.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.