Back to skill

Security audit

Image AI Kit

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local image-processing and OCR toolkit with ordinary dependency and privacy considerations, but no evidence of hidden execution, exfiltration, or persistence.

Install this only in an isolated Python environment and prefer pinned, hash-verified dependencies if you need reproducible or higher-assurance installs. Be careful running OCR on confidential images because extracted text may be easier to copy or share, and note that the claimed smart subject crop is implemented as a simpler center/aspect crop.

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

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned and Unverified Third-Party Dependencies

Content
View full analysis

Vulnerability Details

File Location: requirements.txt:1-5
Vulnerability Type: Supply-chain exposure caused by mutable dependency resolution
Risk Level: Medium

Vulnerable Code Snippet

text
pillow>=10.0.0
opencv-python>=4.8.0
pytesseract>=0.3.10
numpy>=1.24.0
scikit-image>=0.22.0

The installation instructions invoke this dependency file directly:

bash
pip install -r requirements.txt

This command appears in README.md:8 and SKILL.md:41.

Technical Analysis

Every dependency uses only a minimum-version constraint. Consequently, installations performed at different times can resolve to different, previously unaudited package versions. The project also supplies no lock file or cryptographic hashes with which pip could verify the exact artifacts approved by the maintainers.

The listed package names are consistent with the image-processing functionality, and the reviewed code does not establish that any current package is malicious. The risk arises because future installation results are mutable. If a dependency release or package-index artifact is compromised, the documented installation command can retrieve and install that artifact without detecting that it differs from the version originally reviewed.

Python packages may execute build or installation logic, and their imported modules execute with the privileges of the Python process. This therefore creates a supply-chain execution path rather than merely a reproducibility issue.

