Back to skill

Security audit

Static Webhost

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent and disclosed, but it guides agents through root-level web-server changes using under-specified deployment path templates.

Install only if you want an agent to help modify local Caddy or Nginx static hosting. Require explicit approval for every privileged command, validate project names and source paths, back up existing configuration, run server config tests before reload, and prefer a non-root local server when system deployment is not necessary.

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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:56
Finding

Unpinned Package Retrieval and Execution Through npx

Content
View full analysis
Remediation
View remediation
./public ``` Pinning reduces unexpected version drift, but it must be combined with registry controls and package verification because a version reference alone does not eliminate all supply-chain risks. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:98
Finding

Unsafe Interpolation of Deployment Paths into Privileged Shell Commands

Content
View full analysis
cp -r /var/www/html// ``` ### Technical Analysis The instructions do not define validation or safe quoting requirements for `` or ``. If an agent replaces these placeholders with user-controlled text and passes the resulting command to a shell, metacharacters such as semicolons, command substitutions, redirections, or newlines can alter the intended command. Unquoted whitespace and wildcard characters can also change argument boundaries or expand to unintended files. A project name containing `..` or path separators may escape the intended `/var/www/html` deployment directory. A source operand beginning with `-` may be interpreted as an option by `cp` unless the option list is terminated with `--`. Because the Skill declares that deployment may require `sudo` or root privileges, unsafe interpolation could turn an otherwise limited path-handling flaw into elevated arbitrary command execution or unauthorized system-file modification. These are documentation templates rather than directly executable code, so exploitation depends on an implementing agent substituting untrusted values without validation. The current instructions nevertheless fail to establish the controls needed for safe privileged execution. ### Attack Path 1. An attacker supplies a crafted project name or source path as part of a deployment request. 2. The agent substitutes that value directly into the documented shell command. 3. The shell interprets injected metacharacters, command substitutions, redirections, traversal components, wildcard expansions, or option-like operands. 4. The resulting command ...[truncated 1289 chars]
Remediation
View remediation
&2 exit 1 ;; esac destination="/var/www/html/$project_name" sudo mkdir -p -- "$destination" sudo cp -R -- "$source_path"/. "$destination"/ ``` This example must still be combined with canonical-path checks, source-directory restrictions, symlink handling, and minimal privilege use. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The invocation examples include short, high-level phrases like "部署一下" and "让我能访问," plus the scope "serve any static content over HTTP," which are broad enough to match many ordinary requests. The description does not provide negative examples beyond excluding dynamic backends/APIs, so activation boundaries for this skill remain somewhat ambiguous.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
93% confidence
Finding

This skill instructs use of sudo to copy and modify sensitive system web-server configuration and document roots. Even though the intent is legitimate deployment, embedding privileged filesystem and service-management steps in a broadly triggered skill creates a meaningful risk of unintended system modification or abuse if invoked in the wrong context.

Content

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

备份命令(执行任何修改前)

bash
# Nginx 配置备份
sudo cp -r /etc/nginx /etc/nginx.backup.$(date +%Y%m%d_%H%M%S)

# Caddy 配置备份  
sudo cp /etc/caddy/Caddyfile /etc/caddy/Caddyfile.backup.$(date +%Y%m%d_%H%M%S)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
93% confidence
Finding

This instance continues privileged access to /etc/caddy/Caddyfile, a critical service configuration file. Incorrect or unintended execution can alter exposed web routes, break service availability, or overwrite production configuration, and the skill context increases risk because it is designed to edit live web-serving infrastructure.

Content

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

md
sudo cp -r /etc/nginx /etc/nginx.backup.$(date +%Y%m%d_%H%M%S)

# Caddy 配置备份  
sudo cp /etc/caddy/Caddyfile /etc/caddy/Caddyfile.backup.$(date +%Y%m%d_%H%M%S)

# Web 根目录备份(如已有内容)
sudo cp -r /var/www/html /var/www/html.backup.$(date +%Y%m%d_%H%M%S)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
90% confidence
Finding

Privileged copying of /var/www/html is less sensitive than editing service configs but still represents root-level access to a public content directory. In a skill whose purpose is to publish files over HTTP, misuse could expose unintended content, overwrite existing sites, or facilitate unauthorized publication.

Content

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

sudo cp /etc/caddy/Caddyfile /etc/caddy/Caddyfile.backup.$(date +%Y%m%d_%H%M%S)

Web 根目录备份(如已有内容)

sudo cp -r /var/www/html /var/www/html.backup.$(date +%Y%m%d_%H%M%S)

text

### 替代方案(无需 root)

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The natural-language instructions are presented bilingually and include Chinese-specific trigger phrases, but there is no statement that language preference follows user choice or locale. That can conflict with language policy expectations when a skill implicitly imposes or assumes a language format without explicit opt-in.

Content

No source excerpt is available for this finding.