Back to skill

Security audit

Image Quote Overlay

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says: it creates social-media quote images from a configured local photo folder, with some privacy and temporary-file cautions but no hidden or malicious behavior found.

Install only if you are comfortable letting the skill read JPGs from the configured photo folder and create reusable image files for possible social-media workflows. Use a dedicated non-sensitive photo directory, review each generated image before any upload/posting skill uses it, and prefer a private output directory over shared /tmp paths when possible.

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
scripts/create-overlay-image.sh:42
Finding

Predictable Shared Temporary Files Permit File Clobbering and Cross-Run Interference

Content
View full analysis

Vulnerability Details

File Location: scripts/create-overlay-image.sh, lines 42–63 and 80
Vulnerability Type: Predictable temporary files, symlink race, and unsafe concurrent execution
Risk Level: Medium

Vulnerable Code:

bash
magick "${CHOSEN_PIC}" \
  -resize "${WIDTH}x" \
  -resize "${WIDTH}x${HEIGHT}^" \
  -gravity center \
  -extent "${WIDTH}x${HEIGHT}" \
  /tmp/oc-bg-resized.png

magick -size ${WIDTH}x${HEIGHT} gradient:"rgba(0,0,0,0)-rgba(0,0,0,0.88)" \
  /tmp/oc-gradient-bottom.png

magick /tmp/oc-bg-resized.png /tmp/oc-gradient-bottom.png -composite /tmp/oc-bg-gradient.png

magick -background none -fill white \
  -font "/Users/quocmodoro/Library/Fonts/Anton-Regular.ttf" \
  -pointsize 50 -size ${QUOTE_W}x160 \
  caption:"${QUOTE}" /tmp/oc-quote-text.png

rm -f /tmp/oc-bg-resized.png /tmp/oc-bg-gradient.png /tmp/oc-quote-text.png /tmp/oc-gradient-bottom.png

Technical Analysis

Every invocation reads and writes the same globally predictable filenames under /tmp. These paths are neither unique to the process nor contained in a private directory. No atomic creation mechanism, ownership validation, or locking is used.

This creates two related weaknesses:

  1. Cross-run interference: Concurrent invocations can overwrite, consume, or remove each other's intermediate images.
  2. Local file-clobbering race: A local attacker able to write to /tmp can pre-create or race the predictable paths, including by using symbolic links. Depending on ImageMagick and operating-system file-opening behavior, writes may be redirected to another file writable by the skill process.

The cleanup operation also targets predictable paths without confirming that they still refer to files created by the current process.

Attack Path

  1. A local attacker identifies the fixed paths /tmp/oc-bg-resized.png, /tmp/oc-gradient-bottom.png, /tmp/oc-bg-gradient.png, and `/tmp/oc-quote-tex ...[truncated 1523 chars]
Remediation
View remediation

Remediation Suggestions

Create a private, uniquely named temporary directory for each invocation and remove it through an exit trap:

bash
set -euo pipefail
umask 077

TMP_DIR="$(mktemp -d "${TMPDIR:-/tmp}/image-quote-overlay.XXXXXX")"
trap 'rm -rf -- "$TMP_DIR"' EXIT HUP INT TERM

BG_RESIZED="$TMP_DIR/bg-resized.png"
GRADIENT="$TMP_DIR/gradient-bottom.png"
BG_GRADIENT="$TMP_DIR/bg-gradient.png"
QUOTE_TEXT="$TMP_DIR/quote-text.png"

Pass these variables to every ImageMagick command instead of using fixed /tmp/oc-*.png paths. Additional hardening should include:

  • Verify that mktemp succeeded before processing.
  • Keep the restrictive umask 077 so other users cannot read intermediate images.
  • Quote every temporary-path expansion.
  • Use trap so cleanup occurs on success, error, interruption, or termination.
  • Do not manually delete globally predictable paths.
  • If output paths may be attacker-controlled, validate the output destination against the application's allowed directory and overwrite policy.
  • Add a concurrency test to verify that parallel invocations cannot affect one another.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/create-overlay-image.sh (reported line 79)May include surrounding context.

sh
-quality 95 "${OUTPUT}"

# Cleanup
rm -f /tmp/oc-bg-resized.png /tmp/oc-bg-gradient.png /tmp/oc-quote-text.png /tmp/oc-gradient-bottom.png

echo "Created: ${OUTPUT}"
echo "Photo used: $(basename ${CHOSEN_PIC})"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README explicitly describes selecting personal photos from a local directory and returning generated image paths for reuse by other skills, but it provides no privacy, consent, retention, or access-control guidance. In a multi-skill automation environment, this increases the risk of unintended disclosure or downstream misuse of personal images and filesystem paths, especially when outputs are reused automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly describes selecting random personal photos from a local directory, generating derivative images, and returning file paths for use by other skills, but it does not clearly warn users about local photo access, disk persistence, or downstream reuse. This can lead to privacy and consent issues because users may not realize personal images are being processed and retained for later automation steps.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The integration notes say generated images are used by posting/upload skills for LinkedIn, Facebook, WordPress, and X, but the documentation does not warn that locally sourced personal photos may be published to external platforms. This omission increases the risk of unintended disclosure of personal images or metadata through automated cross-skill workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The workflow examples explicitly chain generated images into LinkedIn, Facebook, and WordPress posting flows but do not warn that content and embedded contact details may be uploaded to third-party platforms. This creates a real risk of unintended external publication, privacy leakage, and accidental disclosure when users copy examples without understanding the sharing boundary.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README presents core usage instructions and descriptions in Vietnamese, which effectively forces a specific language for users reading the skill documentation. There is no indication that language selection is optional or that the skill is intentionally limited to a Vietnamese-speaking audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The descriptive and instructional text is presented in Vietnamese, which effectively imposes a language choice on users reading or invoking the skill documentation. Under the language/locale policy, this should either offer an alternative language or clearly document that the skill is intentionally region- or team-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This file mixes English headings with Vietnamese instructional comments, which imposes a specific language on users without any opt-in or justification. The policy explicitly calls out language or locale constraints as findings when the skill does not offer a choice or explain the restriction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README encourages writing generated files into /tmp/openclaw/uploads, a temporary and commonly shared location, without warning about overwrite, symlink, or exposure risks. In multi-user or automation environments, predictable paths under /tmp can lead to accidental data disclosure, clobbering existing files, or writing through attacker-controlled links if downstream tooling runs with elevated privileges.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The package description forces a specific language in user-facing metadata, which can violate language/locale policy when no opt-in or justification is provided. There is no accompanying indication that this skill is intended only for Vietnamese-speaking users or that other language options exist.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.