security-review

Reviews auth, payment, and API code for secure patterns in a React and Capacitor app.

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/homeslands/trend-ui --skill security-review-homeslands
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-review
Source: https://github.com/homeslands/trend-ui/tree/main/app/order-ui/.claude/skills/security-review
Command: npx skills add https://github.com/homeslands/trend-ui --skill security-review-homeslands

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Applications handling payments and user PII are high-risk targets, and insecure patterns like hardcoded tokens, sensitive data in URLs, or unvalidated deep links can slip into code during fast development. This Skill enforces security rules specific to the order-ui codebase whenever auth flows, payment screens, or credential-handling code is written. ## Core Features & Use Cases - Token & Credential Safety: Ensures tokens live only in the Zustand auth store, are never logged or hardcoded, and are cleared via setLogout(). - API & Input Security: Verifies the http.unified.ts interceptor handles auth headers, sensitive data goes in request bodies not URLs, and Zod validates all form input. - Platform-Specific Checks: Covers Capacitor deep link whitelisting, Firebase push notification code filtering, printer API key handling, and the isAuthInitialized auth gate. - Use Case: When writing a new payment form, the Skill checks that card data is sent via POST body, validated with Zod, and that no raw API errors are shown to users. ## Quick Start Review this new payment form component for security issues before I commit it.

Frequently Asked Questions about security-review

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

FAQPage Schema
How do I securely store auth tokens in a React app?

Store tokens in a Zustand store with the persist middleware writing to localStorage, as done in auth.store.ts. Never hardcode tokens in source, never log them, and always clear them on logout via a dedicated setLogout() action.

How to prevent sending sensitive data in API URLs?

Send sensitive data like card details in the request body using POST or PATCH instead of query parameters, since URLs get logged by servers. Let the HTTP interceptor inject the Authorization header automatically rather than adding it manually.

Does this security review work with Capacitor deep links?

Yes, it covers Capacitor deep link security by requiring paths to be validated against a whitelist of known routes before navigation. Blindly navigating to parsed deep link URLs is flagged as a vulnerability.

Why should I not add my own token refresh logic?

The http.unified.ts interceptor already handles concurrent 401 responses with a queue to prevent race conditions. Adding a second refresh mechanism causes multiple refresh calls that invalidate tokens.

When should Zod validation be applied to user input?

Apply Zod schemas at form boundaries before any data is sent to the API, validating fields like email format and minimum password length. Raw user input should never be passed directly to mutation calls.