Back to skill

Security audit

Supabase Manager

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real Supabase helper, but it needs review because it can change remote database data through broad, under-validated shell commands and has unclear local credential/config guidance.

Install only if you are comfortable with an agent using your Supabase anon key to read and modify project data through RLS. Confirm the exact Supabase URL before use, never provide a service-role key, treat INSERT and RPC as state-changing operations that should get explicit approval, and avoid storing keys locally unless a secure credential store is used.

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

Error
Location
SKILL.md:52
Finding
Shell Command Injection Through Unsanitized Supabase Request Parameters<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:52-81`, `SKILL.md:120-123`, and `SKILL.md:129-133` **Vulnerability Type**: Shell command injection and unsafe construction of HTTP requests **Risk Level**: High ### Vulnerable Code ```bash curl -s "[URL]/rest/v1/[table]?select=*&[filters]" \ -H "apikey: [KEY]" \ -H "Authorization: Bearer [KEY]" ``` ```bash curl -s -X POST "[URL]/rest/v1/[table]" \ -H "apikey: [KEY]" \ -H "Authorization: Bearer [KEY]" \ -H "Content-Type: application/json" \ -d '[JSON]' ``` ```bash curl -s -X PATCH "[URL]/rest/v1/[table]?[filter]" \ -H "apikey: [KEY]" \ -H "Authorization: Bearer [KEY]" \ -H "Content-Type: application/json" \ -H "Prefer: return=representation" \ -d '[JSON]' ``` ```bash curl -s -X DELETE "[URL]/rest/v1/[table]?[filter]" \ -H "apikey: [KEY]" \ -H "Authorization: Bearer [KEY]" ``` The skill also instructs the agent to construct these values directly: ```text Parse the user's data, construct JSON, POST it. ``` ```text Construct the filter, confirm with user before executing: "This will delete rows from [table] where [condition]. Proceed? (y/n)" ``` The RPC command uses another dynamically selected path and JSON body: ```bash curl -s -X POST "[URL]/rest/v1/rpc/[function_name]" \ -H "apikey: [ANON_KEY]" \ -H "Authorization: Bearer [ANON_KEY]" \ -H "Content-Type: application/json" \ -d '{"param": "value"}' ``` ### Technical Analysis The skill requires user-controlled project URLs, table names, filters, RPC function names, and JSON values to be substituted into shell command templates. It does not require strict validation, URL encoding, JSON-safe serialization, or shell-safe argument handling. Values inserted into double-quoted shell strings can introduce command substitutions such as `$(command)` or backtick expressions if the agent generates and executes the resulting command as shell source. Values inserted into the single-quoted `-d '[JSON]'` body can termina ...[truncated 2300 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Avoid generating executable shell command strings from user input. Use a structured HTTP client that accepts the URL, path, query parameters, headers, and JSON body as separate values. 2. If `curl` must be used: - Pass dynamic values through positional parameters rather than interpolating them into shell source. - Use `curl --get --data-urlencode` for query parameters. - Percent-encode each dynamic path component. - Generate JSON with a serializer such as `jq --arg` or `jq --argjson`; never concatenate JSON into shell-quoted text. - Disable interpretation of user input as shell syntax. 3. Validate identifiers with strict allowlists. For example, table, column, and RPC names should match an approved pattern such as `^[A-Za-z_][A-Za-z0-9_]*$` and, where possible, be checked against known schema objects. 4. Validate `SUPABASE_URL` before attaching credentials: - Require HTTPS. - Reject embedded credentials, fragments, control characters, and unexpected ports. - Restrict the hostname to the user's explicitly approved Supabase origin, such as the expected `*.supabase.co` project hostname or a separately confirmed custom domain. - Do not follow redirects to a different origin while retaining authorization headers. 5. Parse filters into a structured representation and allow only supported PostgREST operators. Encode column names and values independently instead of accepting a raw filter string. 6. Retain confirmation for destructive UPDATE and DELETE operations, but display the normalized destination, table, filter, and affected operation after validation. Confirmation must supplement rather than replace input sanitization. 7. Add explicit instructions prohibiting execution when any dynamic value cannot be safely validated or encoded. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger list includes broad terms like 'database', 'insert into', and 'delete from', which can cause the skill to activate in unrelated contexts and handle sensitive data or perform unintended operations. In a skill capable of querying and mutating remote data stores, over-broad invocation materially raises the risk of accidental external actions.

External Transmission

Medium
Category
Data Exfiltration
Content
### Query (SELECT)
```bash
curl -s "[URL]/rest/v1/[table]?select=*&[filters]" \
  -H "apikey: [KEY]" \
  -H "Authorization: Bearer [KEY]"
```
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
84% confidence
Finding
The skill provides direct insert and RPC guidance without parallel, explicit safety language requiring user confirmation and disclosure that data will be transmitted to an external service. While DELETE and UPDATE are later called out for confirmation, INSERT and RPC can also change state or invoke sensitive server-side behavior and should be guarded similarly.

External Transmission

Medium
Category
Data Exfiltration
Content
### "Count [table]"
```bash
curl -s "[URL]/rest/v1/[table]?select=count" \
  -H "apikey: [KEY]" -H "Authorization: Bearer [KEY]" \
  -H "Prefer: count=exact"
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
The skill explicitly says credentials are provided at runtime and not stored, but later instructs to store config locally, which can reasonably include the Supabase URL and anon key. Even though the anon key is lower sensitivity than a service-role key, persisting credentials locally increases the chance of accidental disclosure through shell history, dotfiles, backups, or multi-user systems.

Static analysis

No suspicious patterns detected.