Back to skill

Security audit

多平台摄影配文

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a photo-caption writing guide, but it asks for command and file-writing authority that its captioning purpose does not justify.

Review this skill before installing in any agent that grants declared tools automatically. It appears safe as a writing prompt, but should not need exec or broad write access; prefer a version limited to user-selected image/context input and caption output, with no shell commands, no broad filesystem writes, and no API key or callback handling unless those are explicitly implemented and scoped.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:22
Finding

Unnecessary Command Execution and Filesystem Permissions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 22–25
Vulnerability Type: Excessive tool permissions that violate least privilege
Risk Level: Medium

Vulnerable Code

yaml
tools:
- read
- exec
- write

The unnecessary capabilities are further advertised at SKILL.md, lines 373–376:

markdown
- **File processing**: Supports reading, parsing, and writing multiple file formats
- **API integration**: Calls external services through standardized interfaces and processes responses
- **Command execution**: Executes system commands in a secure sandbox and collects results
- **Information retrieval**: Rapidly searches and filters target data

Technical Analysis

The Skill's stated purpose is to generate platform-specific photography captions from a photograph and contextual information supplied by the user. This task does not inherently require arbitrary system command execution or general filesystem write access.

Nevertheless, the manifest requests exec and write in addition to read. The document does not define an enforceable command allowlist, restricted writable paths, argument validation, or sandbox policy. Its statement that commands run in a secure sandbox is descriptive prose rather than an implemented security control.

This creates a least-privilege violation. In an Agent platform that automatically grants the declared tools, untrusted user input or adversarial text extracted from an image could influence the Agent into invoking capabilities unrelated to caption generation. Although no malicious command or confirmed exploitation payload is present in the audited file, the excessive permission boundary materially increases the consequences of prompt injection.

The configuration is also internally inconsistent: it advertises command execution while later describing the Skill as pure Markdown. This ambiguity can cause hosting platforms or reviewers to grant capabilitie ...[truncated 1695 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove exec and write from the tool declaration because caption generation does not require command execution or filesystem modification.
  2. Retain read only if the hosting platform needs it to access a user-selected image. Scope it to explicit user-provided files or an isolated upload directory.
  3. Remove unsupported claims about generic command execution, file processing, API integration, and asynchronous callbacks unless those features are implemented and required.
  4. Make the availability classification consistent with the actual implementation by declaring the package a pure Markdown Skill.
  5. If execution is introduced in a future version, enforce controls in code rather than relying on prose:
    • Permit only fixed executable paths and explicitly approved commands.
    • Pass arguments as structured arrays instead of constructing shell command strings.
    • Reject user-controlled command names, shell operators, paths, and environment-variable expansions.
    • Disable network access unless a documented endpoint is essential.
    • Restrict readable and writable paths to a dedicated workspace.
    • Run with a non-privileged operating-system account in an isolated sandbox.
    • Require explicit user confirmation before any external side effect.
  6. Treat image metadata, OCR output, captions, callback addresses, and all other user-provided values as untrusted data and prevent them from becoming tool instructions.
  7. Add automated manifest checks that reject capabilities not mapped to a documented and tested workflow requirement.
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 (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description says to use the skill whenever the user wants to improve efficiency, automate workflows, batch process, or optimize workflows. These phrases are very broad and not specific to photo-caption generation, so they could cause unintended invocation for many unrelated everyday automation tasks.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Declaring exec for a social-media captioning skill is unnecessary for the stated use case and materially expands the attack surface. If an agent honors this capability, prompt-influenced inputs could induce shell command execution, turning a text-generation skill into a code-execution path without a legitimate operational need.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is presented as a caption-generation tool, but the documentation later claims unrelated capabilities such as file processing, API integration, command execution, and information retrieval. This capability drift can cause an agent or reviewer to over-trust broader actions than the user intended, increasing the risk of unnecessary access to files, networked services, or execution surfaces.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file inconsistently describes itself as pure Markdown/natural-language driven while elsewhere declaring executable-command support. This mismatch can mislead operators and security controls about the real privilege level of the skill, causing underestimation of execution risk and inappropriate deployment in less restricted environments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The instruction bans em dashes across the entire output and imposes a fixed stylistic convention for all captions. This is a natural-language policy concern because it forces one language/style preference on users without presenting it as optional or user-configurable.

Content

No source excerpt is available for this finding.