# Frontend security

> Frontend security is an open-source agent skill for security. Audits React web code for authorization, bundle secrets, injection sinks and supply chain. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/JasGujral/mokata-oss/tree/main/src/mokata/skills/frontend-security
- **Repository:** https://github.com/jasgujral/mokata-oss
- **GitHub stars:** 19
- **License:** Apache-2.0
- **Skill name:** frontend-security
- **Collection:** https://github.com/JasGujral/mokata-oss
- **Categories:** [security](https://ai-powered.com/categories/security), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill guides an agent through a security review of React web code, aimed at the boundary between browser and server. It asks the agent to check each Server Function, Server Action or route handler for authentication and object-level authorization inside the function itself, rather than relying on middleware or UI checks. It also covers what data is passed from server to client, whether secrets leak into built client JavaScript through public-prefixed environment variables, and how user-influenced HTML and URLs are handled at injection sinks.

The workflow is audit first, fix on request. The agent is asked to reproduce each weakness, apply the smallest fix, confirm the same request is now refused, and add a test. Findings without a reproduction are to be labelled as suspicions. The checklist is ordered with authorization first, followed by client data exposure, bundle secrets, injection sinks, and dependency supply chain. The skill includes a verification checklist and a set of rationalizations to resist, and it refers to two reference files for detailed Incorrect/Correct examples.

It expects a React web project and access to its code and, where relevant, its production build output for the secrets check. Its guidance relies on a mokata pipeline with run state commands, and it states that browser-support figures and CVE details must be verified against advisories before being quoted.

## When your agent uses it

> mokata · Frontend security for React web — authorization first, then secrets in bundles, injection sinks and supply chain; audit first, fix on request.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/JasGujral/mokata-oss/tree/HEAD/src/mokata/skills/frontend-security)
- [License: Apache-2.0](https://github.com/JasGujral/mokata-oss/tree/HEAD/src/mokata/skills/frontend-security)

## Features

- **Server entry point authorization:** Checks that every Server Function and route handler authenticates the caller and authorizes the specific object.
- **Client data exposure review:** Looks at props and return values sent to the browser to confirm only permitted fields are included.
- **Bundle secret detection:** Inspects production build output for credentials inlined through public-prefixed environment variables.
- **Injection sink handling:** Reviews dangerouslySetInnerHTML, unsafe URL attributes and direct DOM writes for sanitization.
- **Dependency supply chain checks:** Reviews new dependencies, lockfile handling and framework advisory version floors.

## Good for

- Audit a React app's server actions for missing authorization checks
- Find secrets accidentally exposed in a production JavaScript bundle
- Review user-generated HTML rendering for XSS risks
- Check a new npm dependency before adding it to a React project
- Write a test that sends a forbidden request directly to a server function

## Install

### Claude Code

This skill ships in the `mokata` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add JasGujral/mokata-oss
/plugin install mokata@mostack
```

Or copy only this skill to `~/.claude/skills/frontend-security`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/frontend-security &&
cp -R "$tmp/src/mokata/skills/frontend-security" ~/.claude/skills/frontend-security &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/frontend-security` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/frontend-security` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/frontend-security &&
cp -R "$tmp/src/mokata/skills/frontend-security" ~/.agents/skills/frontend-security &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/frontend-security` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/frontend-security` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/frontend-security &&
cp -R "$tmp/src/mokata/skills/frontend-security" ~/.cursor/skills/frontend-security &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/frontend-security` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/JasGujral/mokata-oss.git --path src/mokata/skills/frontend-security
```

Or copy the folder to `~/.gemini/skills/frontend-security` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/frontend-security`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/frontend-security &&
cp -R "$tmp/src/mokata/skills/frontend-security" ~/.copilot/skills/frontend-security &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/frontend-security` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git
```

Then copy `mokata-oss/src/mokata/skills/frontend-security` into your agent's skills folder as `frontend-security`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Frontend security need to run?

It targets React web projects and expects access to the code and, for the secrets check, the production build output. If the build output is unavailable it falls back to reading the environment configuration and says so.

### Does Frontend security change code on its own?

It is designed to audit first and fix only on request. Durable writes and recorded security decisions are gated for human approval.

### When does Frontend security apply?

It applies to React web changes that add or change a server function, route handler, page reading protected data, client-exposed environment variable, or user-controlled HTML or URLs. It is not for backend-only services or React Native apps.

### How do I install Frontend security in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/frontend-security to use it in all your projects, or to .claude/skills/frontend-security in one project. Or install the mokata plugin, which includes it: /plugin marketplace add JasGujral/mokata-oss, then /plugin install mokata@mostack.

### Does Frontend security run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Frontend security?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Frontend security?

The closest alternatives to Frontend security are Security review, Security review, Security audit, Gha security review and Security.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Security review](https://ai-powered.com/skills/security-review-getsentry): Security review is an open-source agent skill for security.
- [Security review](https://ai-powered.com/skills/security-review): Security review is an open-source agent skill for security.
- [Security audit](https://ai-powered.com/skills/security-audit): Security audit is an open-source agent skill for security.
- [Gha security review](https://ai-powered.com/skills/gha-security-review): Gha security review is an open-source agent skill for security.
- [Security](https://ai-powered.com/skills/security-jasgujral): Security is an open-source agent skill for security.
- [Vue review](https://ai-powered.com/skills/vue-review): Vue review is an open-source agent skill for developer tools.
- [Find bugs](https://ai-powered.com/skills/find-bugs): Find bugs is an open-source agent skill for security.
- [Audit frontend design](https://ai-powered.com/skills/audit-frontend-design): Audit frontend design is an open-source agent skill for design and media.

---
Source: https://ai-powered.com/skills/frontend-security
