Back to skill

Security audit

json-report

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently converts JSON into Markdown using a small local helper script, with a limited report-rendering risk but no evidence of hidden, persistent, networked, or destructive behavior.

Install only if you are comfortable with a local Python helper reading the JSON file you provide and writing a Markdown report. Treat reports generated from untrusted JSON as untrusted documents, especially before rendering them as HTML or opening them in viewers that load remote images or allow raw HTML.

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

Warning
Location
scripts/json_to_md.py:17
Finding

Untrusted Markdown and HTML Injection in Generated Reports

Content
View full analysis
") ``` The insufficiently escaped values are inserted into the generated report at the following locations: ```python parts = [f"# {title}", ""] ``` ```python parts.append(f"## {key}") ``` ```python for key, value in data.items(): parts.append(f"| {escape_cell(key)} | {escape_cell(value)} |") ``` ### Technical Analysis The `escape_cell()` function escapes only pipe characters and line-feed characters. It does not neutralize raw HTML, Markdown links, Markdown images, backticks, carriage returns, or other syntax interpreted by Markdown renderers. Moreover, the report title and headings derived from top-level JSON keys are inserted without calling `escape_cell()` or applying any context-appropriate encoding. An attacker who controls the input JSON or the `--title` argument can therefore place active or misleading Markdown content in the generated report. For example, the following input value is preserved as raw HTML: ```json { "status": "" } ``` The generated Markdown contains: ```markdown | status | | ``` When opened in a Markdown renderer that permits raw HTML or remote images, this content may cause a request to an attacker-controlled server. Markdown links, images, headings, and other presentation elements can also be injected to create deceptive report content. ### Attack Path 1. An attacker supplies or influences a JSON file processed by the skill, or controls the value passed through `--title`. 2. The attacker embeds raw H ...[truncated 1521 chars]
Remediation
View remediation
`, and `&` when HTML rendering is not explicitly required. 3. Normalize all line endings, including `\r\n`, standalone `\r`, and `\n`, before inserting content into a table or heading. 4. Use a dedicated Markdown-generation or sanitization library with a clearly defined safe-output policy where feasible. 5. Treat titles and headings separately from table cells because each Markdown context has different parsing rules. 6. If preserving arbitrary text exactly is required, render values using safely escaped code spans or fenced blocks while correctly handling embedded backticks and fence delimiters. 7. If generated reports are rendered to HTML, apply an HTML sanitizer and disable raw HTML and remote resource loading in the renderer. 8. Add regression tests for raw HTML, Markdown links and images, backticks, pipes, angle brackets, CR/LF combinations, heading syntax, and malicious title values. ]]>
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (1)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill instructs the agent to invoke a local Python helper and produce an output file, but it does not declare any explicit tool scope such as allowed-tools or permissions. That creates an authorization gap where the agent may use file read/write capabilities more broadly than the skill metadata communicates, increasing the risk of unintended file access or modification if the skill is invoked on sensitive inputs or in a permissive runtime.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.