convex-security-audit

Provides TypeScript security audit patterns for Convex applications including RBAC, permissions, rate limiting, and action isolation.

Updated Aug 30, 2025
One-click install
npx skills add https://github.com/kristofferaas/deep-stortinget --skill convex-security-audit-kristofferaas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-security-audit
Source: https://github.com/kristofferaas/deep-stortinget/tree/main/.agents/skills/convex-security-audit
Command: npx skills add https://github.com/kristofferaas/deep-stortinget --skill convex-security-audit-kristofferaas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides comprehensive patterns and code examples to audit and strengthen the security of Convex applications, focusing on critical areas like authorization, data access, and sensitive operations.

Core Features & Use Cases

  • Authorization Logic: Implement robust role-based access control (RBAC) and permission checks.
  • Data Access Boundaries: Ensure users can only access data they are authorized to see.
  • Action Isolation: Securely interact with external APIs and protect sensitive internal actions.
  • Rate Limiting: Prevent abuse and ensure service stability with configurable rate limits.
  • Sensitive Operations Protection: Add multi-factor confirmation for destructive or critical actions.
  • Use Case: A developer can use this Skill to quickly implement secure user authentication and authorization for their Convex application, preventing unauthorized data access and ensuring critical operations are protected.

Quick Start

Review the authorization logic patterns in the convex/lib/auth.ts file to understand how to implement role-based access control.

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 a Convex application?

Role-based access control in Convex is implemented by adding permission checks within your query and mutation functions. You verify user roles before processing requests to restrict data access and prevent unauthorized actions.

How do I enforce data access boundaries to prevent unauthorized data retrieval in Convex?

Data access boundaries in Convex are enforced by validating user ownership and permissions inside database queries. This ensures users can only retrieve or modify documents they are explicitly authorized to access.

What is the best way to add rate limiting to protect sensitive Convex actions from abuse?

Rate limiting in Convex is achieved by implementing configurable limits that track user actions over time. This prevents service abuse and ensures stability by blocking excessive requests to sensitive operations.

How do I secure external API calls and isolate actions in a Convex backend?

Securing external API calls in Convex involves isolating sensitive actions and verifying authorization before executing external requests. This protects internal operations from being triggered by unauthorized users.

Can I add multi-factor confirmation for destructive operations in a Convex app?

Yes, multi-factor confirmation for destructive operations can be added to Convex applications. This requires users to pass an additional verification step before critical actions are executed to prevent accidental or malicious data loss.