validate-security

Audit Next.js Server Actions for authentication, authorization, and input validation.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/keidsondesigner/nextjs-bewear-ecommerce --skill validate-security-keidsondesigner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: validate-security
Source: https://github.com/keidsondesigner/nextjs-bewear-ecommerce/tree/main/.claude/skills/validate-security
Command: npx skills add https://github.com/keidsondesigner/nextjs-bewear-ecommerce --skill validate-security-keidsondesigner

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams audit and enforce security in Server Actions by validating authentication, authorization, and input data, reducing the risk of vulnerabilities before merges or deployments.

Core Features & Use Cases

  • Server Action Vetting: Ensures every server action uses "use server", authenticates users, and validates inputs with schemas.
  • Ownership & Access Control: Verifies resource ownership and permissions before mutations.
  • Security Baseline: Provides a repeatable review checklist aligned with Bewear project standards for pre-merge security.

Quick Start

Run the audit against your Server Actions by searching for "use server", authentication checks, and schema validation. Then expand tests to cover ownership, error handling, and safe data flows.

Frequently Asked Questions about validate-security

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

FAQPage Schema
How do I audit Next.js Server Actions for authentication and authorization vulnerabilities?

To audit Next.js Server Actions for authentication vulnerabilities, verify every server action explicitly uses 'use server', authenticates users via auth.api.getSession, and validates inputs with Zod schemas to enforce secure auth.

What security checks should I run during a pre-merge code review for Next.js server actions?

During a pre-merge code review for Next.js server actions, run security checks to verify user authentication, enforce resource ownership and authorization, and validate input data using Zod schemas across critical flows like checkout.

How does schema validation with Zod secure server actions against bad input data?

Schema validation with Zod secures server actions by enforcing strict input data structures before processing, preventing malformed or malicious payloads from reaching critical mutations and ensuring safe data flows during admin operations.

Can I use this security audit for critical admin operations and checkout flows in Next.js?

Yes, you can use this security audit for critical admin operations and checkout flows in Next.js by verifying resource ownership, enforcing access control permissions, and validating inputs prior to authorizing any data mutations.

What is the best way to enforce ownership and access control in Next.js Server Actions?

The best way to enforce ownership and access control in Next.js Server Actions is to verify authenticated user permissions via auth.api.getSession and validate resource ownership before authorizing any mutations or sensitive operations.

Why does my Next.js server action fail security validation without explicit 'use server' and auth checks?

Your Next.js server action fails security validation without explicit 'use server' and auth checks because the security baseline requires strict enforcement of server-side boundaries, user authentication via auth.api.getSession, and Zod schema validation.