Back to skill

Security audit

Coffee Debugger

Security checks for vulnerabilities and agentic risk

Overview

This coffee recommendation skill is not malicious, but it asks for broad Read and Bash authority for a very narrow task that only appears to need the current time.

Review this before installing because a simple coffee-advice skill should not need broad shell and file-read permissions. Prefer a version that removes Read and replaces Bash with a narrow time source or fixed allowlisted date command.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:7
Finding

Overly Broad Shell Permission for Time Retrieval

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:7 and SKILL.md:38
Vulnerability Type: Excessive tool permissions and violation of least privilege
Risk Level: Medium

Complete Vulnerable Code Snippet:

yaml
allowed-tools: Read Bash

The shell capability is used only for the following time lookup:

markdown
!`date +%H:%M`

Technical Analysis

The skill grants unrestricted access to the Bash tool even though its documented workflow only needs to obtain the current local time. A general-purpose shell can execute arbitrary commands with the permissions of the account running the agent, including reading files, invoking installed programs, modifying writable data, and initiating network operations when supporting utilities and network access are available.

The declared Read permission also has no demonstrated need in the coffee-recommendation workflow. Granting these capabilities increases the consequences of prompt injection, conflicting instructions, or erroneous tool selection. The issue is a least-privilege violation rather than evidence that the skill currently executes malicious commands.

Attack Path

  1. A user invokes the skill, making the declared Bash capability available to the agent.
  2. Attacker-controlled content or conflicting conversational instructions attempt to influence the agent's tool use.
  3. Instead of limiting execution to the intended date +%H:%M command, the agent is induced to run another shell command.
  4. The command executes with the operating-system permissions and environmental access of the agent process.
  5. Files, credentials exposed to the process, or other writable resources may be accessed or modified within that security context.

Exploitation depends on the host granting the declared tool permission and on malicious or erroneous instructions successfully influencing tool invocation.

Impact Assessment

A successful exploitation a ...[truncated 576 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove Read because the documented recommendation workflow does not require access to project or user files.
  2. Replace unrestricted Bash access with a dedicated trusted time API or runtime-provided timestamp.
  3. If shell execution is unavoidable, expose a fixed wrapper that runs only date +%H:%M and accepts no user-controlled command, arguments, environment variables, paths, or substitutions.
  4. Apply runtime command allowlisting and require explicit approval for commands outside the fixed time lookup.
  5. Run the skill in a sandbox with minimal file-system access, no unnecessary credentials, restricted environment variables, and denied network access.
  6. Update the tool declaration to the narrowest capability supported by the host platform and test that coffee recommendations continue to work without general-purpose shell or file-reading permissions.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (4)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README includes very broad natural-language trigger examples such as feeling tired or needing coffee advice, which can cause the skill to activate unintentionally during ordinary conversation. In an agent environment, overbroad triggers increase the chance of surprise invocation, unnecessary context collection, or workflow disruption even though the skill itself is low-risk in subject matter.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill description and operating instructions are entirely in Chinese and present the skill behavior as Chinese-first without any opt-in or alternative language handling. This can violate language/locale policy expectations when users have not requested Chinese or been given a choice.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The auto-trigger condition is broad enough to activate on ordinary mentions of coffee, tiredness, or needing a pick-me-up, which can cause unintended skill invocation. While not directly enabling code execution or data exfiltration, it can override user intent, create prompt-routing confusion, and increase the chance that the agent responds with skill-specific behavior when the user did not explicitly ask for it.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

All user-facing instructions and examples in the README are presented only in Chinese, and there is no indication that the skill supports other languages or that Chinese is a justified locale-specific requirement. This can constitute a language/locale policy issue because the skill implicitly fixes the interaction language without user opt-in.

Content

No source excerpt is available for this finding.