Back to skill

Security audit

全网数据探测虾

Security checks for vulnerabilities and agentic risk

Overview

The skill is a mostly coherent website-monitoring tool, but it gives the agent broad local-network fetching ability and includes anti-bot bypass guidance that users should review before installing.

Install only if you are comfortable with a script that can fetch any URL reachable from your machine and store page snapshots locally. Use it only for sites you are authorized to monitor, avoid CAPTCHA or anti-bot bypass tactics, do not monitor authenticated or sensitive pages, pin and review dependencies, and prefer adding URL allowlists/private-network blocking before use.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/web-monitor.sh:30
Finding
Unrestricted URL Fetching Enables Server-Side Request Forgery<![CDATA[ ## Vulnerability Details **File Location**: `scripts/web-monitor.sh`, lines 30-47, 80-89, and 157-172 **Vulnerability Type**: Server-Side Request Forgery through user-controlled monitoring URLs **Risk Level**: High ### Complete Vulnerable Code ```bash fetch_page() { local url="$1" local output="$2" local ua="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" local http_code http_code=$(curl -s -L \ -H "User-Agent: $ua" \ -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" \ -H "Accept-Language: zh-CN,zh;q=0.9,en;q=0.8" \ -H "Connection: keep-alive" \ --max-time 30 \ -o "$output" \ -w "%{http_code}" \ "$url" 2>/dev/null) echo "$http_code" } ``` The URL is accepted directly from a command-line argument: ```bash cmd_add_task() { local url="" frequency="daily" selector="" threshold="5" notify="feishu" name="" while [[ $# -gt 0 ]]; do case "$1" in --url) url="$2"; shift 2 ;; --frequency) frequency="$2"; shift 2 ;; --selector) selector="$2"; shift 2 ;; --threshold) threshold="$2"; shift 2 ;; --notify) notify="$2"; shift 2 ;; --name) name="$2"; shift 2 ;; *) shift ;; esac done ``` The stored value is later fetched without destination validation: ```bash local url selector threshold url=$(echo "$task" | jq -r '.url') selector=$(echo "$task" | jq -r '.selector // ""') threshold=$(echo "$task" | jq -r '.threshold // "5"') log "INFO" "开始检查任务 $task_id: $url" # 抓取页面 local tmp_html tmp_html=$(mktemp /tmp/web-monitor-XXXXXX.html) local http_code http_code=$(fetch_page "$url" "$tmp_html") ``` ### Technical Analysis The monitoring URL is entirely user-controlled and is passed to `curl` without validation of: - The URL scheme. - The initial hostname or resolved IP address. - Loopback, private, link-local, multicast, and reserved address ranges. - ...[truncated 2512 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Permit only explicitly supported schemes, preferably `https`, with `http` allowed only when required. 2. Parse URLs with a dedicated URL parser rather than regular expressions. 3. Resolve the hostname before making a request and reject all loopback, private, link-local, multicast, unspecified, and reserved IPv4 and IPv6 ranges. 4. Explicitly block cloud metadata destinations, including link-local metadata addresses. 5. Disable automatic redirect following, or process redirects manually and repeat the complete scheme, hostname, and resolved-address validation for every redirect hop. 6. Protect against DNS rebinding by ensuring the address validated is the address used for the connection. Consider pinning the validated address with `curl --resolve`. 7. Apply an explicit domain allowlist where the deployment has a known set of approved monitoring targets. 8. Restrict destination ports to expected web ports. 9. Run the monitor in a sandbox with outbound network controls that deny access to internal and metadata networks. 10. Limit response size, such as with `curl --max-filesize`, to reduce resource-exhaustion risk. 11. Record rejected requests without logging sensitive URL credentials or query-string secrets. 12. Add automated tests covering direct private addresses, IPv6 loopback, numeric and alternative IP representations, DNS rebinding scenarios, and public-to-private redirects. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:74
Finding
Mutable Third-Party Dependency Installation Using an Unpinned Version<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 74 **Vulnerability Type**: Unpinned third-party dependency and supply-chain risk **Risk Level**: Medium ### Complete Vulnerable Code ```markdown ## 依赖工具 - `curl`、`jq`、`pup`(HTML 解析)、`diff` - 安装 pup:`brew install pup` 或 `go install github.com/ericchiang/pup@latest` ``` ### Technical Analysis The installation instruction uses: ```bash go install github.com/ericchiang/pup@latest ``` The `@latest` version selector is mutable. It resolves to whichever release the Go toolchain considers latest at installation time rather than to the specific version reviewed with this Skill. This makes installations non-reproducible and permits future upstream releases to alter the code compiled and installed on a user's machine. Installing a Go command causes the toolchain to download source code and transitive modules, compile them, and place the resulting executable in the user's Go binary directory. If the upstream repository, maintainer account, release process, or dependency chain is compromised, users following this instruction could install an unreviewed malicious version. The alternative `brew install pup` instruction is also not pinned in the documentation, but the directly specified `@latest` Go installation command is the clearest confirmed instance of unsafe version selection. ### Attack Path 1. A user follows the dependency installation instructions in `SKILL.md`. 2. The user executes: ```bash go install github.com/ericchiang/pup@latest ``` 3. The Go toolchain resolves the dependency version at installation time and downloads that version and its transitive dependencies. 4. If a newly released version or dependency has been compromised, the user compiles and installs code that was not part of the audited Skill package. 5. The monitoring script subsequently invokes `pup` while processing attacker-controlled or remote HTML: ```bash pup 'body text{}' < "$html_file" ``` 6. ...[truncated 891 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with a specific, reviewed release version, for example: ```bash go install github.com/ericchiang/pup@vX.Y.Z ``` The selected version must be a real release that has been reviewed; do not copy the placeholder literally. 2. Document the expected module checksum and verify it through Go's checksum database or an independently maintained integrity record. 3. Record all transitive dependency versions used to build the executable. 4. Prefer a reproducible build process in which the dependency source, version, checksums, and build environment are fixed. 5. Periodically review and deliberately update the pinned version rather than resolving updates automatically. 6. Where binaries are distributed, publish cryptographic checksums or signatures and require verification before installation. 7. Avoid recommending package-manager installation without a documented version or integrity-verification procedure. 8. Run third-party parsing tools with minimum privileges and sandbox them from sensitive files and unnecessary network access. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The documented behavior promises threshold-based change detection and automatic notifications, but the described implementation does not actually enforce thresholds or implement notification delivery. This is dangerous because users may rely on the skill for monitoring/compliance use cases and miss important events, while also misunderstanding what data is being transmitted or stored.

Ae1

High
Category
analysis-evasion
Content
使用 `scripts/web-monitor.sh` 执行首次抓取:
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
使用 `scripts/web-monitor.sh` 执行首次抓取:
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
使用 `scripts/web-monitor.sh` 执行首次抓取:
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill instructs use of a shell script (`scripts/web-monitor.sh`) but declares no `permissions` or `allowed-tools` scope. This creates an authorization and review gap: the runtime may expose shell execution without an explicit least-privilege declaration, making command execution harder to govern and increasing the chance of unsafe future changes.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The listed activation keywords include very generic terms such as "监控", "爬虫", "数据采集", and the English phrasing broadly says to use the skill whenever a user wants to monitor a website or scrape web data. This lacks clear scope boundaries or exclusion conditions, making unintended invocation more likely for ordinary monitoring or data-collection discussions.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill explicitly archives scraped data and may send notifications to external services, but the description does not warn users about these data handling and outbound transfer behaviors. This creates a transparency and privacy risk: users may provide targets or content without understanding retention, sharing, or third-party exposure implications.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The document provides explicit anti-detection guidance including proxy rotation and advice to use third-party CAPTCHA-solving services, which materially enables bypassing access controls and anti-bot defenses rather than ordinary website monitoring. In the context of a scraping/monitoring skill, these instructions lower the barrier to evasive collection against target sites and can facilitate unauthorized access patterns, account/IP bans, legal exposure, and abuse at scale.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The CAPTCHA section normalizes OCR, browser automation, and third-party solving services without a prominent warning that these actions may violate site terms, privacy expectations, or legal restrictions. Because the skill is specifically designed for periodic web monitoring, this omission makes unsafe operational use more likely and encourages escalation from passive monitoring into deliberate defense evasion.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The template includes a concrete curl example that sends session cookies directly in a scraping request, but provides no warning that these values are sensitive credentials. In a web-monitoring/scraping skill, users may copy this pattern into logs, scripts, shared repos, or notifications, leading to credential leakage or unintended authenticated scraping against protected resources.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The entire markdown file is written in Chinese and does not offer any language or locale choice, nor does it document that the skill is intended only for a Chinese-speaking or region-specific audience. Under the policy rule, forcing a specific language without opt-in is a natural-language policy concern.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill fetches arbitrary web content and persists extracted content and diffs under a user directory without clearly warning that monitored pages may contain sensitive, proprietary, or personal data. In this skill context, persistent storage is core functionality, which makes the issue less suspicious than malware but still risky because users may unintentionally retain regulated or confidential content locally.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
Hard-coding `Accept-Language: zh-CN,zh;q=0.9,en;q=0.8` causes outbound requests to disclose a language/regional preference the user did not choose, which can influence content served and contribute to request fingerprinting. In a web-monitoring skill this is not highly dangerous, but it is an unnecessary privacy leak and can also distort monitoring results by fetching locale-specific page variants.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The manifest describes automatic巡查并在关键内容变化时发送通知, and the CLI exposes a --notify option, but the implementation only records diffs locally and prints JSON results. No email, webhook, Feishu, or other outbound notification logic exists anywhere in the script, so the implemented behavior falls short of the claimed skill behavior.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The task configuration and help text present --threshold as a meaningful percentage for change detection, implying only sufficiently large changes should trigger alerts. In practice, cmd_run_check merely loads threshold and never uses it; any non-empty diff is reported as changed, which contradicts the documented intent of threshold-based monitoring.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The inline CLI documentation says --notify selects a notification method such as feishu, email, or webhook. However, notify is only stored in tasks.json and is never consulted during run-check or any other command, so the documented behavior contradicts the implementation.

Natural-Language Policy Violations

Low
Confidence
79% confidence
Finding
The primary skill description is presented in Chinese only, while the file does not state that the skill is intentionally limited to Chinese-language users or offer language/locale choice. This can constitute a language policy issue when a skill implicitly enforces one language without user opt-in.

Natural-Language Policy Violations

Low
Confidence
96% confidence
Finding
The hard-coded header `Accept-Language: zh-CN,zh;q=0.9,en;q=0.8` imposes a specific language/locale preference in the skill content. There is no indication that this locale is optional, user-selected, or required for a region-specific purpose.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The curl example explicitly sets `Accept-Language: zh-CN,zh;q=0.9`, which imposes a specific locale preference. There is no indication that this skill is region-specific or that users may choose a different language, so this is a natural-language locale policy issue.

Static analysis

No suspicious patterns detected.