improve-codebase-architecture

Pass

Audited by Gen Agent Trust Hub on Jul 1, 2026

Risk Level: SAFEPROMPT_INJECTIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
  • [PROMPT_INJECTION]: The skill is vulnerable to indirect prompt injection and cross-site scripting (XSS) via the generated HTML report. It ingests untrusted data from the codebase being analyzed—including file paths, directory names, and code content—and interpolates this data into a dynamically generated HTML template. The Mermaid diagramming library used within this report is configured in HTML-REPORT.md with securityLevel: "loose", which permits the execution of JavaScript and rendering of HTML tags embedded within the diagram text. If the codebase contains malicious strings (e.g., in a filename, code comment, or variable name), they could execute in the user's browser context when the report is opened.\n
  • Ingestion points: Codebase directory structure, glossary (CONTEXT.md), and Architectural Decision Records (ADRs) found in docs/adr/.\n
  • Boundary markers: No explicit boundary markers or sanitization logic is defined in the instructions to separate untrusted codebase data from the HTML/Mermaid structure.\n
  • Capability inventory: The skill can write files to the system temporary directory and invoke system shell commands to open those files.\n
  • Sanitization: None detected; the use of securityLevel: "loose" explicitly disables standard Mermaid security sanitization.\n- [COMMAND_EXECUTION]: The skill automatically executes system-level commands to open the generated report for the user. It uses xdg-open on Linux, open on macOS, and start on Windows as described in the SKILL.md process section. While intended for user convenience, this automatically triggers a browser to view a local file containing content generated from untrusted codebase data without prior user inspection of the file content.\n- [EXTERNAL_DOWNLOADS]: The generated HTML report fetches external assets from well-known technology services at runtime to support styling and diagram rendering. This includes Tailwind CSS and the Mermaid JS library from the following sources:\n
  • https://cdn.tailwindcss.com\n
  • https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs
Audit Metadata
Risk Level
SAFE
Analyzed
Jul 1, 2026, 11:20 PM
Security Audit — agent-trust-hub — improve-codebase-architecture