Back to skill

Security audit

Paper Report Delivery

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its report-delivery purpose, but its image embedding code can read arbitrary local files and include them in reports that may be sent to Telegram.

Install only if you are comfortable with a Telegram delivery workflow and local report archives. Before use, restrict image metadata to a trusted image directory, reject absolute paths and traversal, enforce image type and size checks, and explicitly set and verify the Telegram destination.

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
scripts/build_readable_html.py:53
Finding

Arbitrary Local File Disclosure Through Unrestricted Image Embedding

Content
View full analysis
Remediation
View remediation
Path | None: if not path_str: return None supplied = Path(path_str) if supplied.is_absolute(): return None candidate = (IMAGE_DIR / supplied).resolve() try: candidate.relative_to(IMAGE_DIR) except ValueError: return None if not candidate.is_file(): return None return candidate ``` 2. **Prevent symlink-based escapes** - Perform containment checks after `resolve()`. - Consider rejecting symlinks entirely if they are not required by the workflow. - Revalidate the opened file where race-resistant filesystem APIs are available. 3. **Verify actual image content** - Do not rely solely on file extensions or MIME guesses. - Open the candidate with Pillow and call `verify()`. - Allowlist only formats required by the report, such as PNG, JPEG, GIF, and WebP. - Reject unknown content instead of embedding it as `application/octet-stream`. 4. **Enforce strict size and dimension limits** - Check `stat().st_size` before reading. - Reject files larger than a documented maximum. - Limit decoded image dimensions to mitigate decompression bombs. - Configure Pillow's decompression-bomb protections rather than disabling them. 5. **Reduce exposure in intermediate artifacts** - Avoid storing embedded image bytes in the readable JSON unless required. - Store only validated relative image references in intermediate metadata. - Generate the final Base64 representation only after all ...[truncated 650 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs use of local scripts, file operations, environment access, and shell-capable workflow steps, but it does not declare any explicit tool scope or permissions boundary. In an agent environment, this increases the chance of overbroad execution, unintended file/system access, or use of sensitive environment data because the runtime is not constrained to the minimum required capabilities.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description says the pipeline 'generates Chinese summaries,' which imposes a specific language requirement in natural language. The file does not mention user opt-in, language selection, or a region-specific justification for forcing Chinese output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file explicitly requires the pipeline to generate Chinese report content, which is a language-specific constraint. Because the document does not offer a language choice, opt-in, or state that this is a justified region-specific workflow, it appears to violate the language/locale policy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file states that outputs will be archived locally and delivered to Telegram, which can affect user data privacy and transmit content to an external service. Under the markdown-specific SQP-2 criteria, the description should warn users about these behaviors, but no such warning appears in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python file contains multiple hard-coded Chinese summaries and sets the HTML document language to zh-CN, indicating the skill forces a specific language/locale in its generated output. The file does not offer any user opt-in or configuration for language selection, and no region-specific justification is documented here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The generated message format hard-codes Chinese labels and explicitly emits a Chinese summary field, which indicates the skill is designed to produce output in a single language. The header text also states that abstracts are translated into Chinese, but there is no user opt-in, alternative locale support, or documented region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The header string states that paper entries use Chinese translations closer to the original abstract, which establishes a fixed language policy in natural-language content. Because the file provides no mechanism for user choice or opt-in, this conflicts with the requirement to avoid forcing a specific language unless clearly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script sends report contents and HTML attachments to a Telegram destination taken from the TELEGRAM_TARGET environment variable, with a permissive default placeholder and no validation, confirmation, or disclosure. In a delivery pipeline handling generated reports, this creates a real risk of unintended exfiltration or misdelivery if the environment is misconfigured or maliciously influenced.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/send_html_then_fallback.py (reported line 31)May include surrounding context.

python
cmd = [str(RETRY_SCRIPT), target, message]
    if media:
        cmd.append(str(media))
    return subprocess.run(cmd, text=True, capture_output=True)


def send_messages_fallback():

Static analysis

No suspicious patterns detected.