Back to skill

Security audit

skill-my-prose-poem

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a diary-writing skill, but it needs Review because it can read sensitive photo metadata and optionally install an unpinned package during use.

Install only if you are comfortable with a Chinese-oriented journaling assistant that may process photo timestamps and GPS metadata. Avoid enabling --auto-install or MY_PROSE_POEM_AUTO_INSTALL unless you accept runtime package installation, and consider removing extra EXIF fields or pinning Pillow before use.

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

T08 · Insecure Dependencies

Warning
Location
scripts/extract_exif.py:26
Finding

Runtime Installation of an Unpinned Third-Party Dependency

Content
View full analysis

Vulnerability Details

File Location: scripts/extract_exif.py:26-28
Vulnerability Type: Runtime supply-chain exposure through an unpinned dependency
Risk Level: Medium

Vulnerable Code:

python
subprocess.check_call(
    [sys.executable, "-m", "pip", "install", "--quiet", "pillow>=10.0.0"]
)

The same lower-bound-only dependency constraint appears in requirements.txt:1:

text
pillow>=10.0.0

Technical Analysis

When Pillow is unavailable and the optional auto-install mode is enabled, the script invokes pip at runtime. The constraint specifies only a minimum version, so pip may resolve and install any future version available from the configured package index. This makes dependency resolution non-reproducible and creates a supply-chain execution boundary during normal Skill use.

The dependency is functionally legitimate: Pillow is used to parse image metadata, its package name is correct, and no suspicious package source is explicitly configured. However, installing it dynamically is not required for the Skill's core writing functionality because the documented fallback can ask the user for the photo's time and location. Runtime installation therefore exceeds the minimum behavior necessary to provide the declared functionality.

