backend-development
Warn
Audited by Gen Agent Trust Hub on Feb 23, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONDATA_EXFILTRATIONCREDENTIALS_UNSAFE
Full Analysis
- [COMMAND_EXECUTION] (MEDIUM): SQL Injection vulnerability in helper script. In
scripts/setup_vault_secrets.sh, the functionupsert_secretconstructs SQL queries by directly interpolating shell variables into strings:run_sql "UPDATE vault.secrets SET secret = '${secret_value}' WHERE name = '${secret_name}';". If a secret value (like a service key or URL) contains single quotes or malicious SQL fragments, it could lead to arbitrary SQL execution within the database context. - [DATA_EXFILTRATION] (MEDIUM): Potential for service role key exfiltration via dynamic URL. The function
_internal_call_edge_functioninassets/setup.sqlretrieves both theSUPABASE_URLandSB_SECRET_KEYfrom the Vault and usespg_netto send the secret key in the headers of an HTTP POST request to that URL. If an attacker can manipulate theSUPABASE_URLstored in the Vault, the system will automatically exfiltrate the high-privilege service role key to the attacker-controlled endpoint. - [CREDENTIALS_UNSAFE] (LOW): Risk of credential exposure in version control. The workflow in
assets/seed.sqlandreferences/workflows.mdencourages developers to append their local service role keys to the project'ssupabase/seed.sqlfile. While intended for local development persistence, this practice increases the risk that these sensitive credentials will be accidentally committed to a repository. - [PRIVILEGE_ESCALATION] (SAFE): Proper implementation of internal utility functions. The
SECURITY DEFINERfunctions inassets/setup.sqlfollow security best practices by setting an emptysearch_pathand explicitly revoking access fromPUBLIC,anon, andauthenticatedroles while granting execute permissions only to theservice_role.
Audit Metadata