convex-security-audit

Reviews Convex applications for authorization, data access, rate limiting, and sensitive operation vulnerabilities.

1|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/Rocktown-Labs/rivercitymd --skill convex-security-audit-rocktown-labs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-security-audit
Source: https://github.com/Rocktown-Labs/rivercitymd/tree/main/.cursor/skills/convex-security-audit
Command: npx skills add https://github.com/Rocktown-Labs/rivercitymd --skill convex-security-audit-rocktown-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Convex applications often ship with insecure authorization logic, unprotected data access, missing rate limits, and exposed sensitive operations. This Skill provides structured audit patterns to identify and fix these security gaps before they reach production. ## Core Features & Use Cases - Authorization Audits: Implements role-based access control (RBAC) and permission checks with role hierarchies and ConvexError handling. - Data Access Boundary Reviews: Verifies ownership filtering, shared resource access lists, and visibility rules so users only see permitted data. - Action Isolation & Rate Limiting: Protects external API calls with internal actions, environment-based secrets, audit logging, and sliding-window rate limits. - Use Case: Before launching a Convex-backed SaaS app, run this audit to confirm admin-only mutations enforce superadmin roles, payment processing stays in internal actions, and destructive operations require confirmation codes. ## Quick Start Audit my Convex functions for authorization flaws, data leakage, missing rate limits, and unprotected sensitive operations.

Frequently Asked Questions about convex-security-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement role-based access control in Convex?▼

Implement RBAC in Convex by creating a getUser helper that resolves the identity via ctx.auth.getUserIdentity, then a requireRole function that compares the user's role against a hierarchy and throws a ConvexError when the level is insufficient.

How do I prevent users from accessing other users' data in Convex?▼

Filter every query by the authenticated user's ID using an index such as by_user, and verify ownership before returning sensitive items. Return null instead of an error for unauthorized items so existence is not revealed.

Should Stripe payment processing be a public Convex action?▼

No, payment processing should use internalAction so it is never exposed to clients. Keep the Stripe secret key in environment variables and invoke the internal action only from trusted server-side mutations or schedulers.

How do I add rate limiting to Convex mutations?▼

Record each request in a rateLimits table with userId, action, and timestamp, then count entries within the time window before executing the mutation. Throw a ConvexError with a retryAfter value when the limit is exceeded.

What are common security mistakes in Convex applications?▼

Common mistakes include relying on a single auth check, skipping audit logs for sensitive operations, trusting client-supplied data without server-side validation, exposing external API error details, and shipping endpoints without rate limits.