Back to skill

Security audit

China Mirrors

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but it can make persistent, global package-manager and shell configuration changes that may affect future builds without enough safeguards.

Review this skill before installing. Use it only when you intentionally want China-region package mirrors, prefer project-level settings, and ask the agent to show exact changes and back up existing config files first. Be especially cautious with pip trusted-host, global NuGet/Maven/Cargo rewrites, RubyGems source removal, and shell profile edits.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:80
Finding

Persistent pip configuration disables normal TLS host verification

Content
View full analysis
pip.conf << 'EOF' [global] index-url = https://mirrors.aliyun.com/pypi/simple/ trusted-host = mirrors.aliyun.com EOF ``` The troubleshooting guidance also recommends this behavior: ```text | SSL certificate error | Add a `trusted-host` configuration (already included in the commands above) | ``` ### Technical Analysis The `trusted-host` option instructs pip to trust the specified package host even when secure HTTPS authentication cannot be established normally. The configured mirror already supports HTTPS, so applying this exception persistently is unnecessary. Certificate failures can indicate interception, incorrect proxy configuration, an invalid certificate chain, DNS manipulation, or mirror impersonation. Suppressing these failures rather than correcting their cause weakens package-origin authentication and can conceal a man-in-the-middle condition. Because Python packages may execute build backends or installation logic, accepting a substituted package can lead to local code execution during dependency installation. ### Attack Path 1. The Agent writes the supplied pip configuration, including the persistent `trusted-host` exception. 2. An attacker gains a network interception position or manipulates DNS or proxy routing for the mirror hostname. 3. The attacker presents an endpoint whose TLS identity would otherwise fail normal validation. 4. A subsequent `pip install` retrieves a modified or substituted package from the attacker-controlled endpoint. 5. Package build or installation logic executes with the privileges of the user running p ...[truncated 551 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:80
Finding

Global package-manager configurations are overwritten without backup or preservation

Content
View full analysis
~/.pip/pip.conf << 'EOF' [global] index-url = https://mirrors.aliyun.com/pypi/simple/ trusted-host = mirrors.aliyun.com [install] trusted-host = mirrors.aliyun.com EOF ``` ```bash mkdir -p ~/.cargo cat > ~/.cargo/config.toml << 'EOF' [source.crates-io] replace-with = 'aliyun' [source.aliyun] registry = "https://mirrors.aliyun.com/crates.io-index/" EOF ``` The NuGet configuration both replaces the file and explicitly clears existing sources: ```bash mkdir -p ~/.nuget cat > ~/.nuget/NuGet.Config << 'EOF' EOF ``` The Maven configuration is likewise replaced in full: ```bash mkdir -p ~/.m2 cat > ~/.m2/settings.xml << 'EOF' aliyun central Aliyun Maven https://maven.aliyun.com/repository/public EOF ``` ### Technical Analysis Shell redirection with `>` and PowerShell `Set-Content` replace the entire destination file. The Skill does not first inspect the existing configuration, merge only the required setting, create a backup, or present an exact diff for approval. Package-manager configuration files commonly contain private repository definitions, source mappings, authenticated feeds, trusted certificate settings, proxies, repository priorities, and organization ...[truncated 1642 chars]
Remediation
View remediation
` unless the user explicitly requests removal of all existing sources. - Preserve authenticated feeds, source mappings, proxies, certificate settings, and repository priorities. - Implement rollback by restoring the exact backup rather than deleting the current configuration file. - After modification, verify both the new mirror and preservation of all pre-existing settings. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:185
Finding

Repeated execution accumulates persistent shell changes and alters repository provenance globally

Content
View full analysis
> ~/.bashrc export GOPROXY=https://mirrors.aliyun.com/goproxy/,direct ``` ```bash echo 'GRADLE_USER_HOME=~/.gradle' >> ~/.bashrc ``` ```bash export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc ``` It also removes the official RubyGems source globally: ```bash gem sources --remove https://rubygems.org/ 2>/dev/null || true gem sources -a https://mirrors.tuna.tsinghua.edu.cn/rubygems/ ``` Despite these persistent changes, the Skill claims: ```text 2. Idempotency: Configuration commands can be repeated and will not produce side effects. ``` ### Technical Analysis The append operator `>>` adds a new line on every execution without checking whether an equivalent or conflicting setting already exists. Repeated invocations therefore accumulate duplicate shell initialization entries. These changes persist across terminal sessions and affect unrelated projects. If a user later adds a different value, ordering within the startup file determines which setting takes effect, making behavior difficult to audit and predict. The RubyGems commands also change package provenance globally by removing the official source. The rollback guidance does not preserve the prior source list, ordering, or repository state. Consequently, the stated idempotency guarantee is inaccurate. ### Attack Path 1. The Skill is triggered multiple times for the same user account. 2. Each invocation appends another environment assignment to `.bashrc` or `.zshrc`. 3. Duplicate or conflicting values accumulate, and subsequent shells inhe ...[truncated 760 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (16)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

echo "✓ Node.js 包管理器已配置"

text

**项目级配置(创建 `.npmrc`):**
```bash
echo "registry=https://registry.npmmirror.com" > .npmrc
echo "✓ npm 项目级配置已完成"

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

echo "✓ Node.js 包管理器已配置"

text

**项目级配置(创建 `.npmrc`):**
```bash
echo "registry=https://registry.npmmirror.com" > .npmrc
echo "✓ npm 项目级配置已完成"

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

echo "✓ Node.js 包管理器已配置"

text

