Back to skill

Security audit

Mirror Website

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real website-mirroring workflow, but it uses risky defaults that can modify arbitrary local folders, weaken download security, and leave a preview server running.

Install only if you are comfortable reviewing or changing the commands first. Use a new empty dedicated directory, avoid mirroring sensitive or login-only sites, remove insecure TLS bypass unless explicitly needed, respect site crawling rules, and start any preview server manually bound to localhost when you actually need it.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:20
Finding

Shell Command Injection Through Unvalidated User-Controlled Parameters

Content
View full analysis
``` The same unquoted placeholders are subsequently inserted into additional shell commands: ```bash -P \ https:/// ``` ```bash bash /fetch-query-assets.sh ``` ```bash bash /fix-filenames.sh ``` ```bash cd / ``` ### Technical Analysis `SAVE_PATH` and `DOMAIN` originate from user-supplied natural-language input. The Skill instructs the agent to substitute these values directly into shell commands, but it does not define validation, canonicalization, or consistent shell quoting requirements. If a substituted value contains shell metacharacters such as semicolons, command substitutions, redirections, pipes, or whitespace, the shell can interpret part of the value as additional syntax rather than as one argument. Option-prefixed paths may also be interpreted as command options in commands that do not use an end-of-options marker. Although some generated scripts quote their positional parameters internally, the commands used to invoke those scripts do not quote the substituted placeholders. The initial directory creation, downloader invocation, script execution, and working-directory change are therefore exposed at several stages. ### Attack Path 1. An attacker or untrusted user requests a website mirror operation. 2. The attacker supplies a crafted save path or domain containing shell syntax. 3. The agent extracts the text as `SAVE_PATH` or `DOMAIN`. 4. The agent substitutes the value into one of the documented shell command templates. 5. The command is interpreted by a shell. 6. The injected syntax executes with the same operating-syste ...[truncated 713 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:67
Finding

TLS Certificate Validation Disabled for Website Downloads

Content
View full analysis
,www. \ --wait=2 \ --random-wait \ --no-check-certificate \ --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" \ --header="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" \ --header="Accept-Language: zh-CN,zh;q=0.9,en;q=0.8" \ -e robots=off \ -P \ https:/// ``` The supplemental asset downloader repeats the unsafe behavior: ```bash mkdir -p "$(dirname "$local_file")" wget -q --no-check-certificate \ --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/122.0.0.0" \ -O "$local_file" \ "$full_url" || echo " 失败: $full_url" ``` ### Technical Analysis The `--no-check-certificate` option prevents `wget` from authenticating the remote HTTPS server's certificate. Encryption without server authentication does not establish that the content came from the intended website. A network-positioned attacker, compromised proxy, or malicious gateway can present an arbitrary certificate and replace downloaded HTML, JavaScript, CSS, images, or other assets. This risk is amplified because the Skill subsequently starts a local preview server for the downloaded content. ### Attack Path 1. The agent downloads a requested HTTPS website using `--no-check-certificate`. 2. An attacker controls or intercepts the network path, including a local or upstream proxy. 3. The attacker presents an invalid or attacker-issued certificate. 4. `wget` accepts the certificate without warning or termination. 5. The att ...[truncated 891 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:326
Finding

Downloaded Active Content Is Served on All Network Interfaces

Content
View full analysis
/dev/null 2>&1; do PORT=$((PORT + 1)) done # 进入网站根目录(即域名子目录),以后台方式启动服务器 cd / nohup python3 -m http.server $PORT > /dev/null 2>&1 & SERVER_PID=$! echo "预览服务器已启动:" echo " 地址: http://localhost:$PORT" echo " PID: $SERVER_PID" echo " 停止: kill $SERVER_PID" ``` ### Technical Analysis Python's `http.server` binds to all available interfaces by default when no `--bind` argument is supplied. The Skill reports a `localhost` URL, which can give the user the false impression that the service is available only from the local machine. The service is started automatically with `nohup` and placed in the background. It serves files obtained from an untrusted external website, including active HTML and JavaScript. It also continues running after the initiating command finishes until manually terminated. ### Attack Path 1. The Skill mirrors a website into the selected directory. 2. It starts `python3 -m http.server` without a bind-address restriction. 3. The server listens on wildcard IPv4 and/or IPv6 interfaces. 4. A host with network access to the machine discovers or is told the selected port. 5. The remote host retrieves files from the mirror. 6. Separately, the local user may browse the preview and execute untrusted or network-tampered JavaScript under a localhost origin. ### Impact Assessment The exposed scope is the content under the preview server's working directory. Consequences can include: - Disclosure of mirrored content to systems on the same LAN, container network, VPN, or other reachable network. - Exposure of files unintentionally placed within the selected website directory. - Continued network exposure after the mirroring task has completed. - Browser execution of untrusted active conten ...[truncated 260 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:173
Finding

