T09 · Insecure Skill Coding Practices
- Location
SKILL.md:16- Finding
Hardcoded Long-Lived Supabase Anonymous Access Token
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 16–17
Vulnerability Type: Hardcoded external-service credential and direct database exposure
Risk Level: Mediumtext - API URL: `https://qpryylklcyvbotrzfpfa.supabase.co/rest/v1/` - Anon Key: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InFwcnl5bGtsY3l2Ym90cnpmcGZhIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODA1ODc3ODQsImV4cCI6MjA5NjE2Mzc4NH0.aYlRmmrSYUnxbozaRH1Y5wqr_BHrx-cCkbUezdkVMbo`Technical Analysis
The Skill embeds a reusable Supabase anonymous JWT together with its REST endpoint. Supabase anonymous keys are commonly exposed to client applications by design, but their security depends entirely on strict Row Level Security policies, table permissions, validation rules, and server-side rate limiting.
The project contains no database policies or backend implementation demonstrating that the
anonrole is restricted to the minimum operations required. Anyone who obtains this Skill can extract the token and invoke the Supabase REST API independently of the intended agent workflow. Client-side instructions concerning acceptable wait times, outlier detection, or daily limits do not prevent direct API requests.Consequently, weak or absent database controls could expose the
reportistable to unauthorized reads, arbitrary submissions, modification, or deletion. The token must not be treated as a confidential server credential, and possession of it must confer only tightly constrained public access.Attack Path
- Download or inspect the distributed
SKILL.mdfile. - Extract the Supabase project REST endpoint and embedded anonymous JWT.
- Send requests directly to the project REST API with the token in the
apikeyand authorization headers. - Enumerate the operations permitted to the
anonrole on thereportistable. - If Row Level Security or grants are insufficient, read records, submit fabricated reports, alter ex ...[truncated 806 chars]
- Download or inspect the distributed
- Remediation
View remediation
Remediation Suggestions
- Enable Row Level Security on every exposed Supabase table and verify that it cannot be bypassed by the
anonrole. - Grant the anonymous role only the operations required by the Skill. Do not grant anonymous update, delete, schema-management, or unrestricted read permissions.
- Define restrictive insertion policies and database constraints for required fields, allowed province values, numeric ranges, string lengths, and accepted data types.
- Enforce the
0.5to52week range in the database rather than relying on natural-language Skill instructions. - Implement abuse prevention and rate limiting in a trusted backend, API gateway, or database function. Client-side or instruction-only IP limits are bypassable.
- Consider exposing a narrow backend API or security-definer database function instead of direct generic table access.
- Ensure public queries return only fields intended for disclosure and avoid storing personal data in free-form fields.
- Review Supabase access logs and rotate the anonymous key if it was previously associated with excessive permissions or observed abuse.
- Add automated tests that authenticate as the anonymous role and confirm that prohibited reads, updates, and deletions fail.
- Document that an anonymous key is a public identifier rather than a secret and that security must be enforced through server-side authorization controls.
- Enable Row Level Security on every exposed Supabase table and verify that it cannot be bypassed by the