**项目级配置(创建 `.npmrc`):**
```bash
echo "registry=https://registry.npmmirror.com" > .npmrc
echo "✓ npm 项目级配置已完成"

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
90% confidence
Finding

Appending exports to ~/.bashrc and creating Gradle init scripts establishes persistence across future shell sessions and builds. Although not a malware backdoor, the pattern is still security-relevant here because it silently alters long-term execution environment behavior in a broadly triggered, self-executing skill.

Content

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

ho "✓ cargo 已配置为阿里云镜像"

text

**验证:**
```bash
cat ~/.cargo/config.toml

3.4 Go mod 配置

Windows PowerShell:

powershell
[Environment]::SetEnvironmentVariable("GOPROXY", "https://mirrors.aliyun.com/goproxy/,direct", "User")
$env:GOPROXY = "https://mirrors.aliyun.com/goproxy/,direct"
Write-Host "✓ Go GOPROXY 已配置"

Linux/Mac:

bash
echo 'export GOPROXY=https://mirrors.aliyun.com/goproxy/,direct' >> ~/.bashrc
export GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
echo "✓ Go GOPROXY 已配置"

验证:

bash
go env GOPROXY

3.5 NuGet (.NET) 配置

Windows:

powershell
$nugetPath = "$env:APPDATA\NuGet"
New-Item -ItemType Directory -Force -Path $nugetPath
Set-Content -Path "$nugetPath\NuGet.Config" -Value @"
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear />
    <add key="huawei" value="https://repo.huaweicloud.com/repository/nuget/v3/index.json" />

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
| 包管理器 | 恢复命令 |
|---------|---------|
| pip | `rm -f ~/.pip/pip.conf` 或 `del %USERPROFILE%\pip\pip.ini` |
| npm | `npm config delete registry` |
| yarn | `yarn config delete registry` |
| pnpm | `pnpm config delete registry` |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
| npm | `npm config delete registry` |
| yarn | `yarn config delete registry` |
| pnpm | `pnpm config delete registry` |
| cargo | `rm -f ~/.cargo/config.toml` |
| Go | `unset GOPROXY` 并从 shell 配置文件中删除 |
| NuGet | 删除 `%APPDATA%\NuGet\NuGet.Config` |
| RubyGems | `gem sources --remove <mirror-url>` 并添加回 `https://rubygems.org/` |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill description uses broad triggers like slow downloads, installing dependencies, and merely detecting common project files, which can cause the agent to invoke it in many ordinary development contexts without a clear user request for persistent configuration changes. In this skill, invocation leads to direct command execution and modification of user and project configuration, so over-broad activation materially increases the risk of unintended system changes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

All user-facing instructions, prompts, and report examples are presented only in Chinese, and the skill does not indicate that the user may choose another language. This can amount to a language/locale policy issue because it effectively imposes a single language without explicit opt-in or a documented region-specific limitation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly instructs the agent to write and execute configuration commands directly on the user's machine, but it does not prominently warn that these actions change persistent user or project settings across multiple package managers. This is dangerous because it can silently alter dependency resolution behavior, trust settings, and shell startup files beyond the current session.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger section allows activation from the presence of ubiquitous files like package.json, requirements.txt, and pom.xml alone, even though the skill performs persistent configuration writes and command execution. This creates a mismatch between weak trigger conditions and high-impact actions, increasing the chance of unauthorized or surprising modifications to developer environments.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

This command writes a persistent pip configuration under ~/.pip/pip.conf, changing package installation behavior for future sessions without a strong consent boundary. The skill context makes this more dangerous because its triggers are broad and execution is designed to be automatic on the user's machine.

Content

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

Linux/Mac 全局配置:

bash
mkdir -p ~/.pip
cat > ~/.pip/pip.conf << 'EOF'
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

This modifies ~/.cargo/config.toml, permanently redirecting crates.io resolution to a mirror for future Rust operations. Persistent dependency-source rewrites can affect supply-chain trust, reproducibility, and user expectations if performed automatically or without clear rollback and backup.

Content

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

全局配置:

bash
mkdir -p ~/.cargo
cat > ~/.cargo/config.toml << 'EOF'
[source.crates-io]
replace-with = 'aliyun'

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
<packageSources>
    <clear />
    <add key="huawei" value="https://repo.huaweicloud.com/repository/nuget/v3/index.json" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>
"@ -Encoding UTF8

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
<packageSources>
    <clear />
    <add key="huawei" value="https://repo.huaweicloud.com/repository/nuget/v3/index.json" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>
"@ -Encoding UTF8

Session Persistence

Medium
Category
Rogue Agent
Confidence
94% confidence
Finding

Writing ~/.m2/settings.xml creates a persistent Maven mirror configuration affecting future builds and dependency resolution. In a skill that encourages direct execution, this can silently change long-term build behavior across unrelated projects.

Content

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

3.8 Maven 配置

bash
mkdir -p ~/.m2
cat > ~/.m2/settings.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<settings>

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
|------|---------|
| 配置后仍然慢 | 清除缓存:`pip cache purge` / `npm cache clean --force` |
| SSL 证书错误 | 添加 `trusted-host` 配置(已在上述命令中包含) |
| 权限不足 | 使用用户级配置(非系统级),避免 sudo |
| 想恢复默认 | 删除对应配置文件或执行:`npm config delete registry` / `unset GOPROXY` |
| 特定项目需要不同镜像 | 使用项目级配置(`.npmrc` / `.piprc` / `.cargo/config.toml`) |