Back to skill

Security audit

摄影照片评分/Photo Scorer

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to score photos locally, but its installation path relies on mutable third-party code, unpinned ML packages, and unchecked model files.

Review the install steps before using this skill. Prefer installing in a dedicated virtual environment or container as a non-admin user, pin dependency versions, verify model checksums, and avoid running dependency installs from mutable third-party repositories unless you trust those sources.

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
README.md:80
Finding

Unpinned Third-Party Repositories and Dependencies Create a Supply-Chain Execution Risk

Content
View full analysis
=2.0.0 torchvision>=0.15.0 transformers>=4.30.0 tensorflow>=2.12.0 tf_keras>=2.12.0 Pillow>=10.0.0 requests>=2.25.0 numpy>=1.23.0 matplotlib>=3.7.0 tqdm>=4.65.0 ``` From `SKILL.md:309`: ```text Required packages (install via `pip install -r requirements.txt`): `torch>=2.0.0`, `torchvision>=0.15.0`, `transformers>=4.30.0`, `tensorflow>=2.12.0`, `tf_keras>=2.12.0`, `pillow>=10.0.0`, `numpy>=1.23.0` ``` ### Technical Analysis The documented installation process clones the current default branches of two external GitHub repositories and immediately executes their dependency installation instructions. No repository commit hashes, signed release tags, package hashes, or integrity checks are specified. Consequently, the code and dependency definitions installed by users can change a ...[truncated 2540 chars]
Remediation
View remediation
``` 2. Replace lower-bound-only package constraints with a tested lockfile containing exact versions and cryptographic hashes. Install with hash enforcement: ```bash pip install --require-hashes -r requirements.lock ``` 3. Use a dependency-locking workflow such as `pip-tools`, Poetry, or another reproducible resolver. Review and regenerate the lockfile through a controlled update process. 4. Remove dependencies not used by the audited scripts, particularly `requests`, `matplotlib`, and `tqdm`, unless a documented runtime feature requires them. 5. Publish SHA-256 checksums for every model file and verify each checksum before loading the model: ```bash echo " mobilenet_weights.h5" | sha256sum --check ``` 6. Prefer signed, immutable upstream releases and verify signatures where available. 7. Install dependencies inside a dedicated virtual environment or container as a non-privileged user. Documentation should explicitly discourage running `pip` with administrator or root privileges. 8. Add automated dependency review, vulnerability scanning, and provenance checks to the release process. 9. Correct the model documentation mismatch: the README downloads a ResNet `.pth` file, while the runtime NIMA implementation expects `weights/mobilenet_weights.h5`. Document and checksum the exact artifact consumed by the code. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (25)

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The code clearly implements an aesthetic image scorer: it loads a CLIP model and MLP weights, processes a local image, and returns a numeric 0–10 score plus basic metadata. This partially matches the declared purpose of scoring photos. However, the description also claims evaluation feedback, improvement suggestions, and detailed/aesthetic analysis, none of which are present in this code chunk. There are no undeclared risky capabilities such as network access, exfiltration, or unrelated actions; the mismatch is primarily that the implementation is narrower than the declared functionality.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README advertises highly generic trigger phrases such as "Evaluate this photo", "Analyze this picture", and broad comparison requests that overlap with ordinary conversation. In agent ecosystems that auto-route skills based on phrase matching, this can cause the skill to activate unexpectedly for unrelated image discussions, increasing the chance of prompt hijacking, privacy-sensitive image handling, or undesired tool execution without clear user intent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill instructs the agent to use environment-dependent local resources and execute local scripts, but it does not declare any explicit tool scope or permissions boundary. This creates an implicit capability expansion where an agent may access environment variables, local paths, or execution features without clear authorization, increasing the risk of unintended local data access or unsafe execution behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The usage examples use broad phrases like "请评价这张照片" and "给我看详细版" without explicit scope constraints or exclusion conditions. In a markdown skill description, this can create uncertainty about when ordinary conversational requests should invoke this specific skill versus another image-related capability.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The notes require the skill to "Always display '从夯到拉' rating level in the score," and the output templates hard-code these Chinese labels. Although the file says it supports both Chinese and English, it does not offer a user choice before imposing a specific language/locale convention in output.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This manifest sets a default language to a specific locale, but the configuration provides no indication of when that locale should apply, whether users can override it, or whether the skill is limited to a Chinese-only context. In a manifest file, this also creates ambiguity around behavior for general invocations because the language behavior is implicitly broad rather than narrowly scoped.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The configuration specifies "language": "zh-CN" as a default, but there is no accompanying indication that users can choose another language or that the skill is region-specific. This is a natural-language policy concern because it imposes a locale preference without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code returns Chinese labels and prints Chinese status text as the default interaction language, and the generated report is also entirely in Chinese. Because the skill does not offer a user opt-in or configurable language selection, it violates the language/locale policy requirement for user choice.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The dependency is specified with only a minimum version, which allows future installs to resolve to different releases over time. This weakens reproducibility and makes it difficult to ensure that a known-safe version of PyTorch is used, especially for a package with a history of security advisories.

