Supabase Security Audit

WarnAudited by ClawScan on May 16, 2026.

Overview

The skill’s security-audit purpose is coherent, but its script handles powerful Supabase database credentials unsafely and should be reviewed before use.

Review and patch the audit script before using production Supabase credentials. In particular, do not use arbitrary --pooler hosts, re-enable TLS certificate verification, validate UIDs, and require explicit approval before applying the SQL hotfix.

Findings (6)

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

What this means

A mistaken or malicious pooler value, or a network attacker, could capture the Supabase database password or tamper with audit results.

Why it was flagged

The database host can be supplied via --pooler, the script sends the Supabase DB password to that host, and TLS certificate verification is disabled.

Skill content
const pooler   = args.pooler || 'aws-1-eu-central-1.pooler.supabase.com:6543'; ... password: cred.SUPABASE_DB_PASSWORD, ... ssl: { rejectUnauthorized: false },
Recommendation

Only allow known Supabase pooler hosts, keep TLS verification enabled or pin Supabase’s CA, and avoid running this script with production credentials until fixed.

What this means

If an agent or user passes a crafted probe UID, it could execute unintended SQL using the privileged database connection.

Why it was flagged

A CLI-supplied UID is interpolated directly into SQL rather than validated as a UUID or passed as a parameter.

Skill content
const probeUid  = args['probe-uid']; ... await pg.query(`set local request.jwt.claims to '{"sub":"${probeUid}","role":"authenticated"}'`);
Recommendation

Validate probe and target IDs strictly as UUIDs and set JWT claims with parameterized SQL, for example using `set_config` with a JSON-encoded parameter.

What this means

Installing or running the skill gives its script access to credentials powerful enough to read or change production Supabase data.

Why it was flagged

The skill requires service-role and direct database credentials, which can bypass normal application/RLS boundaries; registry metadata still lists no primary credential or required config path.

Skill content
SUPABASE_SERVICE_ROLE_KEY=...
SUPABASE_DB_PASSWORD=...
Recommendation

Use temporary or rotated audit credentials where possible, run in a trusted environment, and update the skill metadata to clearly declare the required credential file and privilege level.

What this means

The audit depends on whatever pg package is installed in that temporary location, which is a normal but review-worthy supply-chain dependency.

Why it was flagged

The setup uses an unpinned npm install in /tmp for a package the script dynamically loads.

Skill content
mkdir -p /tmp/sb-tools && (cd /tmp/sb-tools && npm i pg)
Recommendation

Install a pinned pg version from a trusted lockfile or controlled project dependency location.

What this means

The hotfix is purpose-aligned, but applying it to production can change user access behavior or break application flows if the table/columns do not match.

Why it was flagged

The optional hotfix is a real database migration that changes RLS policy and installs a trigger.

Skill content
drop policy if exists profiles_self_update on public.profiles; ... create trigger trg_profile_role_lock
Recommendation

Review and test the SQL in staging, back up the database, and require explicit user approval before applying the migration.

What this means

Security findings or environment details may be retained and reused in future agent context.

Why it was flagged

The workflow asks the agent to persist audit results into project memory or logs.

Skill content
Append a one-paragraph summary to your project's memory or change-log file under a dated heading
Recommendation

Do not include secrets in the summary, and review any persistent memory/change-log entry before saving it.