Back to skill

Security audit

delete discord message in bulk

Security checks for vulnerabilities and agentic risk

Overview

The skill is built for Discord message cleanup, but it warrants Review because it combines privileged deletion authority with broad triggers, plaintext token guidance, and a packaged legacy script without a dry-run safeguard.

Install only if you are comfortable giving a Discord bot message-management permissions. Prefer DISCORD_TOKEN or a secret manager instead of token.json, never commit or share the token, run the active script in dry-run mode first, confirm the exact channel ID and count before using --delete, and remove or ignore the backup no-dry-run files.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/discord-purge-tool.py:47
Finding

Privileged Discord Bot Token Stored in a Plaintext Project File

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
backup/discord-purge-tool_no_dry-run.py:60
Finding

Packaged Backup Script Performs Destructive Deletion Without an Enforced Safety Gate

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad, everyday language such as "clear the chat" and "remove old messages," which can cause the skill to activate when the user did not explicitly intend to invoke a destructive bulk-deletion workflow. In this skill's context, unintended activation is more dangerous because the documented tool can permanently delete Discord messages, so misclassification can lead to accidental data loss or moderation actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger guidance is overly broad for a destructive action: common phrases like 'clean up', 'remove old messages', or 'clear the chat' can be ambiguous and may cause unintended invocation. In this skill's context, that ambiguity is more dangerous because the referenced tool performs real deletions, so accidental activation can immediately produce irreversible data loss.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This is a real safety flaw because the skill documents a destructive live-delete tool while relying only on the operator to manually ask for confirmation, with no documented built-in confirmation gate, preview, or dry-run mode. In an agentic context, broad triggering plus immediate execution can lead to irreversible deletion of large numbers of Discord messages from the wrong channel or based on an ambiguous request.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script performs an irreversible bulk deletion operation immediately after parsing arguments, with no confirmation prompt, no dry-run mode, and no explicit safeguard against accidental invocation. In a moderation/admin context, a mistyped channel ID or count can quickly destroy recent channel history, making this a real safety issue even though it is not a code-execution flaw.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

Stating that the skill will "auto-detect intent" without explicit user opt-in encourages the agent to interpret ambiguous requests as authorization to use a destructive moderation capability. In the context of a bulk message deletion skill, this increases the chance of unintended destructive actions, though the impact is partially reduced because the documentation also mentions asking for confirmation and using dry-run mode first.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.