Attack Path

  1. The environment does not already contain Pillow.
  2. A user provides one or more images for EXIF processing.
  3. The Agent or user invokes scripts/extract_exif.py with --auto-install, or sets MY_PROSE_POEM_AUTO_INSTALL=1.
  4. The script executes pip using the current Python interpreter.
  5. Pip resolves the latest package satisfying pillow>=10.0.0 from the environment's configured index.
  6. If the selected distribution or package index is compromised, attacker-controlled installation or package code may execute with the privileges of the Agent process.
  7. The compromised dependency may then access files, network resour ...[truncated 800 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove automatic dependency installation from the runtime script.
  2. If Pillow is missing, return the existing error and use the documented fallback of asking the user for capture time and location.
  3. Require dependency installation as an explicit setup action rather than performing it while processing user content.
  4. Pin Pillow to a reviewed exact version instead of using a lower-bound-only constraint.
  5. Generate and verify cryptographic hashes for approved distributions, for example through a hash-locked requirements file.
  6. Install dependencies inside an isolated virtual environment with minimal filesystem and network permissions.
  7. Configure pip to use an explicitly trusted package index and disable unexpected supplemental indexes.
  8. Establish a controlled dependency-update process that includes vulnerability review and regression testing before changing the pinned version.

other

Note
Location
scripts/extract_exif.py:105
Finding

EXIF Helper Exposes Metadata Beyond the Documented Minimum

Content
View full analysis

Vulnerability Details

File Location: scripts/extract_exif.py:105-121
Vulnerability Type: Excessive collection and disclosure of local image metadata
Risk Level: Low

Vulnerable Code:

python
gps_parsed = parse_gps(exif_dict.get("GPSInfo"))
text_candidates = {
    "ImageDescription": exif_dict.get("ImageDescription"),
    "XPTitle": exif_dict.get("XPTitle"),
    "XPComment": exif_dict.get("XPComment"),
    "UserComment": exif_dict.get("UserComment")
}
result = {
    "DateTime": exif_dict.get("DateTime"),
    "DateTimeOriginal": exif_dict.get("DateTimeOriginal"),
    "Make": exif_dict.get("Make"),
    "Model": exif_dict.get("Model"),
    "Software": exif_dict.get("Software"),
    "GPSInfo": exif_dict.get("GPSInfo"),
    "GPSParsed": gps_parsed,
    "LocationTextCandidates": text_candidates,
    "AddressInExif": "EXIF usually does not contain a directly usable complete address; coordinates or no address information are more common."
}

Technical Analysis

SKILL.md states that only capture time, GPS information, and camera model should be used as objective context. The helper nevertheless returns additional fields, including camera make, editing software, image descriptions, titles, and user comments.

Textual EXIF fields can contain names, descriptions, application-generated notes, or other private information unrelated to timeline reconstruction. Returning these fields in the JSON output exposes them to the Agent context even though they are not necessary for sorting photographs or supporting the declared writing workflow.

The script processes metadata locally and contains no code that transmits it to a remote service. Accordingly, this is a least-data and privacy-boundary issue rather than confirmed data exfiltration.

Attack Path

  1. A user supplies a photograph containing EXIF metadata.
  2. The photograph includes sensitive information in fields such as `UserComm ...[truncated 1074 chars]
Remediation
View remediation

Remediation Suggestions

  1. Apply strict data minimization and return only fields required by the documented workflow:
    • DateTime
    • DateTimeOriginal
    • Model
    • Parsed GPS coordinates, when explicitly needed
  2. Remove ImageDescription, XPTitle, XPComment, UserComment, Software, and Make from default output.
  3. Avoid returning raw GPSInfo; return only validated, normalized coordinates when location processing is explicitly requested.
  4. Ask for explicit user consent before extracting GPS metadata because coordinates can reveal sensitive locations.
  5. Add a metadata-selection option if additional fields are ever needed, keeping the default output minimal.
  6. Document precisely which fields are read, emitted, and retained by the surrounding Agent platform.
  7. Add tests verifying that unexpected EXIF fields cannot appear in the default JSON response.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is prose journaling, but the instructions add operational behaviors such as reading image metadata, parsing GPS/time/device fields, reordering inputs by EXIF time, and optionally invoking pip. This mismatch can conceal sensitive-data processing and code-execution behaviors behind an innocuous description, undermining user and platform trust and expanding privacy and execution risk.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest says the skill should be used whenever the user mentions broad topics like writing a diary, recording the day, sorting emotions, travel memories, life fragments, or inner monologue, even without explicitly asking for this specific style. These triggers are common conversational intents and the file does not provide exclusion conditions or narrow scope constraints, creating a high risk of unintended invocation.

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

md
- 仓库已提供 `requirements.txt`,用于一键安装非默认依赖:`pip install -r requirements.txt`。

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code can auto-install Pillow at runtime when a flag or environment variable enables it, which is unnecessary for a journaling skill and creates an avoidable software supply chain risk. A skill that unexpectedly modifies its environment and pulls executable code from external repositories is dangerous because it can introduce unreviewed code and make behavior non-deterministic across runs.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation explicitly says '这个 Skill 不替你写' ('this Skill does not write for you'), but elsewhere in the same README it states '再动笔' and provides full generated prose outputs after user prompts. This is an active contradiction in the skill's intent documentation, not merely an omission.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented trigger phrases are very broad and map to common user intents such as journaling, emotional reflection, photo-based writing, and travel recall. In an auto-activation environment, this can cause the skill to engage without clear user intent, potentially steering conversations and exposing personal emotional or photo-derived metadata to the skill flow unexpectedly.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Line L231 says the skill 'doesn't write stories for you,' but line L237 and the examples clearly describe a workflow where the skill asks questions and then writes the resulting text. This is a direct intent-code/documentation divergence within the skill documentation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The README describes automatic triggering on Chinese keywords without presenting opt-in, language preference handling, or confirmation. This raises consent and control issues: users may unintentionally invoke the skill in ordinary conversation, especially when discussing sensitive feelings or diary-like content, leading to unwanted behavioral takeover and possible processing of personal context.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill instructs the agent to invoke shell/Python capabilities and potentially install packages, but it does not declare any explicit tool scope or allowed-tools constraints. This creates an overbroad execution surface where file access and command execution may occur without clear permission boundaries, increasing the chance of unintended local access or command misuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill description and all behavioral instructions are written to operate in Chinese, but the file does not offer the user a language choice or state that the skill is limited to a Chinese-language context for a justified reason. This can violate language/locale policy because it implicitly enforces one language without opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill claims to 'only ask and write,' but later directs the agent to collect photos, execute a script, and process EXIF metadata. That contradiction is security-relevant because it obscures data-handling and execution behavior from reviewers and users, making risky capabilities appear harmless.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Executing a local Python script on user-supplied image paths is an unnecessary privileged action for a prose-journaling skill. If path handling is weak or the environment is broad, this can expose local files, process unintended inputs, or normalize shell/script execution in a context that should be purely conversational.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Allowing automatic package installation for a diary-writing skill introduces unnecessary code-execution and supply-chain risk. Even if intended to install Pillow, invoking pip during normal skill operation can fetch untrusted code, alter the runtime environment, and create a path for broader compromise unrelated to the core user task.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document’s instructions are entirely prescriptive in Chinese and define required wording and stylistic outputs without offering any user opt-in or language/locale choice. Under the policy, forcing a specific language or locale without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
92% confidence
Finding

The script performs a runtime pip install via subprocess, which executes network-dependent package management code during normal operation. Even though the command is not shell-injected, this expands the trust boundary to package indexes and the local Python environment, enabling unintended code execution or environment tampering if dependency sources or installation context are compromised.

Content

Scanner excerpt · scripts/extract_exif.py (reported line 26)May include surrounding context.

python
"hint": "Run: pip install -r requirements.txt"
        }
    try:
        subprocess.check_call(
            [sys.executable, "-m", "pip", "install", "--quiet", "pillow>=10.0.0"]
        )
        from PIL import Image as PILImage

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Automatic package installation occurs at the operation site without an explicit user-facing confirmation, so a normal execution path can trigger environment changes and code retrieval unexpectedly. This is dangerous because users and operators may not realize the skill is performing privileged dependency management, increasing the chance of silent supply-chain compromise or policy violations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest emphasizes a constrained role: ask layered questions, write diary-style prose, and avoid fabrication. In contrast, this file performs metadata extraction from images, including camera make/model and GPS-derived coordinates, then changes the sequence of supplied images based on EXIF timestamps. Those operations go beyond the plain-language expectation of '只问、只写' and introduce analysis of hidden metadata rather than just helping compose text from user-provided memories.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The returned field value is hard-coded in Chinese, which forces a specific language for output regardless of user preference or locale selection. The file provides no opt-in, configuration, or justification for restricting output to Chinese.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This note presented in the result payload is hard-coded in Chinese and will be shown whenever ordering differs, regardless of the user's language preference. No language selection mechanism or documented region-specific justification is present in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file is entirely written in Chinese and frames the examples as direct writing references, which can implicitly constrain the skill's output language. Under the language/locale policy rule, forcing a specific language without user opt-in can be a policy issue when no alternative or choice is documented.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown reference forces a specific language/locale in its natural-language content and does not offer any alternative or indicate that Chinese is required for a justified region-specific purpose. Under the policy, language constraints without user opt-in can be considered a natural-language policy violation.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The dependency is specified as pillow>=10.0.0, which allows any newer version to be installed and makes builds non-reproducible. This is risky because a vulnerable or breaking upstream release could be pulled in later without review, and the exact installed version cannot be audited reliably.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
pillow>=10.0.0

Unverifiable Dependency: pillow has 16 known advisory(ies) (CVE-2016-2533 (Pillow buffer overflow in ImagingPcdDecode); CVE-2023-50447 (Arbitrary Code Execution in Pillow); CVE-2021-27922 (Pillow Uncontrolled Resource Consumption) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding

Pillow has a history of security advisories, including issues such as arbitrary code execution and resource exhaustion, and the manifest does not pin the package to a known-safe release. Because the installed version is unconstrained above 10.0.0, it is impossible to verify from this file alone whether deployment will use a patched version, which increases supply-chain and runtime risk if image parsing is exposed to user-controlled files.

Content

No source excerpt is available for this finding.