Back to skill

Security audit

Create Web Form

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent web-form reference package, but some included examples could lead an agent to generate insecure backend form code, so it needs review before use.

Review generated backend code carefully before using this skill in real applications. Do not trust hidden form fields for security decisions, do not deploy Flask with debug enabled or bound broadly, encode all user-controlled output, validate on the server, and pin dependencies for production work.

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

T09 · Insecure Skill Coding Practices

Error
Location
references/php-forms.md:37
Finding

Unencoded Form Input Enables Reflected Cross-Site Scripting

Content
View full analysis

Your email address is: ``` The corresponding GET example contains the same flaw: ```php Welcome
Your email address is: ``` ### Technical Analysis The examples insert attacker-controlled `name` and `email` values directly into an HTML response. Neither validation nor context-appropriate HTML output encoding is applied before the values are rendered. An attacker can submit HTML containing executable JavaScript, such as an event-handler payload. The PHP application then incorporates that value into its response, and the victim's browser interprets it as active content in the application's origin. Input validation alone is not a sufficient defense because valid-looking values can still contain characters that affect HTML parsing. Output must be encoded for the precise output context. ### Attack Path 1. A developer copies the introductory form-processing example into a PHP application. 2. An attacker constructs a request in which `name` or `email` contains an HTML or JavaScript payload. 3. For the GET variant, the attacker can place the payload in a crafted URL and persuade a victim to open it. For the POST variant, the attacker can submit the payload directly or cause a victim to submit an attacker-controlled form. 4. The PHP handler reads the value from `$_GET` or `$_POST`. 5. The handler echoes the value into the HTML response without encoding it. 6. The victim's browser parses and executes the injected content under the vulnerable application's origin. ### Impact Assessment Successful exploitation permits script execution in the security context of the affected website. Depending on the ...[truncated 571 chars]
Remediation
View remediation
Welcome
Your email address is: ``` Apply the same protection to the GET example. In addition: 1. Validate field presence, length, and expected format on the server. 2. Use `filter_var($email, FILTER_VALIDATE_EMAIL)` for email-format validation, but do not treat validation as a replacement for output encoding. 3. Encode according to the output context; HTML text, HTML attributes, URLs, CSS, and JavaScript require different handling. 4. Add a restrictive Content Security Policy as defense in depth. 5. Mark the original direct-echo pattern as explicitly unsafe so generated applications do not reproduce it. 6. Add tests using HTML metacharacters and representative XSS payloads to verify that responses display input as text rather than executable markup. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
references/python-flask-app.md:89
Finding

Flask Development Debugger Is Exposed on All Network Interfaces

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
references/javascript.md:1933
Finding

Unpinned Third-Party Dependency Installation Produces Mutable Builds

Content
View full analysis
Remediation
View remediation
--hash=sha256: ``` 4. Use deterministic installation modes, such as `npm ci`, rather than resolving a fresh dependency graph with `npm install`. 5. Run dependency auditing and vulnerability scanning in continuous integration. 6. Review transitive dependency changes before updating lockfiles. 7. Install dependencies in an isolated, least-privileged environment rather than as an administrator. 8. Configure trusted registries explicitly and protect against dependency-confusion attacks where private package names are used. 9. Regularly update pinned versions through a controlled review and testing process rather than leaving them permanently stale. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (48)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `styling-web-forms.md` - Form styling techniques and best practices

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `styling-web-forms.md` - Form styling techniques and best practices

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `javascript.md` - JavaScript techniques for form functionality

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `javascript.md` - JavaScript techniques for form functionality

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `html-form-example.md` - Practical HTML form examples

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `php-mysql-database.md` - Database integration with PHP

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `web-performance.md` - Performance optimization techniques

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `web-performance.md` - Performance optimization techniques

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/aria-form-role.md (reported line 18)May include surrounding context.

Use an HTML <form> element to contain your form controls, rather than the ARIA form role, unless you have a very good reason. The HTML <form> element is sufficient to tell assistive technologies that there is a form.

html
<!-- Recommended semantic approach -->
<form id="send-comment" aria-label="Add a comment">
  <!-- form controls here -->
</form>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/aria-form-role.md (reported line 34)May include surrounding context.

html
<div role="form" id="contact-info" aria-label="Contact information">
  <!-- form content -->
</div>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/form-controls.md (reported line 28)May include surrounding context.

html
<form>
  <!-- form contents -->
</form>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/form-controls.md (reported line 113)May include surrounding context.

md
<input id="username" type="text" name="username" required />
<label for="username">*</label>

<!-- Better -->
<label for="username">
  <span>Name:</span>
  <input id="username" type="text" name="username" required />

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/form-controls.md (reported line 347)May include surrounding context.

Submit this form

text

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/form-controls.md (reported line 359)May include surrounding context.

Reset this form

text

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/html-form-elements.md (reported line 164)May include surrounding context.

Example

html
<!-- Basic button -->
<button type="button">Click me</button>

<!-- Form submission button -->

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/html-form-elements.md (reported line 506)May include surrounding context.

md
<!-- Simple battery level -->
<p>Battery level: <meter min="0" max="100" value="75">75%</meter></p>

<!-- With low/high ranges -->
<p>
  Student's exam score:
  <meter low="50" high="80" max="100" value="84">84%</meter>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/html-form-example.md (reported line 17)May include surrounding context.

html
<form>
  <!-- form elements go here -->
</form>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/html-form-example.md (reported line 149)May include surrounding context.

```

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/html-form-example.md (reported line 256)May include surrounding context.

  • Use the multiple attribute to allow the user to select more than one value.
html
<!-- Visible values -->
<select id="cars" name="cars" size="3">

<!-- Allow multiple selections -->

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · references/php-mysql-database.md (reported line 1376)May include surrounding context.

md
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    // Prepare the delete statement
    $stmt = $conn->prepare("DELETE FROM MyGuests WHERE id = :id");
    $stmt->bindParam(':id', $id);

Instruction Override

High
Category
Prompt Injection
Confidence
70% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · references/python-as-web-framework.md (reported line 103)May include surrounding context.

md
- **Interactive debugger** -- shows a traceback in the browser with an interactive Python console
- **Detailed error pages** -- shows full error details instead of generic "500 Internal Server Error"

**Warning:** Never enable debug mode in production -- it allows arbitrary code execution.

---

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/web-performance.md (reported line 344)May include surrounding context.

Loading Critical Assets Early

html
<!-- Preload standard JavaScript -->
<link rel="preload" href="important-js.js" as="script" />

<!-- Preload JavaScript module -->

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation text is very broad, including generic phrases like 'create a form' and 'build a web form,' which can cause the skill to trigger for many common development requests outside a narrowly scoped form-building task. Overbroad routing increases the chance that the agent will invoke this skill in inappropriate contexts, expanding exposure to its server-side, database, and networking guidance and potentially bypassing more specialized or safer skills.

Content

No source excerpt is available for this finding.

Unbounded Output

Medium
Category
Output Handling
Confidence
75% confidence
Finding

Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.

Content

Scanner excerpt · references/html-form-example.md (reported line 165)May include surrounding context.

md
**When to use POST:**

- Appends the form data inside the body of the HTTP request (data is not shown in the URL)
- POST has no size limitations
- Form submissions with POST cannot be bookmarked
- Always use POST when submitting sensitive or personal information

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation states that hidden fields cannot be seen or modified by users, which is incorrect and unsafe guidance. Hidden inputs are easily changed with browser developer tools, proxies, or crafted requests, so readers may wrongly trust hidden fields for authorization, pricing, identity, or workflow control.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.