Back to skill

Security audit

Faq Forge

Security checks for vulnerabilities and agentic risk

Overview

FAQ Forge is a coherent local FAQ tool, but its generated HTML can execute untrusted FAQ content if imported or published without sanitization.

Install only if you are comfortable using it as a local, user-directed FAQ generator and will review imported content before publishing. Do not publish generated HTML from untrusted Markdown or JSON without escaping or sanitizing FAQ fields first, especially on the same domain as authenticated business applications. Keep backups before delete, import, template apply, or export operations.

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
faq_publish.py:47
Finding

Stored Cross-Site Scripting in Generated HTML FAQ Pages

Content
View full analysis
{title} ``` Categories are inserted into both HTML text and attribute contexts without escaping: ```python for category in sorted(by_category.keys()): cat_id = category.lower().replace(" ", "-") html += f'
  • {category}
  • \n' ``` FAQ fields and related-question data are also inserted directly into the generated document: ```python for category in sorted(by_category.keys()): cat_id = category.lower().replace(" ", "-") html += f'
    \n' html += f'

    {category}

    \n' for entry in by_category[category]: active_class = "" if collapsible else "active" html += f'
    \n' html += '
    \n' html += f' {entry.question}\n' if entry.priority in ["critical", "high"]: html += f' {entry.priority.upper()}\n' if collapsible: html += ' ▼\n' html += '
    \n' html += '
    \n' html += f'

    {entry.answer}

    \n' if entry.tags or entry.related: ...[truncated 3608 chars]
    Remediation
    View remediation
    str: value = re.sub(r'[^A-Za-z0-9_-]', '-', value) value = re.sub(r'-+', '-', value).strip('-') return value or "section" ``` 4. Validate database fields when loading and importing them. In particular: - Require strings for questions, answers, categories, priorities, products, IDs, and tags. - Restrict priorities to `low`, `normal`, `high`, or `critical`. - Restrict identifiers used in attributes to a safe character set. - Reject malformed nested structures. 5. Treat FAQ answers as plain text by default. If rich HTML is an intended feature, process it through a maintained allowlist-based HTML sanitizer and prohibit scripts, event-handler attributes, unsafe URLs, embedded frames, and active SVG content. 6. Add a restrictive Content Security Policy to generated pages as defense in depth. For example, move the existing inline JavaScript to a separate static file and use a policy similar to: ```html ``` Output encoding remains mandatory because a CSP can be weakened or omitted during deployment. 7. Add regression tests for every output context, including: - `` - `` - `" onmouseover="alert(1)` - Categories containi ...[truncated 249 chars]
    Vulnerability Patterns
    • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
    • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
    • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
    • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
    • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
    Findings (12)

    Hidden Instructions

    High
    Category
    Prompt Injection
    Confidence
    60% confidence
    Finding

    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

    Content

    Scanner excerpt · README.md (reported line 1)May include surrounding context.

    md
    ---
    name: "FAQ Forge Customer Knowledge Base Builder"
    description: "Build, maintain, and publish professional FAQ documentation. Create, organize, and publish customer-facing knowledge bases. Reduce support burden by answering common questions before they're asked."
    author: "@TheShadowRose"
    

    Hidden Instructions

    High
    Category
    Prompt Injection
    Confidence
    60% confidence
    Finding

    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

    Content

    Scanner excerpt · SKILL.md (reported line 1)May include surrounding context.

    md
    ---
    name: "FAQ Forge Customer Knowledge Base Builder"
    description: "Build, maintain, and publish professional FAQ documentation. Create, organize, and publish customer-facing knowledge bases. Reduce support burden by answering common questions before they're asked."
    author: "@TheShadowRose"
    

    Missing User Warnings

    Medium
    Category
    Not specified by scanner
    Confidence
    87% confidence
    Finding

    This markdown file instructs users to delete FAQ entries with python faq_forge.py delete question-id but gives no accompanying warning that the action may permanently remove data or should be used carefully. For markdown files, the skill description should disclose behaviors that can affect user data, and this section omits that caution.

    Content

    No source excerpt is available for this finding.

    Missing User Warnings

    Medium
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    This code path performs a destructive operation by deleting an entry and immediately saving the modified database. Although the CLI prints a success message afterward, there is no pre-action confirmation, warning, or other user disclosure before the irreversible change occurs.

    Content

    No source excerpt is available for this finding.

    Intent-Code Divergence

    Medium
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    The module docstring says "FAQ Forge - Import Tool" and describes importing Q&A pairs from markdown documentation, while the implementation also includes export_to_json and a CLI export command that writes database contents to a file. This is more than incomplete detail: the documentation frames the tool specifically as import-only, which contradicts the presence of an explicit export capability.

    Content

    No source excerpt is available for this finding.

    Missing User Warnings

    Low
    Category
    Not specified by scanner
    Confidence
    86% confidence
    Finding

    This markdown file recommends adding Google Analytics for tracking, which introduces user-data collection and privacy implications. The surrounding text describes the capability but does not warn users about the privacy impact or need to disclose analytics/tracking to end users.

    Content

    No source excerpt is available for this finding.

    Scope Creep

    Low
    Category
    Excessive Agency
    Confidence
    70% confidence
    Finding

    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

    Content

    Scanner excerpt · README.md (reported line 613)May include surrounding context.

    md
    **USE AT YOUR OWN RISK.**
    
    - The author(s) are NOT liable for any damages, losses, or consequences arising from 
      the use or misuse of this software — including but not limited to financial loss, 
      data loss, security breaches, business interruption, or any indirect/consequential damages.
    - This software does NOT constitute financial, legal, trading, or professional advice.
    - Users are solely responsible for evaluating whether this software is suitable for
    

    Scope Creep

    Low
    Category
    Excessive Agency
    Confidence
    70% confidence
    Finding

    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

    Content

    Scanner excerpt · SKILL.md (reported line 626)May include surrounding context.

    md
    **USE AT YOUR OWN RISK.**
    
    - The author(s) are NOT liable for any damages, losses, or consequences arising from 
      the use or misuse of this software — including but not limited to financial loss, 
      data loss, security breaches, business interruption, or any indirect/consequential damages.
    - This software does NOT constitute financial, legal, trading, or professional advice.
    - Users are solely responsible for evaluating whether this software is suitable for
    

    Missing User Warnings

    Low
    Category
    Not specified by scanner
    Confidence
    76% confidence
    Finding

    The documentation encourages importing all markdown files from a directory, which can process large amounts of existing documentation and potentially pull in unintended content. Although the file later includes a general data disclaimer, this workflow section lacks a specific warning to review imported data before publishing or relying on it.

    Content

    No source excerpt is available for this finding.

    Intent-Code Divergence

    Low
    Category
    Not specified by scanner
    Confidence
    80% confidence
    Finding

    At L643-L644, the disclaimer states that the software does not transmit data externally unless explicitly configured by the user. However, the same skill documentation includes multiple external URLs and contact endpoints at L652-L657, indicating externally reachable resources are part of the delivered skill context. While this is documentation rather than executable code, it is still an intent-level contradiction within the skill file.

    Content

    No source excerpt is available for this finding.

    Missing User Warnings

    Low
    Category
    Not specified by scanner
    Confidence
    76% confidence
    Finding

    This code performs a file write that can overwrite or create the specified output file, but the only disclosure appears after the write completes. For a code-file warning check, there is no prior confirmation prompt or explicit warning comment/docstring about the overwrite risk at the write site or CLI command.

    Content

    No source excerpt is available for this finding.

    Missing User Warnings

    Low
    Category
    Not specified by scanner
    Confidence
    81% confidence
    Finding

    This code file performs a data-modifying operation by adding entries to the FAQ database via self.db.add(entry). Although the file prints informational messages, it does not explicitly ask the user to confirm before bulk-applying a template that may alter stored FAQ content.

    Content

    No source excerpt is available for this finding.