T09 · Insecure Skill Coding Practices
- Location
scripts/setup_mirrors.py:37- Finding
Persistent Disabling of pip TLS Verification for the Configured Mirror
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill appears intended to configure China-region development mirrors, but it should be reviewed because it can persistently change package-manager and Docker trust settings in ways that may weaken dependency integrity or overwrite existing configuration.
Install or use this only if you intentionally want persistent China-region mirrors for developer tooling. Run status checks first, avoid --all unless you have reviewed each tool, back up existing Cargo and Docker configuration, avoid GONOSUMDB=* and pip trusted-host unless you understand the tradeoff, and prefer organization-controlled mirrors for production or CI systems.
scripts/setup_mirrors.py:37Persistent Disabling of pip TLS Verification for the Configured Mirror
references/mirrors.md:76Global Disabling of Go Module Checksum Database Verification
references/mirrors.md:102System-Wide Docker Image Routing Through Unverified Community Mirrors
scripts/setup_mirrors.py:203Cargo Reset Removes Unrelated User-Defined Source Configuration
references/mirrors.md:119Documented Docker Setup Overwrites the Entire Privileged Daemon Configuration
The skill advertises broad one-click support for multiple ecosystems, but the documented behavior reportedly does not implement several claimed actions or only partially handles them. This mismatch can mislead users into trusting that secure or complete configuration changes were applied when they were not, potentially leaving traffic on unintended registries or causing unsafe manual follow-up steps.
The skill instructs execution of a local Python script that can read and modify persistent developer configuration files and may invoke shell actions, but the skill metadata does not declare any tool scope or allowed tools. This weakens user and platform visibility into what capabilities the skill needs, increasing the risk of unexpected filesystem or command execution side effects.
The activation criteria are broad enough to trigger on many generic development-performance or proxy-related requests, which could cause the skill to run in contexts where the user did not intend persistent environment changes. Because the skill changes package-manager and network settings, overbroad triggering materially raises the chance of unauthorized or surprising configuration modification.
The documentation recommends a one-click operation that can modify multiple persistent configuration files across package managers and development tools without an explicit upfront warning. This is risky because users may not realize the changes survive future sessions, affect all projects, or alter trusted registries and proxies in ways that impact supply-chain integrity and troubleshooting.
The usage guidance repeats a vague trigger without restating boundaries or a requirement for explicit consent before making persistent changes. In this skill's context, ambiguous invocation is more dangerous because the recommended workflow culminates in modifying developer tooling configuration files across multiple ecosystems.
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
Setting GONOSUMDB=* disables checksum database verification for all Go modules, removing an important integrity control against tampered or malicious dependencies. In a mirror-setup skill, this is more dangerous because users are already being redirected to alternate infrastructure, so weakening verification materially increases supply-chain risk.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Linux:
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": [
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Linux:
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": [
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Linux:
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": [
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Linux:
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": [
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
exe = shutil.which(cmd[0])
if not exe:
return False, f"{cmd[0]} not found"
result = subprocess.run(
cmd, capture_output=capture, text=True, timeout=15
)
return result.returncode == 0, result.stdout.strip()
The script persistently modifies ~/.cargo/config.toml without backup, confirmation, or careful merging, which can silently overwrite or alter existing Cargo source configuration. In this skill context, the purpose is to reconfigure developer tooling globally, so the danger is configuration integrity and supply-chain trust rather than direct code execution.
The reset logic rewrites ~/.cargo/config.toml using line-based section stripping, which can remove unrelated [source.*] configuration and corrupt a user's existing setup. Because this skill is specifically intended to alter development package sources, mistakes here can break builds or redirect dependency resolution in unintended ways, making it a meaningful integrity risk.
The natural-language content throughout the file is Chinese-only, including headings, instructions, and warnings. If organizational policy requires not forcing a specific language without user opt-in, this is a locale/language restriction presented without an alternative or explicit justification.
The script includes Chinese-only user-facing strings in the CLI help and positions the tool specifically as '国内开发环境镜像源配置' without any opt-in or alternative locale. Under the policy, forcing a specific language is a natural-language policy concern unless the locale restriction is explicitly justified or optional.
No suspicious patterns detected.