T09 · Insecure Skill Coding Practices
- Location
SKILL.md:47- Finding
Hard-Coded Supabase Anonymous API Credential
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 47-52
Vulnerability Type: Hard-coded credential in skill documentation
Risk Level: MediumVulnerable Code
text SUPABASE_URL:你的项目 API 地址 示例:https://fhpyglovinmpqsnhqqay.supabase.co SUPABASE_ANON_KEY:你的 anon key 示例:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZocHlnbG92aW5tcHFzbmhxcWF5Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjczODE1OTIsImV4cCI6MjA4Mjk1NzU5Mn0.q7go9R7Kcc-J4xobxmvQ_OQe6PfZ5VtKOzEdqQpPnYUTechnical Analysis
The documentation embeds a complete, project-specific Supabase anonymous JWT alongside its associated Supabase endpoint. Elsewhere in the file, users are instructed to send this value in both the
apikeyandAuthorization: Bearerheaders.A Supabase anonymous key is intended for use by untrusted clients and is not equivalent to a
service_rolesecret. Nevertheless, publishing a live key permits any party to authenticate as the associated project'sanonrole. The actual security boundary therefore depends entirely on the project's Row Level Security policies, table grants, storage policies, and exposed remote procedures. If any of those controls are missing or overly permissive, the key can facilitate unauthorized reading, insertion, modification, or deletion of backend data.Attack Path
- An attacker extracts the Supabase endpoint and JWT from
SKILL.md. - The attacker submits REST, storage, authentication, or RPC requests to the identified Supabase project using the JWT as the API key and bearer token.
- The attacker enumerates resources exposed to the
anonrole. - If Row Level Security, grants, or API policies are overly permissive, the attacker reads or modifies resources allowed by those policies.
- The attacker can continue using the credential until it expires, is rotated, or the associated signing configuration changes.
Impact Assessment
The obtainable privileges are ...[truncated 434 chars]
- An attacker extracts the Supabase endpoint and JWT from
- Remediation
View remediation
Remediation Suggestions
- Remove the live project endpoint and JWT from the distributed documentation. Replace them with unmistakable placeholders such as
https://YOUR_PROJECT.supabase.coand${SUPABASE_ANON_KEY}. - Rotate or revoke the published credential according to Supabase's supported key-management procedure.
- Require each deployment to provide its own endpoint and key through protected environment configuration rather than committed files.
- Review every exposed table and enable Row Level Security wherever applicable.
- Apply least-privilege policies to the
anonrole, allowing only the read operations required for active listening materials and their segments. - Revoke anonymous write, delete, storage, and RPC permissions unless they are explicitly required.
- Validate that related tables cannot be accessed through unintended joins or embedded-resource queries.
- Add secret scanning to version-control and release pipelines to prevent future publication of credentials.
- Remove the live project endpoint and JWT from the distributed documentation. Replace them with unmistakable placeholders such as
