Back to skill

Security audit

HTML编码工具

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be an HTML coding helper, but it asks for broad file and command-execution powers without clear limits.

Review this skill before installing if your agent has access to sensitive files or unrestricted shell commands. Use it only in a workspace sandbox, limit environment variables and credentials, and require confirmation before command execution, network calls, overwrites, or access outside the active HTML project.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (1)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:21
Finding

Overprivileged Tool Access for an HTML Generation Skill

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 21–26
Vulnerability Type: Excessive tool permissions and failure to enforce least privilege
Risk Level: Medium

Complete Code Snippet:

yaml
tools:
- read
- exec
- write
- glob
- grep

Technical Analysis

The skill is intended to generate HTML pages, forms, and interactive components, but it requests general command-execution and broad filesystem capabilities. In particular, exec can allow arbitrary local command execution within the permissions of the hosting agent, while read, write, glob, and grep may permit access to files unrelated to the HTML-generation task.

The skill does not define workspace boundaries, permitted file patterns, a command allowlist, prohibited commands, or user-confirmation requirements for side effects. Although the document states that commands execute in a sandbox, it does not specify or enforce the sandbox's boundaries. Security therefore depends entirely on controls supplied by the external agent platform.

This is a least-privilege violation rather than evidence that malicious commands are currently embedded in the package. The package contains only SKILL.md, and the audited content does not contain an executable payload, persistence mechanism, credential-theft command, or remote payload download instruction.

Attack Path

  1. An attacker supplies a crafted page description or other HTML-generation input containing instructions to inspect local files or run a command.
  2. The skill is loaded with its declared read, glob, grep, write, and exec capabilities.
  3. If the host agent follows the injected request and lacks independent path or command restrictions, it searches or reads files outside the intended project workspace.
  4. The agent may then modify accessible files or execute attacker-selected commands under the host process's operating-system privileges.
  5. The resulting scope i ...[truncated 941 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove exec unless command execution is essential to a clearly documented workflow.
  2. Replace broad filesystem tools with APIs restricted to a dedicated project workspace or output directory.
  3. Limit reads and searches to explicit file extensions and paths required for HTML development.
  4. Limit writes to newly generated HTML, CSS, JavaScript, and approved asset files; reject path traversal and writes through symbolic links.
  5. If command execution must remain available, enforce a strict allowlist of commands and arguments rather than accepting shell command strings.
  6. Run permitted commands without a shell and reject metacharacters, command substitution, redirection, and pipelines.
  7. Require explicit user confirmation before executing commands, overwriting files, accessing files outside the active project, or making network requests.
  8. Execute the skill in a sandbox with a minimal environment, no unnecessary credentials, restricted network access, and an unprivileged operating-system account.
  9. Document concrete trust boundaries, including allowed paths, commands, network destinations, and maximum execution duration.
  10. Treat page descriptions and generated content as untrusted data, and explicitly instruct the agent not to interpret embedded content as authorization to use privileged tools.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation says the skill is not suitable for backend API development, yet elsewhere advertises external API integration. Contradictory capability statements can cause operators or agents to misunderstand the trust boundary and approve networked behavior they would otherwise restrict.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is presented as an HTML-focused coding tool, but its documented capabilities expand to file handling, external API use, and system command execution. That scope mismatch can mislead users and downstream agents into granting broader trust or permissions than expected, increasing the chance of unsafe execution or unintended side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Advertising file writing, command execution, and external API use without a prominent user-facing warning creates a meaningful safety risk. In an agent environment, these actions can modify local state, run unintended commands, or transmit data externally if users assume the skill is only for HTML generation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The invocation and usage description is written as a mixed Chinese/English instruction set, including Chinese-only operational phrasing such as when the skill should be used, without explicitly offering the user a language or locale option. This can violate language/locale policy expectations when a skill implicitly assumes a specific language instead of allowing user preference.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill is described in one place as pure Markdown/natural-language driven, while other sections classify it as MD+execute() and discuss command execution. This inconsistency can lead users to treat the skill as documentation-only when it may actually trigger command execution, weakening safe handling expectations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.