Content

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

text
# Install with: pip install -r requirements.txt

# PyTorch and torchvision (for CLIP + MLP model)
torch>=2.0.0
torchvision>=0.15.0

# Transformers (for CLIP model loading)

Unverifiable Dependency: torch has 16 known advisory(ies) (CVE-2025-2953 (PyTorch susceptible to local Denial of Service); CVE-2022-45907 (PyTorch vulnerable to arbitrary code execution); CVE-2025-32434 (PyTorch: `torch.load` with `weights_only=True` leads to remote code execution) +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

PyTorch has published security advisories, and because the manifest does not pin a version there is no way to verify that deployments avoid affected releases. In an ML skill, this matters because the framework may deserialize models or process complex binary inputs, increasing the consequences of an unsafe version.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

Using an unpinned torchvision dependency means builds are not reproducible and may silently consume a later release with security or compatibility issues. In ML stacks, version skew between torch and torchvision can also increase operational risk and make patch status hard to verify.

Content

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

text
# PyTorch and torchvision (for CLIP + MLP model)
torch>=2.0.0
torchvision>=0.15.0

# Transformers (for CLIP model loading)
transformers>=4.30.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
99% confidence
Finding

An unpinned transformers dependency allows installs to drift across releases, making it impossible to reliably know whether vulnerable or behavior-changing versions are being pulled. This is especially relevant because model-loading libraries often process untrusted model artifacts and complex parsers.

Content

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

text
torchvision>=0.15.0

# Transformers (for CLIP model loading)
transformers>=4.30.0

# TensorFlow/Keras (for NIMA MobileNet model)
# Use tf_keras for better compatibility with TensorFlow 2.x

Unverifiable Dependency: transformers has 16 known advisory(ies) (CVE-2023-2800 (transformers has Insecure Temporary File); CVE-2026-4372 (HuggingFace transformers vulnerable to remote code execution); CVE-2025-3933 (Transformers is vulnerable to ReDoS attack through its DonutProcessor class) +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
96% confidence
Finding

transformers is known to have multiple advisories, but the current requirement does not establish which release will actually be installed. Given that this library often loads models, tokenizers, processors, and remote artifacts, uncertain version selection increases the risk of pulling a vulnerable build.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

Specifying tensorflow with a lower bound only permits unpredictable dependency resolution and prevents assurance that installs avoid known-vulnerable versions. For large native-code ML frameworks, this increases exposure and complicates incident response and patch verification.

Content

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

text
# TensorFlow/Keras (for NIMA MobileNet model)
# Use tf_keras for better compatibility with TensorFlow 2.x
tensorflow>=2.12.0
tf_keras>=2.12.0

# Image processing

Unverifiable Dependency: tensorflow has 16 known advisory(ies) (CVE-2022-21726 (Out of bounds read in Tensorflow); CVE-2022-35968 (TensorFlow vulnerable to `CHECK` fail in `AvgPoolGrad`); CVE-2022-23591 (Stack overflow in TensorFlow) +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

TensorFlow has a long history of security fixes, and without an exact version pin the skill cannot prove it installs a patched release. Because this is native-code-heavy software that may parse models and tensors from external sources, unverifiable versioning raises meaningful risk.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The tf_keras package is unpinned, so installations may vary over time and may unexpectedly include a release with defects or known advisories. This undermines reproducibility and makes secure deployment validation difficult.

Content

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

text
# TensorFlow/Keras (for NIMA MobileNet model)
# Use tf_keras for better compatibility with TensorFlow 2.x
tensorflow>=2.12.0
tf_keras>=2.12.0

# Image processing
Pillow>=10.0.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
99% confidence
Finding

Pillow handles image parsing, which often involves untrusted user input in a photo-scoring skill. Leaving Pillow unpinned increases risk because a future install could resolve to a vulnerable or incompatible release affecting image decoding security.

Content

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

text
tf_keras>=2.12.0

# Image processing
Pillow>=10.0.0

# HTTP requests
requests>=2.25.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
98% confidence
Finding

Pillow processes image files, which are directly relevant to a photo-scoring skill and likely to come from users or other untrusted sources. If an affected Pillow version is installed due to lack of pinning, vulnerabilities in image parsing could be triggered through crafted images, making this more dangerous in this skill context than a generic library issue.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

An unpinned requests dependency allows network-facing code to rely on whatever version the resolver selects, making behavior and security posture inconsistent across environments. This can expose the skill to avoidable issues in TLS handling, redirects, or dependency-chain vulnerabilities.

Content

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

text
Pillow>=10.0.0

# HTTP requests
requests>=2.25.0

# Numerical computing
numpy>=1.23.0

Unverifiable Dependency: requests has 16 known advisory(ies) (GHSA-652x-xj99-gmcc; GHSA-9hjg-9r4m-mvj7; GHSA-9wx4-h78v-vm56 +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

requests has known advisories, and the lack of a fixed version means secure deployment status cannot be determined. If the skill downloads models, images, or metadata over HTTP(S), a vulnerable requests version could expose transport or request-handling weaknesses.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

numpy is a foundational package and leaving it unpinned reduces build determinism and can introduce versions with security or stability problems. Even if direct exploitation is unlikely here, supply-chain assurance is weakened.

Content

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

text
requests>=2.25.0

# Numerical computing
numpy>=1.23.0

# Optional: for visualization
matplotlib>=3.7.0

Unverifiable Dependency: numpy has 16 known advisory(ies) (GHSA-2fc2-6r4j-p65h; GHSA-5545-2q6w-2gh6; GHSA-6p56-wp2h-9hxr +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
90% confidence
Finding

numpy has advisories, and because the package is unpinned the environment may resolve to an affected release without visibility. The direct exploitability in this skill is less obvious than for image or network libraries, but the inability to verify patch status is still a genuine supply-chain weakness.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

matplotlib is optional here, but an unpinned optional dependency still permits non-reproducible installs and uncertain patch status. Optional packages can still enlarge the attack surface in development or visualization workflows.

Content

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

text
numpy>=1.23.0

# Optional: for visualization
matplotlib>=3.7.0

# Optional: for progress bars
tqdm>=4.65.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

Leaving tqdm unpinned makes installs vary and obscures whether the selected version contains known issues. While lower risk than core parsing libraries, it still reflects weak dependency hygiene and complicates secure reproducibility.

Content

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

text
matplotlib>=3.7.0

# Optional: for progress bars
tqdm>=4.65.0

Unverifiable Dependency: tqdm has 4 known advisory(ies) (GHSA-g7vv-2v7x-gj9p; GHSA-r7q7-xcjw-qx8q; PYSEC-2017-74 +1 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

tqdm has known advisories, and the absence of version pinning prevents verification that deployed environments are unaffected. Although its role is likely limited to UI/progress output, leaving it floating still creates avoidable supply-chain uncertainty.

Content

No source excerpt is available for this finding.