Skip to main content
skill CX Codex

application-security · travisjneuman — Claude Code skill: install

application-security is a Claude Code skill for hardening web apps and reviewing security risks. It activates for code reviews, vulnerability checks, and defensive implementation work.

MIT 181 installs ★ 114 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add travisjneuman/.claude --skill application-security -a claude-code
Open on GitHub

What application-security does

The skill presents defensive coding patterns for web applications, with examples drawn from OWASP Top 10 (2021). It covers access control, password hashing, SQL injection, and XSS, and includes sample CSP headers.

For vulnerability checks, it lists SAST and DAST tools plus dependency-scanning commands for several languages. It also covers server-side input validation, rate limiting, and a security checklist. Server-side validation of user input is marked as required.

What it helps with

  • spot access-control flaws in application code
  • replace unsafe SQL with parameterized queries
  • set CSP and other defensive HTTP headers
  • scan dependencies for known vulnerabilities
  • validate user input on the server

Example prompts for the agent

  • Review this handler for access-control flaws and SQL injection.
  • Show me CSP headers for a Next.js middleware.
  • Outline checks for dependencies and user input in this app.

How to install application-security

1Skills CLI (Vercel)

npx skills add travisjneuman/.claude --skill application-security -a claude-code

2Manually: put the files in place

~/.claude/skills/application-security/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/application-security/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about application-security

How do I install application-security in Claude Code?

Run npx skills add travisjneuman/.claude --skill application-security -a claude-code. The skill file is at ~/.claude/skills/application-security/SKILL.md.

What does application-security do?

It provides secure coding examples and ways to find web application vulnerabilities, including static and dynamic analysis, dependency scans, and input checks.

Which security topics does application-security cover?

It covers access control, cryptographic failures, injection, XSS, CSP headers, rate limiting, and dependency scanning.

Source text

SKILL.md · MIT
---
name: application-security
description: >-
  OWASP Top 10 with code examples, SAST/DAST tools, dependency scanning, CSP headers, and input validation patterns. Use when hardening applications, reviewing security posture, or implementing defensive coding practices.
---

# Application Security Skill

Secure coding patterns, vulnerability prevention, and security tooling for web applications.

---

## OWASP Top 10 (2021) with Code Examples

### A01: Broken Access Control

```typescript
// BAD - No authorization check
app.get('/api/users/:id', async (req, res) => {
  const user = await db.user.findUnique({ where: { id: req.params.id } });
  res.json(user);
});

// GOOD - Verify ownership or role
app.get('/api/users/:id', authenticate, async (req, res) => {
  if (req.user.id !== req.params.id && req.user.role !== 'ADMIN') {
    return res.status(403).json({ error: 'Forbidden' });
  }
  const user = await db.user.findUnique({ where: { id: req.params.id } });
  res.json(user);
});
```

### A02: Cryptographic Failures

```typescript
// BAD - Weak hashing
import crypto from 'crypto';
const hash = crypto.createHash('md5').update(password).digest('hex');

// GOOD - Use bcrypt with proper rounds
import bcrypt from 'bcrypt';
const hash = await bcrypt.hash(password, 12);
const isValid = await bcrypt.compare(password, hash);
```

### A03: Injection

```typescript
// BAD - SQL injection
const query = `SELECT * FROM users WHERE email = '${email}'`;

// GOOD - Parameterized queries (Prisma handles this automatically)
const user = await prisma.user.findUnique({ where: { email } });

// GOOD - Parameterized raw SQL when needed
const users = await prisma.$queryRaw`SELECT * FROM users WHERE email = ${email}`;
```

### A07: Cross-Site Scripting (XSS)

```typescript
// BAD - Rendering raw HTML
element.innerHTML = userInput;

// GOOD - Use textContent or framework escaping
element.textContent = userInput;

// GOOD - React auto-escapes by default
return <div>{userInput}</div>;

// BAD in React - dangerouslySetInnerHTML
return <div dangerouslySetInnerHTML={{ __html: userInput }} />;
```

---

## Content Security Policy (CSP)

### Recommended Headers

```typescript
// Next.js middleware
import { NextResponse } from 'next/server';

export function middleware(request: Request) {
  const nonce = crypto.randomUUID();
  const csp = [
    `default-src 'self'`,
    `script-src 'self' 'nonce-${nonce}'`,
    `style-src 'self' 'unsafe-inline'`,
    `img-src 'self' data: https:`,
    `font-src 'self'`,
    `connect-src 'self' https://api.example.com`,
    `frame-ancestors 'none'`,
    `base-uri 'self'`,
    `form-action 'self'`,
  ].join('; ');

  const response = NextResponse.next();
  response.headers.set('Content-Security-Policy', csp);
  response.headers.set('X-Content-Type-Options', 'nosniff');
  response.headers.set('X-Frame-Options', 'DENY');
  response.headers.set('Referrer-Policy', 'strict-origin-when-cross-origin');
  response.headers.set('Permissions-Policy', 'camera=(), microphone=(), geolocation=()');
  return response;
}
```

---

## SAST/DAST Tooling

### Static Analysis (SAST)

| Tool | Language | Usage |
|------|----------|-------|
| ESLint security plugins | JS/TS | `eslint-plugin-security`, `@microsoft/eslint-plugin-sdl` |
| Semgrep | Multi | `semgrep --config=auto .` |
| Bandit | Python | `bandit -r src/` |
| gosec | Go | `gosec ./...` |
| cargo-audit | Rust | `cargo audit` |

### Dynamic Analysis (DAST)

| Tool | Purpose | Usage |
|------|---------|-------|
| OWASP ZAP | Web app scanning | Proxy-based scanner, API scan mode |
| Nuclei | Vulnerability scanning | Template-based scanner |
| Burp Suite | Manual + automated | Professional penetration testing |

### Dependency Scanning

```bash
# Node.js
npm audit
npm audit fix

