T09 · Insecure Skill Coding Practices
- Location
scripts/notion_db_weekly_report_generator.py:59- Finding
Unescaped Record Data Allows Markdown Content Injection
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This weekly report skill is functional, but it should go to Review because it automatically adds payment links and ships billing-contract material that is not clearly scoped to report generation.
Review this skill before installing. It appears to run locally and generate weekly report markdown, but users should be aware that normal output includes monetization metadata and a payment link, and the package contains billing-contract documentation that is broader than the report task. Only use it where the payment-link behavior is desired, and avoid rendering reports from untrusted task records in permissive Markdown viewers without sanitization.
scripts/notion_db_weekly_report_generator.py:59Unescaped Record Data Allows Markdown Content Injection
scripts/notion_db_weekly_report_generator.py:19Unencoded User Identifier Allows Payment URL Query Manipulation
This file documents a billing/charge workflow for a skill whose stated purpose is only weekly report generation, creating a strong capability-purpose mismatch. Even as reference documentation, it normalizes collection of payment data and top-up flows that are unrelated to the declared function, which can enable unauthorized charging logic, hidden monetization, or expansion into financial handling without clear user consent or architectural justification.
Including payment processing capability in a basic weekly report generator is dangerous because it introduces a sensitive financial action unrelated to the advertised task-processing role. In this context, the mismatch increases suspicion: users and reviewers would not expect charge endpoints, payment URLs, or balance handling in a report formatter, making hidden billing behavior easier to conceal and more damaging if activated.
Without declared permissions the skill's intent is opaque and cannot be validated.
The title and documented purpose indicate the skill is specifically a Chinese-language weekly report generator ("周报生成器"), but the file does not state that language selection is optional or limited for a justified regional/compliance reason. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
The skill generates payment URLs from untrusted environment configuration and injects monetization logic into a utility whose stated purpose is weekly report generation. This is dangerous because it can redirect users to arbitrary payment endpoints or enable deceptive upsell behavior unrelated to the core function, creating phishing and trust-boundary risks.
Multiple user-facing strings are fixed in Chinese, including default field values, report headings, and the premium-upgrade message. For a general-purpose weekly report generator, this forces a specific language without user opt-in, which matches the locale policy violation criteria.
The code always includes upgrade and payment details in normal successful output, despite the description claiming premium hooks are merely reserved. Exposing monetization metadata in routine responses increases the chance of covert solicitation, social engineering, or downstream UI components presenting unrequested payment prompts to users.
This code hard-codes Chinese titles, owner names, statuses, and later asserts a Chinese markdown heading, which indicates the skill behavior is expected to operate in a single language. For a non-region-specific skill, forcing one locale without opt-in can violate language/locale policy requirements.