Back to skill

Security audit

Banking Brief

Security checks for vulnerabilities and agentic risk

Overview

The skill appears purpose-built for Telegram-based banking brief PDFs, but it needs Review because sensitive inputs are handled with weak privacy, access-control, PDF-sanitization, and temporary-file safeguards.

Install only in a controlled environment. Restrict who can message the bot, avoid sending customer or regulated nonpublic data through Telegram unless approved, escape or validate all text before PDF generation, use secure temporary files with cleanup, and pin dependencies in a virtual environment or container.

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
generate_brief.py:483
Finding

Untrusted Telegram Content Is Parsed as ReportLab Markup

Content
View full analysis
10: # Dividir en bullets si hay saltos de línea o puntos lineas = [l.strip() for l in contexto_mercado.split("\n") if l.strip()] if len(lineas) == 1: # Párrafo único story.append(Paragraph(contexto_mercado.strip(), s["cuerpo"])) else: story.append(Paragraph( "A continuación se sintetizan los elementos de contexto reportados " "y su implicación para el perfil de riesgo institucional:", s["cuerpo"] )) for linea in lineas: story.append(Paragraph(f"▸ {linea}", s["bullet"])) ``` ### Technical Analysis The market context originates from a Telegram message and is passed directly to ReportLab's `Paragraph` parser. `Paragraph` does not treat its input as plain text; it interprets supported XML-like markup. Because the application does not escape or validate the supplied content, an attacker can submit markup containing supported resource-bearing elements, such as image references. Depending on the installed ReportLab version and resource handler behavior, this can make the server attempt to resolve an attacker-selected URL or local resource during PDF generation. Malformed or excessively complex markup can also trigger parser exceptions or consume generation resources, resulting in denial of service for individual requests. The bot has no user allowlist, so any Telegram user able to reach it can attempt this attack. ### Attack Path 1. An attacker discovers or obtains access to the Telegram bot. 2. The attacker starts the workflow with `/brief`. 3. The attacker submits at least one valid indicator. 4. For the market context, the attacker supplies crafted ReportLab markup containing a ...[truncated 1118 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
telegram_handler.py:127
Finding

Predictable PDF Files Are Written to a Shared Temporary Directory

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:31
Finding

Runtime Dependencies Are Installed Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill declares access to an environment secret (TELEGRAM_BOT_TOKEN) but does not define any explicit tool scope or permission boundaries. This weakens least-privilege controls and can allow future code in the skill to access or misuse the bot token without a clearly declared execution policy, which is especially sensitive because Telegram bots can receive external input and send outbound messages.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file includes natural-language metadata that explicitly scopes the skill to Mexico and presents all generated content in Spanish, such as the title and section labels. Under the policy rule for language/locale, forcing a specific language or locale without user opt-in is a violation unless the constraint is clearly documented and justified as region-specific compliance tooling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

All user-facing instructions, commands, and status messages are written exclusively in Spanish, and the skill does not offer an opt-in language choice. Under the policy, forcing a specific language without user choice or an explicitly documented justified locale constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The bot explicitly solicits CNBV indicators and market context through Telegram, which sends the data through Telegram infrastructure and the bot backend, yet the user-facing prompt does not disclose that this channel is a third-party service or warn against sharing confidential supervisory or institution-specific information. In a banking risk committee context, these inputs may contain sensitive nonpublic financial or regulatory data, so the lack of notice and consent increases privacy, confidentiality, and compliance risk.

Content

No source excerpt is available for this finding.