Back to skill

Security audit

AI Quota Dashboard

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed AI quota dashboard that handles user-provided API credentials, with sensitive but purpose-aligned behavior and no artifact-backed deception or exfiltration.

Install only if you are comfortable storing AI provider API keys or refreshed tokens under a local config directory. Prefer read-only service tokens, keep the config file owner-only, avoid browser session cookies, and do not expose the dashboard through port forwarding or a tunnel unless you add authentication and understand what account telemetry it reveals.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (35)

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The skill's declared purpose and the documented behavior do not fully align: it references cookies and broad multi-provider support while the visible content emphasizes token files, refresh flows, and a narrower set of operational details. Security reviewers may approve the skill under incomplete assumptions, which is dangerous when the skill handles credentials and network requests.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
74% confidence
Finding

The skill explicitly instructs persisting refreshed access tokens to disk, creating a durable credential store. Even though surrounding text recommends restrictive permissions, disk persistence materially increases the blast radius of local compromise, backup leakage, accidental sync, or insecure file handling elsewhere in the system.

Content

Scanner excerpt · SKILL.md (reported line 67)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.

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 endpoint returns an unrecoverable revocation (`invalid_grant`) or credentials are missing.

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · references/networking-deployment.md (reported line 101)May include surrounding context.

Step 3: Enable Site & Issue Free SSL via Certbot

bash
sudo ln -s /etc/nginx/sites-available/quota-dashboard /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d quota.mydomain.com

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.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · templates/dashboard.html (reported line 72)May include surrounding context.

html
</style>
</head>
<body class="p-4 md:p-8 max-w-6xl mx-auto">
  <!-- Header -->
  <div class="flex flex-wrap items-center justify-between mb-8 pb-4 border-b border-gray-800 gap-4">
    <div>
      <h1 class="text-2xl md:text-3xl font-extrabold text-white flex items-center gap-3">

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill describes behavior that implies access to environment variables, local files, networking, and shell-like operations, but it does not declare any explicit tool scope or permissions. In an agent ecosystem, this weakens review and containment because operators cannot easily verify what the skill is expected to access, increasing the risk of over-privileged execution and accidental credential exposure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description includes Russian phrases alongside English, which imposes multilingual output/metadata behavior without any stated user opt-in or justification. Under the policy, language or locale constraints should either be optional for the user or clearly documented as region-specific.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
- Credentials must be read strictly from isolated configuration files or environment variables.

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 refuse execution if files are world-readable.

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

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
- Credentials must be read strictly from isolated configuration files or environment variables.

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 refuse execution if files are world-readable.

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

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
- Credentials must be read strictly from isolated configuration files or environment variables.

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 refuse execution if files are world-readable.

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

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
- Credentials must be read strictly from isolated configuration files or environment variables.

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 refuse execution if files are world-readable.

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

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
- Credentials must be read strictly from isolated configuration files or environment variables.

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 refuse execution if files are world-readable.

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

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

python
- Credentials must be read strictly from isolated configuration files or environment variables.

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 refuse execution if files are world-readable.

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

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 110)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.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/networking-deployment.md (reported line 21)May include surrounding context.

Prevent unauthorized external connections while allowing local devices:

bash
# Allow connections strictly from your home subnet (e.g., 192.168.1.0/24)
sudo ufw allow from 192.168.1.0/24 to any port 8885 proto tcp
sudo ufw status

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/networking-deployment.md (reported line 22)May include surrounding context.

Prevent unauthorized external connections while allowing local devices:

bash
# Allow connections strictly from your home subnet (e.g., 192.168.1.0/24)
sudo ufw allow from 192.168.1.0/24 to any port 8885 proto tcp
sudo ufw status

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/networking-deployment.md (reported line 40)May include surrounding context.

Prevent unauthorized external connections while allowing local devices:

bash
# Allow connections strictly from your home subnet (e.g., 192.168.1.0/24)
sudo ufw allow from 192.168.1.0/24 to any port 8885 proto tcp
sudo ufw status

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/networking-deployment.md (reported line 95)May include surrounding context.

Prevent unauthorized external connections while allowing local devices:

bash
# Allow connections strictly from your home subnet (e.g., 192.168.1.0/24)
sudo ufw allow from 192.168.1.0/24 to any port 8885 proto tcp
sudo ufw status

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/networking-deployment.md (reported line 100)May include surrounding context.

Prevent unauthorized external connections while allowing local devices:

bash
# Allow connections strictly from your home subnet (e.g., 192.168.1.0/24)
sudo ufw allow from 192.168.1.0/24 to any port 8885 proto tcp
sudo ufw status

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/networking-deployment.md (reported line 101)May include surrounding context.

Prevent unauthorized external connections while allowing local devices:

bash
# Allow connections strictly from your home subnet (e.g., 192.168.1.0/24)
sudo ufw allow from 192.168.1.0/24 to any port 8885 proto tcp
sudo ufw status

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/networking-deployment.md (reported line 102)May include surrounding context.

Prevent unauthorized external connections while allowing local devices:

bash
# Allow connections strictly from your home subnet (e.g., 192.168.1.0/24)
sudo ufw allow from 192.168.1.0/24 to any port 8885 proto tcp
sudo ufw status

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The guide instructs users to download and install a network tunneling binary from the internet and then expose a local service through a third-party tunnel. While presented as a convenience feature, this creates external transmission and broadens exposure of what is described elsewhere as a dashboard containing quotas, subscriptions, and cookies, which may lead to unintended data disclosure if the service is weakly protected.

Content

Scanner excerpt · references/networking-deployment.md (reported line 56)May include surrounding context.

Option B3: Free Cloudflare Tunnel (Works behind CGNAT / Gray IP)

  1. Install cloudflared:
    bash
    curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb
    sudo dpkg -i cloudflared.deb
    
  2. Run an instant ad-hoc tunnel:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
76% confidence
Finding

Installing a downloaded .deb with sudo grants root-level execution to externally sourced software. In a documentation context this is often legitimate, but it becomes security-relevant here because the package is fetched directly from the internet and is immediately used to expose a local dashboard through a tunnel.

Content

Scanner excerpt · references/networking-deployment.md (reported line 57)May include surrounding context.

  1. Install cloudflared:
    bash
    curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb
    sudo dpkg -i cloudflared.deb
    
  2. Run an instant ad-hoc tunnel:
    bash

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/networking-deployment.md (reported line 95)May include surrounding context.

bash
# Generate htpasswd file:
htpasswd -c /etc/nginx/.htpasswd_quota admin
sudo chmod 640 /etc/nginx/.htpasswd_quota

Step 3: Enable Site & Issue Free SSL via Certbot

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 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]`):**

Static analysis

Detected: suspicious.install_untrusted_source

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
config.example.json:2