Attack Path

  1. An attacker compromises a permitted dependency's publishing account, distribution artifact, or relevant package-index delivery path.
  2. The attacker publishes a version satisfying the project's broad >= constraint.
  3. A user follows the documented pip install -r requirements.txt command.
  4. pip resolves the compromised version because no exact version or artifact hash is required.
  5. Malicious packag ...[truncated 836 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace minimum-only constraints with exact, reviewed versions using ==.
  2. Generate and commit a deterministic lock file suitable for the supported Python environments.
  3. Record cryptographic hashes for every accepted distribution and install with pip install --require-hashes.
  4. Resolve transitive dependencies into the lock file rather than pinning only direct dependencies.
  5. Obtain packages only from an explicitly configured trusted index; disable unintended extra indexes to reduce dependency-confusion exposure.
  6. Use automated dependency scanning and a reviewed update process to avoid leaving pinned packages indefinitely outdated.
  7. Perform dependency installation in an isolated virtual environment or container under a non-privileged account.
  8. Update README.md and SKILL.md so their installation commands use the locked, hash-verified dependency set.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (19)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file's natural-language title, class docstring, and method docstrings are written in Chinese, which indicates a language-specific skill presentation without any visible user opt-in or documented locale requirement. Under the policy, forcing a specific language without user choice or a justified region-specific constraint is a natural-language policy concern.

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’s title, class docstrings, status messages, and error strings are all written in Chinese, which indicates a hard-coded language choice in user-facing text. The file does not offer any language/locale selection or explain that the skill is intentionally limited to a Chinese-speaking context, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The docstring at L107 describes this as '主体检测裁剪 (简化版,使用显著性检测)', which states the function uses saliency-based subject detection. However, the actual logic from L127-L137 only computes a center crop based on aspect ratio and never performs saliency or subject detection. This is an active contradiction between the documented intent and the implemented behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README describes the skill in Chinese ('智能图像处理工具包。') and does not indicate that this language choice is optional or region-specific. This can violate a language/locale policy when users are not given an explicit choice or explanation for the locale restriction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill advertises OCR extraction and batch image processing without warning that images may contain sensitive personal or business data, and OCR can convert that data into easily copied text. This increases the risk of users processing confidential documents or photos without understanding privacy implications, especially at batch scale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file contains user-facing natural-language strings and docstrings exclusively in Chinese, starting with the title and continuing throughout the examples. Under the policy rule, forcing a specific language without opt-in can be a locale/language policy violation when no alternative or justification is provided.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified with a lower bound only, so builds may resolve to different versions over time. This weakens reproducibility and makes it difficult to verify whether a deployed version includes fixes for known Pillow vulnerabilities, which is relevant in an image-processing skill that parses untrusted image data.

Content

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

text
pillow>=10.0.0
opencv-python>=4.8.0
pytesseract>=0.3.10
numpy>=1.24.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
95% confidence
Finding

Pillow has multiple historical advisories, but because the manifest does not pin a version, it is impossible to verify whether deployed environments receive a fixed or affected release. This matters more here because the skill processes images, and image parsers have a history of memory corruption, resource exhaustion, and code execution issues.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

Using an unpinned OpenCV package means the installed version can vary by environment and time. For a skill centered on image processing, this increases exposure to supply-chain uncertainty and makes it hard to prove the selected version is not affected by known OpenCV security issues.

Content

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

text
pillow>=10.0.0
opencv-python>=4.8.0
pytesseract>=0.3.10
numpy>=1.24.0
scikit-image>=0.22.0

Unverifiable Dependency: opencv-python has 16 known advisory(ies) (CVE-2017-12864 (Integer Overflow or Wraparound in OpenCV); CVE-2017-12598 (Out-of-bounds Read in OpenCV ); CVE-2019-14493 (NULL Pointer Dereference in OpenCV.) +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
95% confidence
Finding

OpenCV has known advisories, and without a pinned version there is no reliable way to determine if the installed package is vulnerable. Given this skill’s reliance on image processing, unresolved OpenCV version ambiguity raises the risk of consuming untrusted media with a potentially affected native library.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The pytesseract dependency is not pinned to a specific version, so installs are not reproducible and may silently drift. While this is typically a hygiene issue rather than an immediate exploit, it reduces confidence in the security posture of the OCR component and its transitive dependencies.

Content

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

text
pillow>=10.0.0
opencv-python>=4.8.0
pytesseract>=0.3.10
numpy>=1.24.0
scikit-image>=0.22.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

A lower-bound-only NumPy requirement allows version drift across installations, complicating vulnerability assessment and rollback. Because NumPy is a foundational native-code package, unpinned resolution can increase operational and security risk if a bad or vulnerable release is selected.

Content

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

text
pillow>=10.0.0
opencv-python>=4.8.0
pytesseract>=0.3.10
numpy>=1.24.0
scikit-image>=0.22.0

Unverifiable Dependency: numpy has 16 known advisory(ies) (CVE-2014-1859 (Numpy arbitrary file write via symlink attack); CVE-2021-41495 (NumPy NULL Pointer Dereference); CVE-2021-33430 (NumPy Buffer Overflow (Disputed)) +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
93% confidence
Finding

NumPy has had security advisories, and an unpinned requirement prevents verification that deployed instances avoid affected versions. Although NumPy is not the primary media parser here, it is a compiled dependency widely used in image pipelines, so version uncertainty is still a supply-chain weakness.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The scikit-image package is specified without an exact version, so future installs may fetch different releases than originally tested. In an image-processing skill, this undermines reproducibility and can indirectly introduce vulnerable or incompatible code paths.

Content

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

text
opencv-python>=4.8.0
pytesseract>=0.3.10
numpy>=1.24.0
scikit-image>=0.22.0

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file's docstrings and user-facing output are written in Chinese throughout, including the save confirmation message. This imposes a specific language choice on users without offering a language option or documenting that the skill is intended only for a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The module docstring is written entirely in Chinese, which is a natural-language locale choice embedded in the file. Under the policy, forcing a specific language without user opt-in or justification can be a language/locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The print statement emits a Chinese-only user-facing message when the test file is run. This imposes a specific language on users without offering a language choice or documenting that the tool is intended for a Chinese-speaking environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The module docstring and test/docstring strings are written in Chinese (for example, '单元测试' and '测试图像处理器'), which imposes a specific language in the skill's natural-language surface. The file does not offer any language choice or explain that the locale restriction is intentional for a region-specific purpose.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.