Back to skill

Security audit

Supabase Tool

Security checks for vulnerabilities and agentic risk

Overview

This Supabase helper is transparent about its purpose, but it needs review because it generates copy-and-run shell commands for raw SQL and database writes without safe input quoting.

Review this skill before installing. Use it only with Supabase projects you control, inspect every generated command before running it, avoid passing untrusted SQL/table/filter/JSON values, and prefer least-privilege credentials instead of placing powerful management tokens directly in shell commands.

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
scripts/script.sh:6
Finding

Generated Shell Commands Permit Command Injection Through Unescaped Arguments

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (13)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/script.sh (reported line 2)May include surrounding context.

sh
#!/usr/bin/env bash
# supabase-tool — Generate Supabase API curl commands and SQL helpers
set -euo pipefail

cmd_query() {

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/script.sh (reported line 32)May include surrounding context.

sh
cat << EOF
# Query table: $table (limit $limit)

curl -s "https://YOUR_PROJECT_REF.supabase.co/rest/v1/$table?limit=$limit${filter}" \\
  -H "apikey: YOUR_ANON_KEY" \\
  -H "Authorization: Bearer YOUR_ANON_KEY" | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/script.sh (reported line 58)May include surrounding context.

sh
cat << EOF
# Insert record into table: $table

curl -s -X POST "https://YOUR_PROJECT_REF.supabase.co/rest/v1/$table" \\
  -H "apikey: YOUR_ANON_KEY" \\
  -H "Authorization: Bearer YOUR_ANON_KEY" \\
  -H "Content-Type: application/json" \\

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 · scripts/script.sh (reported line 122)May include surrounding context.

sh
# Project URL:       https://YOUR_PROJECT_REF.supabase.co
# Anon key:          eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...  (safe for client use)
# Access token:      sbp_xxx  (for management API — from https://supabase.com/dashboard/account/tokens)

# Quick test:
# curl -s "https://YOUR_PROJECT_REF.supabase.co/rest/v1/" -H "apikey: YOUR_ANON_KEY"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill exposes shell-based execution patterns via bash scripts/script.sh ... but does not declare any tool scope or permissions boundaries. That omission weakens reviewability and enforcement, making it easier for an agent or user to invoke database-affecting commands without an explicit statement of what capabilities the skill requires.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger list includes broad terms like sql query, database health, count rows, and postgresql, which can cause the skill to activate in many generic database contexts beyond Supabase-specific intent. Overbroad auto-invocation increases the chance that shell commands or write-capable database helpers are suggested or run in situations where the user did not intend to use this skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises command generation for querying, inserting records, running raw SQL, and checking health, but it does not clearly warn that generated commands may send data to external Supabase APIs or modify database state. In this context, the missing warning is significant because the skill includes both raw SQL and insert functionality, which raises the risk of unintended writes, sensitive data disclosure, or unsafe command use by a user who assumes the actions are read-only.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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/script.sh (reported line 2)May include surrounding context.

sh
#!/usr/bin/env bash
# supabase-tool — Generate Supabase API curl commands and SQL helpers
set -euo pipefail

cmd_query() {

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/script.sh (reported line 11)May include surrounding context.

sh
# Run SQL query against your Supabase project
# Replace YOUR_PROJECT_REF, YOUR_ACCESS_TOKEN, and YOUR_SQL:

curl -s -X POST "https://api.supabase.com/v1/projects/YOUR_PROJECT_REF/database/query" \\
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{"query": "$sql"}' | python3 -m json.tool

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/script.sh (reported line 86)May include surrounding context.

sh
# Run SQL query against your Supabase project
# Replace YOUR_PROJECT_REF, YOUR_ACCESS_TOKEN, and YOUR_SQL:

curl -s -X POST "https://api.supabase.com/v1/projects/YOUR_PROJECT_REF/database/query" \\
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{"query": "$sql"}' | python3 -m json.tool

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/script.sh (reported line 106)May include surrounding context.

sh
# Run SQL query against your Supabase project
# Replace YOUR_PROJECT_REF, YOUR_ACCESS_TOKEN, and YOUR_SQL:

curl -s -X POST "https://api.supabase.com/v1/projects/YOUR_PROJECT_REF/database/query" \\
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{"query": "$sql"}' | python3 -m json.tool

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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/script.sh (reported line 58)May include surrounding context.

sh
cat << EOF
# Insert record into table: $table

curl -s -X POST "https://YOUR_PROJECT_REF.supabase.co/rest/v1/$table" \\
  -H "apikey: YOUR_ANON_KEY" \\
  -H "Authorization: Bearer YOUR_ANON_KEY" \\
  -H "Content-Type: application/json" \\

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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/script.sh (reported line 106)May include surrounding context.

sh
cat << 'EOF'
# List all public tables in your Supabase project

curl -s -X POST "https://api.supabase.com/v1/projects/YOUR_PROJECT_REF/database/query" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "SELECT table_name FROM information_schema.tables WHERE table_schema='"'"'public'"'"' ORDER BY table_name"}' | \

Static analysis

No suspicious patterns detected.