Destructive Recursive Cleanup Can Modify an Arbitrary Existing Directory

Content
View full analysis
``` The generated cleanup script then changes into that directory and recursively processes its contents: ```bash DIR="$1" if [ -z "$DIR" ]; then echo "用法: bash fix-filenames.sh <下载目录路径>" exit 1 fi if [ ! -d "$DIR" ]; then echo "错误: 目录不存在: $DIR" exit 1 fi cd "$DIR" || exit 1 ``` It performs forced moves and deletion when destination names collide: ```bash rename_query_file() { local f="$1" local newname="$2" if [ "$f" != "$newname" ] && [ ! -f "$newname" ]; then mkdir -p "$(dirname "$newname")" mv -f -- "$f" "$newname" echo " 重命名: $f → $newname" elif [ "$f" != "$newname" ] && [ -f "$newname" ]; then rm -f -- "$f" echo " 删除重复: $f($newname 已存在)" fi } ``` Additional recursive renaming can overwrite destination files: ```bash find . -type f | while IFS= read -r f; do newname=$(echo "$f" | sed -E 's/(\.[a-zA-Z0-9]{1,5})\1$/\1/') if [ "$f" != "$newname" ]; then mv -f -- "$f" "$newname" echo " 重命名: $f → $newname" fi done ``` All `.orig` files below the selected directory are deleted: ```bash ORIG_COUNT=$(find . -name "*.orig" -type f | wc -l) if [ "$ORIG_COUNT" -gt 0 ]; then find . -name "*.orig" -type f -delete echo " 已删除 $ORIG_COUNT 个 .orig 备份文件" else echo " 无备份文件需要清理" fi ``` ### Technical Analysis The only directory checks are that the parameter is non-empty and refers to an existing directory. The Skill does not ensure that the path is newly created, empty, dedicated to the mirror, or located beneath a safe root. Once the script changes into that directory, recursive `find` commands process every matching file. Files with query-style names can be deleted when ...[truncated 1579 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (14)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger conditions are extremely broad and force use of this skill for many natural-language requests related to saving or viewing websites offline. Over-broad triggering increases the chance of unintended execution of network crawling, local file writes, and follow-on script creation when the user may have intended a safer or narrower action.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This is a duplicate report of the proxy auto-detection and auto-use behavior. The core risk is silent use of a local proxy endpoint, which can redirect sensitive traffic and alter trust boundaries without informed user approval.

Content

Scanner excerpt · SKILL.md (reported line 40)May include surrounding context.

第三步:检测网络连通性与代理

在执行 wget 前,先检测是否能直接连通目标站点:

bash
# 先尝试直连

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This is a duplicate report of the proxy auto-detection and auto-use behavior. The core risk is silent use of a local proxy endpoint, which can redirect sensitive traffic and alter trust boundaries without informed user approval.

Content

Scanner excerpt · SKILL.md (reported line 40)May include surrounding context.

第三步:检测网络连通性与代理

在执行 wget 前,先检测是否能直接连通目标站点:

bash
# 先尝试直连

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The --no-check-certificate parameter disables TLS certificate validation during recursive mirroring, allowing attackers on the network path to intercept or modify downloaded content. Because the skill then saves and serves that content locally, any tampered files may persist and mislead the user or execute active web content under localhost.

Content

Scanner excerpt · SKILL.md (reported line 74)May include surrounding context.

md
--domains <DOMAIN>,www.<DOMAIN> \
     --wait=2 \
     --random-wait \
     --no-check-certificate \
     --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" \
     --header="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" \
     --header="Accept-Language: zh-CN,zh;q=0.9,en;q=0.8" \

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

The documented parameter guidance normalizes insecure options such as skipping certificate checks and ignoring robots controls, encouraging unsafe operation as standard behavior. This increases the likelihood that operators will run policy-bypassing and integrity-weakening commands without understanding the risks.

Content

Scanner excerpt · SKILL.md (reported line 91)May include surrounding context.

md
| `--convert-links` | 转换链接为本地路径 |
| `--domains` | 同时包含 www 和非 www,避免遗漏 |
| `--wait=2 --random-wait` | 随机等待,避免被封 |
| `--no-check-certificate` | 跳过SSL证书验证 |
| `-e robots=off` | 忽略 robots.txt |

> **注意:不使用 `--html-extension` / `--adjust-extension`。** 该参数会根据 Content-Type 自动追加扩展名,导致 `fontawesome.min.css` 被保存为 `fontawesome.min.css.css`。

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

This finding duplicates the same insecure wget -q --no-check-certificate usage in the query-asset script. The insecure flag directly undermines transport authenticity for downloaded assets that may later be opened or served locally.

Content

Scanner excerpt · SKILL.md (reported line 150)May include surrounding context.

md
echo "下载: $full_url → $local_file"
  mkdir -p "$(dirname "$local_file")"
  wget -q --no-check-certificate \
    --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/122.0.0.0" \
    -O "$local_file" \
    "$full_url" || echo "  失败: $full_url"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

This finding duplicates the same insecure wget -q --no-check-certificate usage in the query-asset script. The insecure flag directly undermines transport authenticity for downloaded assets that may later be opened or served locally.

Content

Scanner excerpt · SKILL.md (reported line 150)May include surrounding context.

md
echo "下载: $full_url → $local_file"
  mkdir -p "$(dirname "$local_file")"
  wget -q --no-check-certificate \
    --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/122.0.0.0" \
    -O "$local_file" \
    "$full_url" || echo "  失败: $full_url"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README describes a workflow that recursively downloads an entire site, rewrites files, and starts a local preview server, but it does not clearly warn users about disk consumption, bandwidth usage, or the security implications of exposing downloaded content via an HTTP server. In this skill context, those side effects are central to operation, so omitting them materially increases the chance of unsafe or unexpected execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill does not provide prominent warnings that it will recursively mirror a site, write scripts and files to disk, potentially use a proxy, and later start a local background server. Missing disclosure reduces user awareness and informed consent, making accidental policy violations, storage misuse, or unintended exposure more likely.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly disables TLS certificate validation and instructs wget to ignore robots.txt, which weakens transport security and bypasses site access restrictions. In a website mirroring context this can expose the agent to man-in-the-middle content tampering and facilitate unauthorized or policy-violating scraping of sites that intended to limit crawler access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

L077 将 Accept-Language 固定为 zh-CN,zh;q=0.9,en;q=0.8,这会在访问目标站点时主动声明特定语言和区域偏好。文档中没有说明这是可配置项,也没有给用户选择语言/区域的机会,属于强制 locale 设置。

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill launches a persistent background HTTP server with nohup, which extends system state beyond the mirroring task and exposes downloaded content over a local port without an explicit consent gate. Persistent services can be forgotten, conflict with local policy, leak mirrored sensitive content to other local users or software, and increase attack surface unnecessarily.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
96% confidence
Finding

Using nohup to run python3 -m http.server creates session persistence and a background process that survives the immediate task context. This can unintentionally leave mirrored content exposed on a local port, create unmanaged long-lived processes, and violate least surprise for users expecting a one-shot mirroring operation.

Content

Scanner excerpt · SKILL.md (reported line 335)May include surrounding context.

md
# 进入网站根目录(即域名子目录),以后台方式启动服务器
cd <SAVE_PATH>/<DOMAIN>
nohup python3 -m http.server $PORT > /dev/null 2>&1 &
SERVER_PID=$!

echo "预览服务器已启动:"

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The usage instructions and trigger examples are presented only in Chinese and explicitly tell the user how to invoke the skill in Chinese, with no indication that other languages are supported. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is documented and justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.