Back to skill

Security audit

image-collector

Security checks for vulnerabilities and agentic risk

Overview

The skill does not show clear malicious intent, but it overstates its safety checks and has under-scoped image download and dependency behavior that should be reviewed before installation.

Install only if you are comfortable reviewing or constraining its network access and dependency installation. Treat downloaded images as unverified, pin dependencies before use, and do not rely on its claimed whitelist, watermark, or relevance checks without additional review.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/collect_images.py:122
Finding

Source Allowlist Bypass and Server-Side Request Forgery

Content
View full analysis
Optional[Path]: try: for banned in BANNED_SOURCES: if banned in url: return None resp = self.session.get(url, timeout=15) if resp.status_code != 200: return None if not filename: url_hash = hashlib.md5(url.encode()).hexdigest()[:8] content_type = resp.headers.get("Content-Type", "image/jpeg") ext = content_type.split("/")[-1] if ext == "jpeg": ext = "jpg" filename = f"{url_hash}.{ext}" output_path = self.output_dir / filename output_path.write_bytes(resp.content) return output_path except Exception: return None ``` ### Technical Analysis The project claims that images are collected only from approved official sources, but `download_image()` does not enforce the `OFFICIAL_SOURCES` allowlist. It merely checks whether one of four banned strings appears anywhere in the URL. The code does not validate: - The URL scheme. - The normalized destination hostname. - Whether the hostname belongs to `OFFICIAL_SOURCES`. - Destination IP addresses after DNS resolution. - Redirect destinations. - Loopback, link-local, private, or reserved network ranges. - Embedded credentials or nonstandard ports. The `requests` library follows redirects by default. Consequently, even an initially approved URL could redirect the request to an unapproved or internal destination. The primary search implementation currently returns no candidates, which limits exposure through the normal CLI workflow. However, `download_image()` is a public method, and the validation flaw becomes exploitable if another ...[truncated 1295 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/collect_images.py:128
Finding

Unbounded Remote Response Download and Image Resource Exhaustion

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
package.json:15
Finding

Python Packages Declared as Unpinned npm Dependencies

Content
View full analysis
=3.8", "Pillow": "*", "requests": "*" } ``` The same dependency declaration appears in both `package.json` and `clawhub.json`. ### Technical Analysis `Pillow` and `requests` are Python packages, but they are declared in an npm-style `dependencies` object. `python` is also represented as though it were an npm package dependency rather than a runtime requirement. If an npm-compatible installer processes `package.json`, it may resolve unrelated npm registry packages with these names. This creates dependency-confusion and package-name ambiguity because the resolved packages are not necessarily the Python components expected by the scripts. The wildcard constraints for `Pillow` and `requests` also permit any available version, preventing reproducible installation and allowing future dependency changes to enter the environment without review. Third-party package installation may run package lifecycle scripts depending on the package manager and resolved package. ### Attack Path 1. A user or automation platform installs the project using an npm-compatible package manager. 2. The package manager interprets `python`, `Pillow`, and `requests` as npm package names. 3. It resolves unrelated or potentially compromised packages from the configured registry. 4. Unreviewed package code or lifecycle scripts are installed and may execute with the installer's privileges. 5. Alternatively, unrestricted versions change over time and introduce an unreviewed vulnerable release. ### Impact Assessment The maximum impact depends on the package manager and privileges used during installation. A malicious resolved package could potentially: - Execute code during dependency installation. - Read files ...[truncated 395 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared description claims an image collection tool that supports watermark detection, quality inspection, and relevance verification. The actual code does perform official-source-style downloading from predefined URLs and includes a basic validation step: it checks that files are valid images and at least 400x300. However, there is no watermark detection logic, no substantive relevance verification of image content, and no broader collection mechanism beyond matching titles/keywords against a static dictionary of known URLs. Because several advertised capabilities are absent and the implemented behavior is materially narrower than described, this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

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.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/check-deps.sh (reported line 39)May include surrounding context.

sh
echo "✓ 输出目录:$output_dir"
else
    echo "✓ 创建输出目录:$output_dir"
    mkdir -p "$output_dir"
fi

echo ""

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/check-deps.sh (reported line 39)May include surrounding context.

sh
echo "✓ 输出目录:$output_dir"
else
    echo "✓ 创建输出目录:$output_dir"
    mkdir -p "$output_dir"
fi

echo ""

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code file contains user-facing natural-language strings entirely in Chinese, including the top-level description and usage examples. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly justified, which is not stated here.

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 L317-L335 describes a complete process of searching, downloading, watermark checking, quality checking, relevance validation, and optimization. However, search_official_images only logs search attempts and always returns the empty results list without parsing or appending any candidates, causing collect_for_news to immediately fall back and return None.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill metadata promises watermark detection, quality checking, and relevance verification, but the implementation only downloads from hardcoded URLs and performs minimal image validity and size checks. In a pipeline that trusts the skill’s stated safety properties, this mismatch can cause unreviewed, irrelevant, or policy-violating images to be accepted and published, creating integrity and compliance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language content of the skill, including its description and usage instructions, is presented only in Chinese. Under the policy, forcing a specific language without user opt-in or a documented justification is 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
95% confidence
Finding

This markdown file presents all operational guidance exclusively in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking audience. That can violate language/locale policy requirements when a skill forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The description is written entirely in Chinese and specifically targets 'AI 科技日报' and '微信公众号', which indicates a fixed language/locale context. The manifest does not state that this skill is region-specific by design or that users can choose another language/locale, so it may violate the language/locale policy requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The natural-language description is written entirely in Chinese and presents the skill as a Chinese-language tool without indicating any language choice or opt-in. Under the stated policy, forcing a specific language or locale without offering user choice can be a policy violation.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
90% confidence
Finding

Using an unpinned wildcard dependency for Pillow allows future installs to resolve to any released version, including versions with breaking changes or newly introduced vulnerable releases. In a supply-chain attack or compromised upstream release scenario, this can expose image-processing workflows to arbitrary vulnerable code paths during installation or runtime.

Content

Scanner excerpt · package.json (reported line 16)May include surrounding context.

json
},
  "dependencies": {
    "python": ">=3.8",
    "Pillow": "*",
    "requests": "*"
  },
  "category": "media",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
91% confidence
Finding

Using an unpinned wildcard dependency for requests makes builds non-reproducible and increases exposure to malicious or vulnerable upstream releases. Because this skill performs automated content collection from external sources, a compromised HTTP client dependency could affect network-facing functionality and data handling.

Content

Scanner excerpt · package.json (reported line 17)May include surrounding context.

json
"dependencies": {
    "python": ">=3.8",
    "Pillow": "*",
    "requests": "*"
  },
  "category": "media",
  "tags": ["图片处理", "内容采集", "微信公众号"]

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This shell script includes all user-facing messages and the usage example in Chinese, which can constitute a language policy violation when no opt-in, fallback, or justification is provided. The rule applies to all file types, including code files, and the issue is visible in comments and echoed strings intended for users.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The inline comment and log message state that the code will '尝试搜索替代' / '尝试替代方案', which implies an actual alternate retrieval path. However, the function immediately returns None and performs no search or alternative download, making the documentation actively misleading about runtime behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

In this markdown file, the example command sends a URL to a local HTTP endpoint, which is a networked operation covered by the missing-warning criteria for markdown files. The surrounding documentation does not disclose any privacy, security, or service-side handling implications of invoking the local web-access service.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.