Back to skill

Security audit

Breweries

Security checks for vulnerabilities and agentic risk

Overview

This brewery lookup skill has a coherent purpose, but its install instructions ask users to clone and run executable code that is not included in the reviewed artifact.

Review this before installing. The brewery lookup idea is straightforward, but only the documentation was present here; the executable code users are told to run would come from a live GitHub clone. Install only from a pinned, reviewed commit or a package that includes the scripts and verifies their integrity.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
README.md:5
Finding
Unpinned Remote Payload Retrieval and Execution<![CDATA[ ## Vulnerability Details **File Location**: `README.md:5-12`; execution guidance in `SKILL.md:66-74` **Vulnerability Type**: Mutable external code is downloaded and executed without integrity verification **Risk Level**: High ### Vulnerable Code `README.md:5-12`: ```bash ## Installation ```bash # Clone to your skills directory git clone https://github.com/jeffaf/breweries-skill.git ~/clawd/skills/breweries # Make executable chmod +x ~/clawd/skills/breweries/breweries chmod +x ~/clawd/skills/breweries/scripts/breweries ``` `SKILL.md:66-74`: ```markdown ## Agent Implementation Notes **Script location:** `{skill_folder}/breweries` (wrapper) → `scripts/breweries` **When user asks about breweries:** 1. Run `./breweries search "name"` to find by name 2. Run `./breweries city "city"` for location-based search 3. Run `./breweries state "state"` for state-wide search 4. Run `./breweries type brewpub` for specific types ``` ### Technical Analysis The installation instructions clone a mutable external Git repository without pinning a reviewed commit, verifying a cryptographic checksum, or validating a release signature. They then make the downloaded scripts executable. The skill instructions subsequently direct the agent to invoke those scripts. Only `README.md` and `SKILL.md` are present in the audited artifact. The referenced `breweries` wrapper and `scripts/breweries` implementation are absent, so their behavior cannot be reviewed or shown to be limited to brewery API queries. Because the repository's default branch can change after this artifact is reviewed, the effective executable payload can also change without modifying the audited files. ### Attack Path 1. An attacker compromises the referenced GitHub account or repository, or otherwise gains permission to modify its default branch. 2. The attacker replaces or modifies `breweries` or `scripts/breweries` with a malicious payload. 3. A user follows the documented installation command and clon ...[truncated 934 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Include the complete `breweries` wrapper and `scripts/breweries` implementation in the audited skill package. 2. Pin installation to a specific reviewed commit hash or immutable, versioned release rather than cloning a mutable default branch. 3. Publish and verify a cryptographic SHA-256 or stronger checksum before making downloaded files executable. 4. Prefer signed releases or signed Git commits/tags, and document signature verification steps. 5. Fail closed if the expected commit, signature, or checksum does not match. 6. Review the included scripts for command injection, unsafe shell expansion, unexpected filesystem access, credential access, and undeclared network destinations. 7. Run the skill with least privilege and restrict its network access to the documented Open Brewery DB endpoint where the execution environment supports such controls. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

External Transmission

Medium
Category
Data Exfiltration
Content
## API

Uses [Open Brewery DB API v1](https://api.openbrewerydb.org/v1/breweries). No authentication required.

## License
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The instruction 'When user asks about breweries' plus the listed common patterns describes activation in a broad natural-language way, but does not define clear constraints or exclusions beyond a short 'Don't use for' list. Phrases like 'What breweries are in [state]?' and 'Where can I get craft beer in [city]?' overlap with ordinary conversation, which could cause unintended invocation in general chat contexts.

Static analysis

No suspicious patterns detected.