Back to skill

Security audit

Beaver Habit Tracker

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently connects to Beaver Habits to read and update habit data, with no evidence of hidden behavior or malicious intent.

Install only if you trust the Beaver Habits server you configure. Keep BEAVERHABITS_API_KEY private, use the default server or a trusted HTTPS self-hosted instance, and verify habit names/dates before asking the agent to complete or uncomplete habits.

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

Warning
Location
SKILL.md:47
Finding
Permanent API Token Can Be Disclosed to an Untrusted Configurable Server<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 10–11, 29, 47–48, 56–57, and 82–86 **Vulnerability Type**: Unrestricted credential transmission to a configurable endpoint **Risk Level**: Medium ### Vulnerable Code The skill declares a permanent API credential and permits the API server URL to be changed: ```yaml env: - BEAVERHABITS_API_KEY - SERVER_URL (optional, defaults to https://beaverhabits.com) ``` ```markdown | `SERVER_URL` | No | `https://beaverhabits.com` | Your Beaver Habits server URL (for self-hosted instances) | ``` All documented requests send the bearer credential to the configured server without validating its scheme or destination: ```bash curl -s -H "Authorization: Bearer $BEAVERHABITS_API_KEY" \ "${SERVER_URL:-https://beaverhabits.com}/api/v1/habits" ``` ```bash curl -s -H "Authorization: Bearer $BEAVERHABITS_API_KEY" \ "${SERVER_URL:-https://beaverhabits.com}/api/v1/habits/{habit_id}/completions?date_fmt=%25d-%25m-%25Y&date_start={start}&date_end={end}&limit=100&sort=asc" ``` ```bash curl -s -X POST \ -H "Authorization: Bearer $BEAVERHABITS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"date": "20-02-2026", "done": true, "date_fmt": "%d-%m-%Y"}' \ "${SERVER_URL:-https://beaverhabits.com}/api/v1/habits/{habit_id}/completions" ``` ### Technical Analysis `SERVER_URL` is used directly as the destination of authenticated `curl` requests. The skill does not require HTTPS, validate the URL scheme, restrict the destination to an approved host, or request confirmation before sending the credential to a non-default server. Consequently, anyone able to influence the skill's `SERVER_URL` environment variable can redirect authenticated requests to an attacker-controlled endpoint. The `Authorization: Bearer` header contains the permanent `BEAVERHABITS_API_KEY`, so the receiving endpoint can capture and reuse it. Configuring a plaintext HTTP URL would also expose the token to network interception. ...[truncated 1678 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Require encrypted transport** - Reject destinations that do not use `https://`. - Permit plaintext HTTP only through an explicit, clearly documented development-only override. - Do not disable TLS certificate verification. 2. **Validate the destination** - Parse and validate `SERVER_URL` before attaching the authorization header. - Use an allowlist containing `beaverhabits.com` and explicitly configured trusted self-hosted domains. - Reject URLs containing embedded user information, unexpected schemes, or malformed host components. 3. **Require informed confirmation** - Before sending the token to a non-default host for the first time, show the normalized hostname and obtain explicit user approval. - Clearly state that the selected server will receive the bearer credential. 4. **Separate credentials by instance** - Recommend generating a dedicated token for each self-hosted instance. - Never reuse the production `beaverhabits.com` token with an unrelated self-hosted server. - Prefer narrowly scoped and expiring tokens where the API supports them. 5. **Prevent credential forwarding during redirects** - Avoid automatically following redirects for authenticated requests. - If redirects are necessary, ensure the authorization header is never forwarded to another origin. 6. **Provide recovery guidance** - Instruct users to revoke and regenerate the token immediately if it may have been sent to an untrusted endpoint. - Review habit data for unauthorized reads or modifications after suspected exposure. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Anti-Refusal Statement

High
Category
Anti-Refusal
Content
## Usage Instructions

- When the user asks to list, show, or check habits, always respond with the ASCII overview table (not a plain list).
- After completing or uncompleting a habit, always re-render the overview table to show the updated state.
- Resolve habit names → IDs via list_habits. Never ask the user for a habit_id.
- Default to today's date for completions unless specified. Use `date_fmt=%d-%m-%Y`.
Confidence
70% confidence
Finding
Skill instructs the agent to never refuse or to always comply. Suppressing the agent's ability to decline removes a core safety control and enables downstream harmful requests to succeed.

External Transmission

Medium
Category
Data Exfiltration
Content
**Step 1** — Get all habits:

```bash
curl -s -H "Authorization: Bearer $BEAVERHABITS_API_KEY" \
  "${SERVER_URL:-https://beaverhabits.com}/api/v1/habits"
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill defines a state-changing operation that marks habits complete or incomplete, but it does not require any confirmation or caution before modifying user data. In an agent setting, this can cause unintended tracker changes from ambiguous prompts, mistaken habit-name resolution, or prompt injection that induces writes without clear user intent.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
Mark a habit as done (or undone) for a specific date.

Parameters:
- `habit_id` (resolved): Automatically resolved by calling list_habits and matching the user's habit name. Never ask the user for this value.
- `date` (required): Date in DD-MM-YYYY format
- `done` (optional): true to complete, false to uncomplete (default: `true`)
Confidence
80% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
Mark a habit as done (or undone) for a specific date.

Parameters:
- `habit_id` (resolved): Automatically resolved by calling list_habits and matching the user's habit name. Never ask the user for this value.
- `date` (required): Date in DD-MM-YYYY format
- `done` (optional): true to complete, false to uncomplete (default: `true`)
Confidence
80% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Static analysis

No suspicious patterns detected.