frontend-review-security

Audit frontend security through static analysis, authentication patterns, and threat modeling.

416|6|Updated Apr 24, 2026
Ready to run
npx skills add https://github.com/mizchi/skills --skill frontend-review-security-mizchi
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: frontend-review-security
Source: https://github.com/mizchi/skills/tree/main/frontend-review-security
Command: npx skills add https://github.com/mizchi/skills --skill frontend-review-security-mizchi

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Frontend security reviews are time-consuming and error-prone when performed manually. This Skill systematically identifies risky HTML sinks, token storage vulnerabilities, authentication gaps, and environment variable exposure—helping you close security gaps before they reach production. ## Core Features & Use Cases - Static Analysis: Detect dangerouslySetInnerHTML, v-html, innerHTML assignments, and environment variable exposure in client bundles. - Auth Audit: Verify token storage (httpOnly cookies vs localStorage), route guard implementation, token refresh deduplication, and logout completeness. - AI Self-Pentest: Walk through XSS, CSRF, auth bypass, and open redirect scenarios to identify desk-review findings. - Use Case: You're preparing a frontend codebase for security certification. Run this Skill to generate a comprehensive security report with findings, staging header checklist, and ready-to-file GitHub issues. ## Quick Start Ask the AI to conduct a security review of your frontend repository by analyzing token storage patterns, authentication boundaries, and risky DOM manipulation in the codebase.

Frequently Asked Questions about frontend-review-security

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

FAQPage Schema
How do I identify insecure token storage in React applications?▼

Check where access tokens are stored: localStorage and sessionStorage are vulnerable to XSS attacks, while httpOnly cookies are inaccessible to JavaScript and safer by default. Verify that refresh tokens are also stored in httpOnly cookies and that access token lifetimes are short (15 minutes to 1 hour).

What should a secure logout flow include?▼

A complete logout sequence must: call the server logout endpoint to revoke the session, clear all client-side caches (TanStack Query, Zustand atoms), and navigate away before state clearing. Test by performing a hard-reload after logout to confirm no previous user data remains.

Why is dangerouslySetInnerHTML a security risk?▼

dangerouslySetInnerHTML renders unsanitized HTML directly into the DOM, allowing injected scripts to execute. Each use must verify that the input is sanitized with a library like DOMPurify or that the source is completely trusted and not user-supplied.

How do I prevent environment variable exposure in client bundles?▼

Only prefixed variables (VITE_, NEXT_PUBLIC_) are embedded in client code—never store secrets this way. Use a centralized config.ts that reads environment variables and throw errors at startup if required vars are missing to catch misconfiguration early.

What is a route guard loading state and why does it matter?▼

A loading state prevents flashing the protected page before auth status resolves. Without it, users see protected content briefly before being redirected to login, creating a confusing experience and potential XSS windows if state is mismanaged.

How does CSRF protection work in single-page applications?▼

State-mutating API calls (POST, PUT, DELETE) should require CSRF tokens sent in request headers, or use SameSite=Strict cookies to prevent cross-site request forgery. Verify that your framework or API client enforces this automatically.