# Python
pip-audit
safety check

# Go
govulncheck ./...

# Rust
cargo audit
```

---

## Input Validation Patterns

### Server-Side Validation (Always Required)

```typescript
import { z } from 'zod';

const CreateUserSchema = z.object({
  email: z.string().email().max(255),
  name: z.string().min(1).max(100).regex(/^[a-zA-Z\s'-]+$/),
  age: z.number().int().min(0).max(150).optional(),
});

function createUser(input: unknown) {
  const validated = CreateUserSchema.parse(input);
  // validated is now typed and safe
}
```

### Rate Limiting

```typescript
import rateLimit from 'express-rate-limit';

const authLimiter = rateLimit({
  windowMs: 15 * 60 * 1000, // 15 minutes
  max: 5, // 5 attempts per window
  message: 'Too many login attempts, please try again later',
  standardHeaders: true,
  legacyHeaders: false,
});

app.use('/api/auth/login', authLimiter);
```

---

## Security Checklist

- [ ] All user input validated server-side
- [ ] Parameterized queries for all database operations
- [ ] CSP headers configured
- [ ] Rate limiting on auth endpoints
- [ ] CORS properly restricted
- [ ] Secrets in environment variables, not code
- [ ] Dependencies scanned for vulnerabilities
- [ ] Authentication tokens in httpOnly cookies
- [ ] HTTPS enforced in production
- [ ] Error messages don't leak internal details

---

## Related Resources

- `~/.claude/docs/reference/checklists/security-hardening.md` - Security hardening checklist
- `~/.claude/agents/security-auditor.md` - Security audit agent
- `~/.claude/skills/authentication-patterns/SKILL.md` - Auth patterns

---

_Secure by default. Validate at boundaries. Defense in depth._

© travisjneuman · MIT · travisjneuman/.claude

Similar skills

All skills for Security →

application-security by other authors comes first.

application-security oakoss application-security walks your code and design through OWASP Top 10 and STRIDE, then hands over a pre-deploy checklist plus the compliance angles for GDPR, HIPAA, SOC 2 and PCI-DSS. CX Codex +1 287installs agency-application-security-engineer huytran1120 agency-application-security-engineer is a Claude Code skill that performs secure code reviews and builds threat models. It catches vulnerabilities before code hits production. CX Codex +1 ★ 85repo stars performing-web-application-penetration-test mahipal performing-web-application-penetration-test guides step-by-step penetration testing of web applications following the OWASP WSTG methodology with Burp Suite. Used for pre-production security assessments and verifying fixes. CX Codex +1 746installs Next.js Security Scan sugarforever Next.js Security Scan is a Claude Code skill that checks Next.js and TypeScript/JavaScript projects for security flaws. Run it for code reviews, security audits, or checks before deployment. CX Codex +1 580installs security-testing aj-geddes security-testing is a Claude Code skill that finds application vulnerabilities with static and dynamic analysis, penetration tests, and dependency scans. It activates for requests about OWASP, SQL injection, XSS, or CSRF. CX Codex +1 610installs security-auditor curiositech security-auditor runs dependency checks, finds hardcoded secrets, and flags injection or XSS risks in source code. Useful before shipping or when reviewing a pull request. CX Codex +1 243installs senior-security borghei senior-security is a Claude Code and Codex skill for threat modeling, code review, and secret scanning. It supports application security assessments and defensive architecture planning. CX Codex +1 203installs

From the same set117

The whole set →
recipe-card-creator The recipe-card-creator skill turns recipe details into structured cards, adjusts quantities for serving counts, and supports meal plans, shopping lists, and collections. CX Codex +1 183installs grant-proposal-builder grant-proposal-builder — a skill for Claude Code that structures nonprofit and research funding applications. Runs when drafting proposals, budget justifications, and project evaluation designs. CX Codex +1 183installs kotlin-multiplatform Architecture patterns, library recommendations, and templates for Kotlin Multiplatform and Compose Multiplatform codebases. CX Codex +1 183installs process-flowchart-designer process-flowchart-designer turns process descriptions into ASCII flowcharts, swimlane diagrams, SIPOC maps, and Lean bottleneck analyses. CX Codex +1 183installs marketing Marketing frameworks for the agent: brand architecture, positioning, research methods, segmentation, personas and channel metrics, ready to fill with your own data. CX Codex +1 181installs generic-fullstack-feature-developer generic-fullstack-feature-developer guides end-to-end feature development across Next.js App Router, NestJS, and Prisma. Use it when adding full-stack slices, updating schemas, or building API routes. CX Codex +1 180installs startup-launch startup-launch — a skill for Claude Code that guides founders from problem discovery to public release. Structures customer interviews and filters product hypotheses before coding starts. CX Codex +1 175installs android-development The android-development Claude Code skill supports Android app development with Kotlin and Jetpack Compose. It activates for work on Material Design or modern Android architecture. CX Codex +1 175installs

Project sponsors

Companies that keep this analytics open