Security Review for Convex and AI Code

VerifiedSafe

Security review checklist for Convex functions, auth logic, public queries, webhooks, and AI-generated code.

Sby Skills Guide Bot
SecurityIntermediate
9/7/2026
Claude CodeCursorWindsurfCopilotCodex
#security-review#convex#auth#data-exposure#webhooks

Recommended for

Automated summary

Reviews the security of Convex functions, auth logic, public queries, admin routes, webhooks, and uploads against a checklist.

Strengths

  • Covers authentication and ownership checks, including ctx.auth.getUserIdentity() and internal* functions.
  • Prompts tight public return shapes and explicit returns validators to prevent PII leaks.
  • Includes practical verification steps such as inspecting WebSocket/XHR responses and retesting after redeployment.

Limitations

  • Heavily Convex-specific and not directly applicable to other frameworks or databases.
  • It is a manual checklist, not automated scanning or analysis tooling.
  • Assumes familiarity with Convex auth, validators, and public/internal function patterns.
When to use it

Use it before shipping code that writes user or admin data, exposes public data, or adds webhooks, uploads, or secrets.

When not to use it

Do not rely on it as the sole security audit for a non-Convex app or as a replacement for penetration testing.

Security analysis

Safe
Quality score85/100

The skill contains only guidance and a checklist for security review of Convex functions and related code. It declares no tools and does not instruct any destructive, exfiltrating, or obfuscated actions.

No concerns found

How this analysis is made

Examples

Review a Convex mutation
Review this Convex mutation that updates user profiles for auth checks, ownership validation, and data exposure issues before I ship it.
Audit public queries for PII
Audit these public Convex queries and their return validators for PII leaks, missing auth checks, and overly broad response shapes.
Check webhook and upload security
Check this webhook handler and file upload flow for signature validation, server-side file type and size checks, CORS restrictions, and secret handling.

name: sec-check description: Security review checklist for Convex functions, auth logic, public queries, admin routes, webhooks, uploads, and AI-generated code. Use when reviewing code that touches user data, PII, or access control.

Security Review Skill

Use this skill when reviewing Convex functions, auth logic, public query shapes, admin routes, webhooks, uploads, or any AI generated code that touches user data.

When to use it

Reach for this skill when:

  • a mutation writes user or admin data
  • a public query returns package or user data
  • an internal function should be separated from a public wrapper
  • a form collects names, emails, or other contact info
  • a webhook, upload, or API key flow is added
  • AI generated code needs a security pass before shipping

Auth and ownership checks

  • Call ctx.auth.getUserIdentity() before authenticated writes.
  • Never trust client supplied user ids for ownership.
  • Prefer indexed ownership checks over fetch then compare patterns.
  • Use internalQuery, internalMutation, and internalAction for sensitive backend work.
  • Keep public wrappers thin. Do auth and access checks there, then call internal functions.
  • Return generic Not found style errors when you should not reveal existence.

Data exposure rules

  • Public queries should return public safe shapes only.
  • Strip PII like email, name, Discord handle, internal notes, AI review details, or admin metadata unless the caller is allowed to see them.
  • Add explicit return validators on public functions so the response shape stays tight.
  • Mutations should return minimal data, usually ids or null, not the submitted object.
  • Treat everything returned by a query as visible in browser DevTools and WebSocket traffic.

Sensitive integrations

  • Keep secrets in server side environment variables only.
  • Validate webhook signatures before processing.
  • Restrict CORS for sensitive endpoints.
  • Validate upload types and file sizes server side.
  • Do not send user PII into AI prompts when it is not required for the task.
  • Use simple actor labels like AI or System, not fake email addresses, for automated actions.

AI generated code checks

  • Watch for missing returns validators.
  • Watch for public query or mutation usage where internal* should be used.
  • Watch for ctx.db.get() plus client supplied ids in ownership checks.
  • Watch for full objects returned from public queries or mutations.
  • Watch for vague or over detailed error messages that leak internal state.

Verification checklist

  • Open the browser network panel and inspect WebSocket or XHR responses for sensitive fields.
  • Hard refresh after deploying security changes so cached subscriptions do not fool the test.
  • Verify public queries exclude PII and internal metadata.
  • Verify admin queries require auth and admin checks before returning full data.
  • Verify mutations return minimal data.
  • Verify any new action or integration logs full errors only on the server side.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/security-review-for-convex-and-ai-code-mtqry3rd/download' --output '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd/SKILL.md.part' && mv '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd/SKILL.md.part' '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd/SKILL.md' && test -s '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/sec-check' && cp -R '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd' '.claude/skills/sec-check'

Cursor
test -f '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd/SKILL.md' && test -s '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/sec-check' && cp -R '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd' '.cursor/skills/sec-check'

Codex
test -f '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd/SKILL.md' && test -s '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/sec-check' && cp -R '.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd' '.agents/skills/sec-check'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd'

openskills read 'security-review-for-convex-and-ai-code-mtqry3rd'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/security-review-for-convex-and-ai-code-mtqry3rd/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills