Back to skill

Security audit

Telegram Marketing Audit Adarsh

Security checks for vulnerabilities and agentic risk

Overview

This skill is a simple Telegram command wrapper for a marketing audit, with a small documentation and error-message hygiene issue but no evidence of hidden or malicious behavior.

Before installing, confirm who can invoke the Telegram command, configure only the downstream collector API keys actually needed, and replace raw error replies with a generic failure message plus private logging.

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

Note
Location
SKILL.md:33
Finding
Unfiltered Internal Error Disclosure to Telegram Users## Vulnerability Details **File Location**: `SKILL.md`, lines 33-35 **Vulnerability Type**: Information disclosure through verbose error handling **Risk Level**: Low **Vulnerable Code**: ```javascript } catch (err) { await context.reply("Error during marketing audit: " + err.message); } ``` ### Technical Analysis The handler directly concatenates the exception message from the downstream `marketing-orchestrator` skill into a Telegram response. Exception messages are intended for diagnostics and may contain internal service names, filesystem paths, request details, collector or API responses, and other operational information. Because the error is returned without filtering or mapping it to a safe user-facing message, any Telegram user permitted to invoke this command may receive internal diagnostic details when an input or downstream condition causes an exception. The reviewed code does not establish that secrets are necessarily present in these messages, so direct credential disclosure is not confirmed. ### Attack Path 1. An attacker with access to the `/marketing_audit` command submits malformed, edge-case, or failure-inducing values for `instagramHandle` or `websiteDomain`. 2. The handler passes those values to `marketing-orchestrator`. 3. The orchestrator or one of its collectors throws an exception containing diagnostic details. 4. The `catch` block reads the exception's `message` property without sanitization. 5. The complete message is sent to the attacker through Telegram. 6. The attacker may repeat the process with different inputs to collect operational information for reconnaissance. ### Impact Assessment Successful exploitation is limited to information exposed by downstream exception messages. A user may learn internal implementation details, service identifiers, filesystem paths, request information, or third-party API error content. This can facilitate reconnaissance and help refine later attacks, b ...[truncated 134 chars]
Remediation
## Remediation Suggestions Return a generic error to Telegram users and send detailed exception information only to an access-controlled logging system: ```javascript } catch (err) { context.logger?.error({ err }, "Marketing audit failed"); await context.reply("The marketing audit failed. Please try again later."); } ``` Additionally: - Avoid including raw exception messages, stack traces, API responses, paths, or request details in user-facing replies. - Assign a non-sensitive correlation identifier to each failure so operators can locate the corresponding server-side log entry. - Configure production logging to redact API keys, authorization headers, tokens, cookies, and user-supplied sensitive data. - Validate and normalize `instagramHandle` and `websiteDomain` before forwarding them to the orchestrator to reduce avoidable downstream failures. - Restrict command access where appropriate and apply rate limits to make repeated error probing more difficult.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (1)

Context-Inappropriate Capability

Low
Confidence
80% confidence
Finding
The documented purpose is narrowly scoped to handling a Telegram command, invoking the marketing orchestrator, and sending back the final report. Mentioning collector API-key environment variables suggests credential-dependent collection capability that is not part of this handler code's stated role and is instead attributable to other skills/components.

Static analysis

No suspicious patterns detected.