Back to skill

Security audit

我的文学时刻.skill

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches its diary-writing purpose, but it can inspect sensitive photo metadata and install Python packages during use without a clear confirmation step.

Install only if you are comfortable with a journaling skill reading photo EXIF data that may include precise location and device details. Avoid enabling --auto-install or MY_PROSE_POEM_AUTO_INSTALL unless you explicitly trust the package source, and prefer installing reviewed, pinned dependencies in an isolated environment. Remove location metadata from photos first if you do not want it entering the agent context.

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 (3)

T08 · Insecure Dependencies

Warning
Location
scripts/extract_exif.py:39
Finding

Runtime Installation of Unpinned Python Dependencies

Content
View full analysis
=10.0.0", "pillow-heif"] ) from PIL import Image as PILImage from PIL.ExifTags import TAGS as PILTAGS, GPSTAGS as PILGPSTAGS from pillow_heif import register_heif_opener ``` The corresponding dependency file contains: ```text pillow>=10.0.0 pillow-heif ``` ### Technical Analysis When automatic installation is enabled, the EXIF utility invokes `pip` at runtime and retrieves mutable package releases from the configured Python package index. `pillow-heif` has no version constraint, while `pillow>=10.0.0` permits any future version satisfying the lower bound. Neither package is protected by an integrity hash. The package names are consistent with the declared image-processing feature, and there is no evidence that they are intentionally malicious. Nevertheless, installing mutable dependencies during Skill execution creates a supply-chain execution channel: package installation and import occur inside the Agent process environment without a separately reviewed lockfile or integrity check. The subprocess invocation uses an argument list rather than a shell string, so the identified issue is dependency trust rather than command injection. ### Attack Path 1. Pillow or `pillow-heif`, a transitive dependency, or the configured p ...[truncated 976 chars]
Remediation
View remediation

other

Note
Location
scripts/extract_exif.py:143
Finding

EXIF Extraction Collects More Metadata Than the Declared Minimum

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
README.md:49
Finding

Documentation Recommends Global Installation of an Unpinned CLI Package

