Back to skill

Security audit

Gamification & XP System

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent gamification prompt interface, but it asks users to provide a highly privileged Supabase service-role key despite describing a separate backend API server.

Review this carefully before installing. Prefer a version that does not require a Supabase service-role key in the agent environment; that key should live only in the backend service. Also confirm leaderboard participation, visibility, and authorization rules before using it with multiple users.

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

Error
Location
SKILL.md:14
Finding
Excessive Supabase Service-Role Credential Requirement<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 14-21 **Vulnerability Type**: Excessive privileged credential exposure **Risk Level**: High ### Vulnerable Code ```yaml env: - name: SUPABASE_URL description: Supabase project URL for gamification data storage required: true - name: SUPABASE_SERVICE_KEY description: Supabase service role key for database access required: true ``` The documented architecture also states: ```text User → ClawdBot Gateway → ClawdBot API Server → Supabase (Postgres) (Railway) (user_gamification, xp_transactions tables) ``` ### Technical Analysis The skill requires a Supabase service-role key even though it is described as a prompt interface that communicates with a separate ClawdBot API server. Under this architecture, privileged database access should occur only within the trusted backend. Supabase service-role keys generally provide highly privileged database access and can bypass Row Level Security policies. Requiring this key in the skill or Agent environment violates least-privilege and secret-isolation principles. It unnecessarily makes a backend credential available within a broader runtime that may also process untrusted prompts or load unrelated tools and skills. No direct credential-reading or exfiltration code was present in the audited project. The vulnerability is the unnecessary placement requirement for a privileged credential, which creates an exploitable exposure boundary if another runtime component can inspect environment variables. ### Attack Path 1. An operator installs the skill and supplies the required `SUPABASE_SERVICE_KEY`. 2. The service-role key becomes available in the Agent or skill execution environment. 3. A compromised tool, malicious skill, prompt-injection-driven component, diagnostic process, or insecure logging mechanism accesses or discloses the environment variable. 4. The attacker uses the extracted servi ...[truncated 823 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `SUPABASE_SERVICE_KEY` from the skill's required environment variables. 2. Store the service-role key exclusively in the ClawdBot API server's managed secret store. 3. Ensure the client skill communicates only with authenticated, narrowly scoped backend API endpoints. 4. Use short-lived, user-scoped credentials where direct Supabase access is unavoidable, and enforce Row Level Security for all user-accessible tables. 5. Apply server-side authentication and authorization checks to every gamification endpoint, especially XP awards, badge awards, habit completion, and leaderboard access. 6. Prevent secrets from appearing in prompts, logs, error messages, telemetry, subprocess environments, or client configuration files. 7. Rotate any service-role key that has previously been distributed to an Agent or client runtime. 8. Audit Supabase access logs and database changes for unauthorized activity associated with previously exposed keys. ]]>
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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill advertises a multi-user leaderboard and comparative progress features without any visible warning about privacy implications, consent, or access controls. In a productivity context, exposing relative XP, streaks, or achievement status can reveal behavioral patterns and participation data about other users, especially if the leaderboard is accessible broadly.

Static analysis

No suspicious patterns detected.