Back to skill

Security audit

ai-quota-dashboard

Security checks for vulnerabilities and agentic risk

Overview

ClawScan’s verdict is benign with medium confidence: the scanners report mostly purpose-aligned activity, while noting that the skill handles credentials and uses environment, network, and shell capabilities; coverage was partial.

The verdict is benign, not risk-free. Before installing, consider that the skill handles access tokens and contacts provider APIs, and check whether you are comfortable granting its environment, network, and shell capabilities. The scan was partial: 7 of 8 components were scanned, and a static analysis pass on the dashboard template was limited, so the evidence is incomplete.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (16)

Tainted flow: 'req' from os.environ.get (line 101, credential/environment) → urllib.request.build_opener.open (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/quota_collector.py (reported line 107)May include surrounding context.

python
handlers.append(urllib.request.ProxyHandler({"http": proxy, "https": proxy}))
    opener = urllib.request.build_opener(*handlers)

    with opener.open(req, timeout=12) as resp:
        return json.loads(resp.read().decode("utf-8"))

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 79)May include surrounding context.

md
- Sequential proxy handshakes scale with pool size. Set daemon runner timeout (`subprocess.run(timeout=...)`) to at least **60–75s** (not 25s) to prevent SIGKILL interruptions mid-poll.

2. **Proactive Pre-emptive Token Refresh (Zero Flapping):**
   - Never wait for a provider to return `401 Unauthorized` before attempting a refresh. Check stored `expires` timestamps. If `now > expires - 300s`, proactively request a fresh access token via `refresh_token` and persist it to disk before querying quota endpoints.
   - **Disk-persistence tradeoff (disclosed):** refreshed OAuth tokens must survive between collector cycles, so they are persisted to the owner-only config file (`0600`, directory `0700`; the collector refuses world-readable stores). This is a deliberate durability-vs-blast-radius tradeoff: prefer short-lived, read-only/least-privilege tokens, keep the config out of backups/sync shares, and never store browser session cookies.

3. **Graceful Cache Fallback:**

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/security-cookie-guide.md (reported line 9)May include surrounding context.

md
## 1. Golden Rule: Standard API Credentials First

Always configure providers using official developer API keys or personal access tokens (e.g., OpenRouter `sk-or-...`, ElevenLabs `xi-api-key`, OpenAI `sk-...`, Anthropic `sk-ant-...`). 

**Security Notice:** Avoid using or extracting third-party browser session cookies. If monitoring a self-hosted platform (e.g., LiteLLM, LibreChat, OpenWebUI), generate a dedicated read-only service token or API key from that platform's administration panel.

Code capability 'env' detected in scripts/quota_collector.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Code capability 'network' detected in scripts/quota_collector.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Code capability 'shell' detected in scripts/quota_collector.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'shell' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · SKILL.md (reported line 12)May include surrounding context.

md
- https://api.elevenlabs.io (official subscription telemetry, domain-pinned)
    - user-configured self-hosted gateways (read-only service tokens; loopback/LAN endpoints)
  filesystem-access:
    - ~/.config/ai-quota-dashboard/ (owner-only 0700 dir / 0600 config; collector refuses world-readable files)
    - ~/.local/share/ai-quota-dashboard/cache.json (local telemetry cache, atomic owner-only 0600 write; symlink targets refused)
---

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · SKILL.md (reported line 32)May include surrounding context.

md
2. **Strict Filesystem Isolation (`[PE3]`):**
   - All credentials files must reside in dedicated directories with restrictive permissions (`chmod 700 ~/.config/ai-quota-dashboard` and `chmod 600 config.json`).
   - Collector scripts must audit permissions AND ownership on the opened file descriptor (fstat, bound to the read — no TOCTOU window) and refuse execution if files are world-readable or not owned by the current user.
   - Telemetry output is written atomically (temp + rename) with `0600` permissions; symlink output targets are refused.

3. **Strict Origin Domain Pinning (`[SQP-2]`, `[E1]`):**

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · SKILL.md (reported line 80)May include surrounding context.

md
h (Zero Flapping):**
   - Never wait for a provider to return `401 Unauthorized` before attempting a refresh. Check stored `expires` timestamps. If `now > expires - 300s`, proactively request a fresh access token via `refresh_token` and persist it to disk before querying quota endpoints.
   - **Disk-persistence tradeoff (disclosed):** refreshed OAuth tokens must survive between collector cycles, so they are persisted to the owner-only config file (`0600`, directory `0700`; the collector refuses world-readable stores). This is a deliberate durability-vs-blast-radius tradeoff: prefer short-lived, read-only/least-privilege tokens, keep the config out of backups/sync shares, and never store browser session cookies.

3. **Graceful Cache Fallback:**
   - Transient network timeouts (`URLError`, handshake lag, HTTP 502/503) must not wipe account telemetry or flag status as error. Retain the previous successful quota readings (`prev_cache`). An account is only truly in error if the token endpoi

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · references/security-cookie-guide.md (reported line 22)May include surrounding context.

md
*Mitigation:* Never pass tokens via CLI flags. Load tokens strictly from owner-restricted files or environment variables.

2. **Insecure Storage & Permissive Permissions (`[PE3]`):**
   Saving credentials in world-readable files allows unauthorized local processes to read secrets.
   *Mitigation:* All credential stores must reside under `~/.config/ai-quota-dashboard/` with mandatory file permissions `chmod 600` (read/write by owner only) and directory permissions `chmod 700`.

3. **Credential Egress & Unpinned Forwarding (`[SQP-2]`, `[E1]`):**

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/quota_collector.py (reported line 116)May include surrounding context.

python
SECURITY: the output path is configurable, so harden the write: refuse
    symlink targets (O_NOFOLLOW), create the temp file with 0600 in the same
    directory, then os.replace() atomically. No world-readable window exists.
    """
    out = Path(output_path).expanduser()
    if out.is_symlink():

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · SKILL.md (reported line 123)May include surrounding context.

md
## 6. Verification Checklist

- [ ] `config.json` has permissions `0600` (`ls -l ~/.config/ai-quota-dashboard/config.json`).
- [ ] No tokens or keys appear in `ps aux` or shell history.
- [ ] Provider endpoints match pinned domain verification checks.
- [ ] Dashboard is accessible via LAN IP, VPN, or reverse proxy.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/security-cookie-guide.md (reported line 36)May include surrounding context.

Safe Initialization

bash
# 1. Create isolated configuration directory
mkdir -p ~/.config/ai-quota-dashboard
chmod 700 ~/.config/ai-quota-dashboard

# 2. Write configuration with restricted permissions

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api-reverse-engineering.md (reported line 11)May include surrounding context.

md
1. **Official Developer APIs (Recommended):**
   - **OpenRouter:** `GET https://openrouter.ai/api/v1/credits` or `/auth/key` using `Authorization: Bearer <key>`. Returns `total_credits`, `total_usage`, `limit_remaining`.
   - **ElevenLabs:** `GET https://api.elevenlabs.io/v1/user/subscription` using `xi-api-key: <key>`. Returns `character_count`, `character_limit`, `next_character_count_reset_unix`.
   - **OpenAI / Anthropic:** Usage and balance endpoints queried with developer API keys.

2. **Self-Hosted AI Gateways & Local Servers:**

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/quota_collector.py (reported line 164)May include surrounding context.

python
key = config.get("api_key")
    if not key:
        return []
    url = "https://api.elevenlabs.io/v1/user/subscription"
    pinned = "api.elevenlabs.io"
    try:
        data = safe_https_get(url, {"xi-api-key": key}, pinned, proxy)

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.