Back to skill

Security audit

Code Review Visualizer

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent code-review report generator, but its browser-opened HTML report instructions do not require escaping untrusted code or diff content.

Review before installing. The skill should be tightened to require treating all PR, Git, file path, diff, and source text as untrusted: HTML-encode it, avoid raw HTML insertion, avoid putting it into script/style/URL contexts, and prefer no JavaScript or a restrictive CSP. Open generated reports in an isolated context rather than on an authenticated internal site until that is addressed.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:38
Finding

Unescaped Repository Content Can Cause HTML and Script Injection

Content
View full analysis
` tool or sent directly to the user's browser to open. HTML structure: - Single file with no external dependencies (all CSS/JS inline) ``` ```markdown ### Scenario 1: PR Review Summary The user provides a PR diff or Git output, and the generated HTML contains: 1. **PR title and description** — a one-sentence TL;DR 2. **Risk map** — list the risk level by file 3. **Per-file diff** — syntax-highlighted diff with risk labels 4. **Review recommendations** — tell reviewers where to focus ``` ```markdown ### Scenario 3: Code Walkthrough The user provides code files or module paths, and the generated output contains: 1. **Request path** — data flow from entry to exit 2. **Step-by-step code** — expandable source blocks and annotations 3. **Trust boundaries** — mark security boundaries and external dependencies ``` ```markdown ## Notes - All CSS and JavaScript must be inline, with no external resources - Diff colors must use the GitHub dark-theme color scheme - Only three risk labels may be used - The mobile layout must be readable - If the diff is too long, show only key changed lines ``` The document does not require HTML escaping, context-sensitive output encoding, sanitization, or safe DOM insertion for repository-controlled content. ### Technical Analysis The skill is explicitly designed to place user-provided or repository-controlled data—including PR titles, file paths, diffs, annotations, and source code—inside a browser-opened HTML document ...[truncated 3385 chars]
Remediation
View remediation
`, `"`, and `'` before inserting untrusted content into generated markup. 3. Require untrusted content to be inserted through text-only DOM APIs such as `textContent`; prohibit `innerHTML`, `outerHTML`, `insertAdjacentHTML`, and raw template interpolation for such values. 4. Never place untrusted input in inline JavaScript, CSS, event-handler attributes, URL attributes, element names, or attribute names. 5. Prefer a report with no JavaScript. If interactivity is necessary, use fixed static code that does not construct executable code or markup from repository data. 6. Add a restrictive Content Security Policy, preferably: ```html ``` 7. If fixed JavaScript is required, move it away from inline handlers, authorize it with a generated nonce or hash, and continue to prohibit evaluation functions such as `eval` and `new Function`. 8. Add regression tests using payloads containing closing tags, script elements, event handlers, SVG markup, quotes, ampersands, and malicious URL schemes. 9. Recommend opening reports in an isolated, unauthenticated origin or sandboxed browser context rather than an authenticated internal application origin. 10. Add a mandatory instruction similar to: ```markdown Treat all user, Git, and repository content as untrusted text. HTML-encode it before insertion. Never interpolate it as raw HTML or place it in script, style, event-handler, or URL contexts. Use textContent for dynamic values. ``` ]]>
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description is written to activate when Chinese-language requests are made and the rest of the skill instructions are exclusively in Chinese, indicating a fixed language/locale expectation. The file does not offer a user language choice or document a justified region-specific constraint, which conflicts with the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest description says the skill should be used 'when the user needs code review visualization, PR review reports, code diff highlighting, risk tag annotation, or review page generation' without defining boundaries, exclusions, or specific trigger phrases. In a manifest file, this broad natural-language invocation guidance can overlap with many ordinary code-review requests and may cause unintended activation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The template sets <html lang="zh-CN">, which fixes the generated output to Simplified Chinese locale. Because the skill does not mention user opt-in or locale selection, this is a natural-language locale constraint that may violate organizational language policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description includes user-facing activation guidance only in Chinese ('当用户需要...时使用') with no indication that other languages are supported or that this locale restriction is intentional. This creates a language-policy concern because the skill appears to prescribe a specific language/locale without user opt-in or documented justification.

Content

No source excerpt is available for this finding.