Content
View full analysis
Remediation
View remediation
`. 2. Prefer a local, isolated installation over global installation where the platform permits it. 3. Identify the official package registry and publisher so users can verify package provenance. 4. Recommend checking package signatures, integrity metadata, and release checksums where available. 5. Warn users not to run the installation command with `sudo` or administrative privileges. 6. Document a manual Skill installation method that does not require installing a global CLI. 7. Periodically review and update the pinned version after dependency and publisher verification. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (28)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill presents itself primarily as a diary-writing assistant, but its instructions include reading image EXIF metadata, extracting GPS/time/device data, reordering user content based on metadata, invoking local system utilities, and optionally installing dependencies. This mismatch can cause users and reviewers to underestimate privacy and execution risks, especially because location metadata is sensitive and auto-install behavior expands the trust boundary.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The activation rule is extremely broad, telling the system to prefer this skill for many ordinary topics such as journaling, emotions, travel memories, photos, and inner monologue even without explicit invocation. Over-broad triggering increases the chance that photo metadata extraction or other side behaviors occur in contexts where the user only expected casual writing help, expanding both privacy exposure and attack surface.

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
96% confidence
Finding

Executing package-management operations is not justified by the stated journaling role of the skill and materially increases its power over the host environment. In this context, the mismatch between declared purpose and actual capability makes the behavior more dangerous because users and operators are less likely to expect or approve software installation side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README says the skill reads EXIF fields including GPSInfo and Model, which may reveal precise location, travel history, and device details, but it does not prominently warn users before access. In a journaling/photo skill, those metadata fields are particularly sensitive because they can expose private patterns about where and when a user was present.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Broad automatic-trigger phrases can cause the skill to activate in normal conversation without clear user intent. In this skill's context, that can unexpectedly steer sensitive journaling, emotional disclosure, or photo-based processing, increasing the chance of oversharing or invoking metadata handling the user did not explicitly request.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger section lists only Chinese activation phrases and states the skill auto-activates when those keywords are mentioned. This imposes a language-specific interaction model without opt-in or clear justification for the locale constraint, which can violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation explicitly says the skill must not invent sensory details, emotional amplification, dialogue, causality, or story from visuals. But the example outputs later introduce unprovided details such as specific lighting, smells, drink states, and reflective conclusions beyond the user prompts, directly undermining the claimed non-fabrication boundary.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill instructs the agent to invoke local shell/Python capabilities for EXIF extraction and optional package installation, but it does not declare an explicit tool scope or permissions boundary. That creates hidden execution behavior and weakens reviewability, increasing the risk of unintended command execution or file access beyond what users would expect from a writing assistant.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The entire skill instruction set is written to operate in Chinese and presents a fixed stylistic persona without indicating that the user may choose another language. This creates a natural-language policy concern because it implicitly enforces a specific language/locale without user opt-in or a documented region-specific justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill directs extraction of EXIF fields including GPSInfo/GPSParsed, DateTime, and device model without a clear, up-front privacy warning or consent checkpoint. GPS and timestamp metadata can reveal precise location patterns, home/work inferences, and sensitive movement history, making this especially risky in a personal journaling context where users may share intimate photos casually.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file consists entirely of Chinese-language style anchors and labels them as direct writing references, which implicitly constrains generated output to Chinese. There is no indication that users can opt into another language or that the locale restriction is required for a region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

This file consists entirely of Chinese-language instructions and examples, with no indication that the user may choose another language or that the skill is explicitly limited to a Chinese-only context. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is expected to extract metadata from images, but this implementation also mutates the runtime by installing dependencies on demand. That is a capability escalation beyond passive file parsing and creates avoidable security and operational risk, including supply-chain compromise and unexpected execution of installer code.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
94% confidence
Finding

This branch silently installs pillow-heif at runtime when HEIF support is missing. Even without shell injection, invoking pip during execution introduces external code into the environment without clear consent and is especially dangerous in an agent skill that should only process user content, not modify the host.

Content

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

python
if not auto:
                return "pillow-heif not installed; HEIC/HEIF unsupported"
            try:
                subprocess.check_call(
                    [sys.executable, "-m", "pip", "install", "--quiet", "pillow-heif"]
                )
                from pillow_heif import register_heif_opener

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Automatic pip installation occurs without visible user confirmation or administrator approval, so users invoking a journaling skill may unknowingly trigger environment changes and network dependency retrieval. Lack of disclosure increases the likelihood of unsafe surprise behavior and undermines informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This second auto-install path silently installs Pillow and pillow-heif when missing, again causing runtime environment modification without transparent disclosure. In the context of a non-administrative content skill, hidden dependency installation is an unjustified and risky behavior.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

This code performs automatic package installation at runtime using pip, which changes the execution environment and pulls code from external package sources during normal skill execution. In a skill whose declared purpose is literary journaling, this is unnecessary and risky because it can introduce supply-chain exposure, execute package installation hooks, and violate least-privilege expectations.

Content

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

python
}

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

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code extracts detailed EXIF data, including GPS coordinates, timestamps, camera details, and comments, which can reveal highly sensitive location and behavioral information. For a literary journaling assistant, this is scope-expanding data access that increases privacy risk, especially if users provide photos without realizing hidden metadata will be processed.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Calling the macOS mdls utility gives the skill a host-level file inspection capability outside normal image parsing libraries. While not obviously malicious, it broadens local system interaction in a way that is not well justified by the skill's stated role and could expose extra metadata from arbitrary local files if path controls are weak.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

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

python
return None

    try:
        proc_result = subprocess.run(
            ["mdls", image_path],
            capture_output=True,
            text=True,

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The README repeatedly frames the skill as primarily asking questions rather than writing, yet the same document says 'then write' and includes multiple examples where the skill outputs complete diary-style prose. This is not mere incompleteness; the phrasing actively minimizes a core behavior that the rest of the documentation demonstrates.

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 file contains instructional content exclusively in Chinese, and there is no natural-language indication that users may choose another language or that the file is intended only for a Chinese-language audience. Under the policy rule, forcing a specific language without user opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The requirement 'pillow>=10.0.0' is not fully pinned and permits installation of a wide range of versions, making deployments non-reproducible and potentially exposing the skill to vulnerable or incompatible releases. For an image-processing library, this increases supply-chain and parser-risk exposure.

Content

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

text
pillow>=10.0.0
pillow-heif

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
91% confidence
Finding

Pillow has multiple historical advisories, including issues affecting image parsing and resource handling, but the manifest does not pin an exact version, so it is impossible to verify whether the installed version is fixed. Given this skill may plausibly handle user-supplied photos or image-derived content, an affected Pillow release could increase the risk of denial of service or, in worst cases, code execution through malicious image files.

Content

No source excerpt is available for this finding.