Back to skill

Security audit

HTML编码工具-免费版

Security checks for vulnerabilities and agentic risk

Overview

This HTML helper is not overtly malicious, but it asks for command/browser capability and documents an unsafe unpinned command plus broad, inconsistent scope.

Install only if you are comfortable with a review-needed skill that may invoke command-line and browser workflows. Avoid running the documented npx validator unless you pin and review the package version or use a trusted local/online validator, and treat its broad automation and API-key claims as documentation quality issues rather than clear capabilities.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:289
Finding

Unpinned Third-Party Package Download and Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 289–294
Vulnerability Type: Unpinned npm dependency executed through npx
Risk Level: Medium

Complete Code Snippet

bash
### Third step: Validate standards compliance

# Check with the W3C validator
# Visit validator.w3.org and paste the HTML code
# Or use a command-line tool
npx html-validator-cli --file index.html

The headings and comments above are English translations of the original documentation; the executable command is reproduced verbatim.

Technical Analysis

The documented command invokes html-validator-cli through npx without specifying a reviewed version. If the package is not already available locally, npx may retrieve it from the configured npm registry and immediately execute its code.

The project does not provide a package manifest, lockfile, integrity metadata, publisher verification, or other mechanism that binds this command to an audited package artifact. Consequently, the code executed later can differ from the code available when the Skill was reviewed. Relevant supply-chain scenarios include compromise of the legitimate package or publisher account, publication of a malicious or unexpectedly changed release, and substitution through a compromised or attacker-controlled registry configuration.

This is especially relevant because the Skill declares exec capability in its metadata. The command is presented as a normal validation step, making execution by an Agent or user reasonably foreseeable.

Attack Path

  1. An attacker compromises the package, its publisher account, or the npm registry path used by the environment and publishes a malicious release under html-validator-cli.
  2. A user asks the Skill to validate an HTML file.
  3. The Agent or user follows the documented npx html-validator-cli --file index.html command.
  4. npx resolves and downloads the mutable, unpinned package release.
  5. P ...[truncated 1093 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the command to a specifically reviewed package version, for example:

    bash
    npx --yes html-validator-cli@REVIEWED_VERSION --file index.html
    

    Pinning alone does not provide complete integrity protection, but it prevents silently selecting a newer release.

  2. Prefer declaring the validator as a development dependency in package.json and committing a lockfile containing registry URLs and integrity hashes:

    bash
    npm ci
    npm exec -- html-validator-cli --file index.html
    
  3. Review the package name, publisher, source repository, release provenance, dependency tree, and selected version before approving it.

  4. Where compatible with the package, suppress dependency lifecycle scripts during installation:

    bash
    npm ci --ignore-scripts
    

    Test this configuration because some legitimate packages require installation scripts.

  5. Configure npm to use an approved registry and enforce lockfile integrity in CI. Consider dependency allowlisting, provenance verification, and automated package-risk scanning.

  6. Run validation in a sandbox with least privilege, no unnecessary secrets, restricted filesystem mounts, and constrained outbound network access.

  7. Prefer a built-in, locally reviewed validator when available. If an online validation service is used instead, disclose that submitted HTML leaves the local environment and avoid transmitting confidential content.

Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest presents a narrowly scoped HTML coding skill, but the body claims broader automation, deployment, networking, file processing, API handling, and command execution scenarios. This mismatch increases the chance that an agent or user will trust and invoke the skill in contexts beyond its stated purpose, expanding the operational attack surface and enabling unintended privileged actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description explicitly states '支持中文交互', and the document is written as a Chinese-only experience without indicating that users may choose another language. Under the policy, forcing or implicitly constraining language/locale without user opt-in is a natural-language policy concern unless the restriction is clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill advertises create/query/export as well as modify/reset/import operations but does not clearly warn that these can alter files or data. In an agent setting, ambiguous side-effecting verbs can lead users or orchestrators to invoke operations without understanding that state may change, increasing the risk of accidental overwrite, destructive changes, or unsafe data handling.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger condition includes generic activities like code generation, debugging, testing, and deployment, which are far broader than safe HTML authoring. Overbroad invocation criteria can cause the skill to activate in unrelated workflows where its exec and other tool permissions may be applied unexpectedly, leading to unintended actions or policy bypass through misrouting.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

The skill recommends running npx html-validator-cli without pinning a specific version, which allows execution of whatever package version is current at invocation time. In a tool-enabled agent context with exec available, this creates a supply-chain risk: a compromised or unexpected upstream release could execute arbitrary code on the host.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The dependency section states '无需额外API Key' and describes the skill as pure Markdown instruction-driven, but the known limitations section later says '需要API Key,无Key环境无法使用'. These statements actively contradict each other about whether credentials are required to use the skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The skill declares exec and browser capabilities that are broader than necessary for a free HTML authoring assistant. Excess capabilities matter in agent environments because prompt content can steer the agent toward command execution or web access unrelated to HTML generation, increasing the blast radius of misuse or prompt-injection-driven behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.