Back to skill

Security audit

Pdf Generator

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only PDF generation skill with expected local file-output examples, but users should treat the sample paths and HTML templating as unsafe for untrusted input without hardening.

Safe to install as reference material. Before using the snippets in real applications, write outputs only to chosen directories, avoid overwriting important files, sanitize filenames, escape or template untrusted HTML data, and restrict WeasyPrint resource fetching if inputs can come from other users.

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

T09 · Insecure Skill Coding Practices

Error
Location
advanced.md:115
Finding

Unvalidated Output Path Permits Arbitrary File Writes

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
templates.md:9
Finding

Invoice Identifier Is Embedded in the Output Filename Without Sanitization

Content
View full analysis
body {{ font-family: Arial, sans-serif; margin: 40px; }} .header {{ display: flex; justify-content: space-between; }} .company {{ font-size: 24px; font-weight: bold; }} .invoice-title {{ font-size: 32px; color: #333; }} table {{ width: 100%; border-collapse: collapse; margin: 20px 0; }} th, td {{ padding: 12px; text-align: left; border-bottom: 1px solid #ddd; }} th {{ background: #f5f5f5; }} .total {{ font-size: 18px; font-weight: bold; text-align: right; }}
{data['company']['name']}
INVOICE

Invoice #: {data['invoice']['number']}

Date: {data['invoice']['date']}

Due: {data['invoice']['due_date']}

Bill To:

{data['client']['name']}
{data['client']['address']}

{''.join(f"" for item in data['items'])}
DescriptionQtyRateAmount
{item['desc']}{item['qty']}${item['rate']}${item['qty'] * item['rate']}

Total: ${sum(item['qty'] * item['rate'] for item in data['items'])}

""" HTML(string=html).write_pdf(f"invoice-{data['invoice']['number']}.pdf") ``` ### Technical Analysis The invoice number is incorporated directly into the destination filename. No character allowlist, ...[truncated 1411 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
templates.md:9
Finding

Unescaped Template Data Enables HTML Injection and External Resource Resolution

Content
View full analysis
body {{ font-family: Arial, sans-serif; margin: 40px; }} .header {{ display: flex; justify-content: space-between; }} .company {{ font-size: 24px; font-weight: bold; }} .invoice-title {{ font-size: 32px; color: #333; }} table {{ width: 100%; border-collapse: collapse; margin: 20px 0; }} th, td {{ padding: 12px; text-align: left; border-bottom: 1px solid #ddd; }} th {{ background: #f5f5f5; }} .total {{ font-size: 18px; font-weight: bold; text-align: right; }}
{data['company']['name']}
INVOICE

Invoice #: {data['invoice']['number']}

Date: {data['invoice']['date']}

Due: {data['invoice']['due_date']}

Bill To:

{data['client']['name']}
{data['client']['address']}

{''.join(f"" for item in data['items'])}
DescriptionQtyRateAmount
{item['desc']}{item['qty']}${item['rate']}${item['qty'] * item['rate']}

Total: ${sum(item['qty'] * item['rate'] ...[truncated 2329 chars]

Remediation
View remediation
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (7)

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown skill describes multiple operations that create or modify PDF files on disk, including merge, split, fill, watermark, bookmark, rotate, and batch generation. The document provides code examples but does not include any warning that these actions write files, may overwrite paths, or alter document contents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file embeds code that writes an invoice PDF to the local filesystem, which is a file-creation operation affecting user data and system state. The snippet provides no warning, confirmation, or explanatory note to the user about creating the file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The embedded code saves a report PDF to report.pdf, but the surrounding markdown does not warn that running the example creates or overwrites a local file. For markdown and code examples, safety-relevant file write behavior should be disclosed to users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This example performs a filesystem write by creating contract.pdf, yet there is no visible warning or note in the markdown describing that side effect. Users should be informed when examples create files on disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The snippet writes certificate.pdf to disk, which is a safety-relevant side effect for a documentation example. The markdown does not currently warn users that executing the code will create a local file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The example saves resume.pdf to the filesystem, but the markdown provides no disclosure that running it creates a file. Missing side-effect warnings in example documentation can surprise users and affect local data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file includes multiple examples that create output files such as output.pdf, merged.pdf, and page_*.pdf, but it does not include any warning that these commands will write files to disk or may overwrite existing files. For markdown files, missing disclosure about actions affecting user data or filesystem state should be flagged when the description omits such warnings.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.