Skip to main content
skill CX Codex

security-auditor · ovachiever — Claude Code skill: OWASP scanning

Scans your code for OWASP Top 10 patterns: SQL injection, XSS, exposed secrets, broken auth. Fires on file changes and before deployments.

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

What security-auditor does

The skill hooks into the agent and watches your edits. Touch a file tied to auth, an API or a database and it runs that file against a list of known vulnerability patterns, then reports the type, the line number and the fix. It also covers insecure deserialization, CSRF, CORS, logging gaps and password storage.

What's inside is a set of OWASP Top 10 and CWE patterns with bad/good pairs: parameterized queries instead of string concatenation, textContent instead of innerHTML, secrets pulled from environment variables rather than hardcoded. For dependencies it can run npm audit and pip-audit, but only when registry.npmjs.org, pypi.org and api.github.com are reachable.

The split of duties is deliberate. The skill catches a pattern fast; deep auditing with threat modeling is left to the @code-reviewer sub-agent. If your team has its own security rules, copy the skill into a separate folder and extend it. It runs with or without sandboxing.

What it helps with

  • catch SQL injection in string concatenation before commit
  • spot a hardcoded API key in a payment module
  • check that passwords aren't stored in plain text
  • find a missing ownership check on a delete route
  • run a dependency audit before shipping

Example prompts for the agent

  • check this file for vulnerabilities before I commit
  • run security-auditor over the changes in the auth folder
  • scan the code for leaked secrets before deploy

How to install security-auditor

1Skills CLI (Vercel)

npx skills add ovachiever/droid-tings --skill security-auditor -a claude-code

2Manually: put the files in place

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

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

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

Questions about security-auditor

How do I install security-auditor in Claude?

Run npx skills add ovachiever/droid-tings --skill security-auditor -a claude-code. The skill file then lives at ~/.claude/skills/security-auditor/SKILL.md.

What does security-auditor do?

It scans code for OWASP Top 10 patterns: SQL injection, XSS, authentication issues, sensitive data exposure, broken access control. Each finding comes with a severity level, a location and a remediation.

How is it different from the @code-reviewer sub-agent?

The skill does quick vulnerability pattern detection. The @code-reviewer sub-agent runs a deeper audit with threat modeling, so you invoke it when you want the full analysis.

Source text

SKILL.md · MIT
---
name: security-auditor
description: Continuous security vulnerability scanning for OWASP Top 10, common vulnerabilities, and insecure patterns. Use when reviewing code, before deployments, or on file changes. Scans for SQL injection, XSS, secrets exposure, auth issues. Triggers on file changes, security mentions, deployment prep.
allowed-tools: Read, Grep, Bash
---

# Security Auditor Skill

Automatic security vulnerability detection.

## When I Activate

- ✅ Code files modified (especially auth, API, database)
- ✅ User mentions security or vulnerabilities
- ✅ Before deployments or commits
- ✅ Dependency changes
- ✅ Configuration file changes

## What I Scan For

### OWASP Top 10 Patterns

**1. SQL Injection**
```javascript
// CRITICAL: SQL injection
const query = `SELECT * FROM users WHERE id = ${userId}`;

// SECURE: Parameterized query
const query = 'SELECT * FROM users WHERE id = ?';
db.query(query, [userId]);
```

**2. XSS (Cross-Site Scripting)**
```javascript
// CRITICAL: XSS vulnerability
element.innerHTML = userInput;

// SECURE: Use textContent or sanitize
element.textContent = userInput;
// or
element.innerHTML = DOMPurify.sanitize(userInput);
```

**3. Authentication Issues**
```javascript
// CRITICAL: Weak JWT secret
const token = jwt.sign(payload, 'secret123');

// SECURE: Strong secret from environment
const token = jwt.sign(payload, process.env.JWT_SECRET);
```

**4. Sensitive Data Exposure**
```python
# CRITICAL: Exposed password
password = "admin123"

# SECURE: Environment variable
password = os.getenv("DB_PASSWORD")
```

**5. Broken Access Control**
```javascript
// CRITICAL: No authorization check
app.delete('/api/users/:id', (req, res) => {
  User.delete(req.params.id);
});

// SECURE: Authorization check
app.delete('/api/users/:id', auth, checkOwnership, (req, res) => {
  User.delete(req.params.id);
});
```

### Additional Security Checks

- **Insecure Deserialization**
- **Security Misconfiguration**
- **Insufficient Logging**
- **CSRF Protection Missing**
- **CORS Misconfiguration**

## Alert Format

```
🚨 CRITICAL: [Vulnerability type]
📍 Location: file.js:42
🔧 Fix: [Specific remediation]
📖 Reference: [OWASP/CWE link]
```

### Severity Levels

- 🚨 **CRITICAL**: Must fix immediately (exploitable vulnerabilities)
- ⚠️ **HIGH**: Should fix soon (security weaknesses)
- 📋 **MEDIUM**: Consider fixing (potential issues)
- 💡 **LOW**: Best practice improvements

## Real-World Examples

### SQL Injection Detection

```javascript
// You write:
app.get('/users', (req, res) => {
  const sql = `SELECT * FROM users WHERE name = '${req.query.name}'`;
  db.query(sql, (err, results) => res.json(results));
});

// I alert:
🚨 CRITICAL: SQL injection vulnerability (line 2)
📍 File: routes/users.js, Line 2
🔧 Fix: Use parameterized queries
  const sql = 'SELECT * FROM users WHERE name = ?';
  db.query(sql, [req.query.name], ...);
📖 https://owasp.org/www-community/attacks/SQL_Injection
```

### Password Storage

```python
# You write:
def create_user(username, password):
    user = User(username=username, password=password)
    user.save()

# I alert:
🚨 CRITICAL: Storing plain text password (line 2)
📍 File: models.py, Line 2
🔧 Fix: Hash passwords before storing
  from bcrypt import hashpw, gensalt
  hashed = hashpw(password.encode(), gensalt())
  user = User(username=username, password=hashed)
📖 Use bcrypt, scrypt, or argon2 for password hashing
```

### API Key Exposure

```javascript
// You write:
const stripe = require('stripe')('sk_live_abc123...');

// I alert:
🚨 CRITICAL: Hardcoded API key detected (line 1)
📍 File: payment.js, Line 1
🔧 Fix: Use environment variables
  const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);
📖 Never commit API keys to version control
```

## Dependency Scanning

I can run security audits on dependencies:

```bash
# Node.js
npm audit

# Python
pip-audit

# Results flagged with severity
```

## Relationship with @code-reviewer Sub-Agent

**Me (Skill):** Quick vulnerability pattern detection
**@code-reviewer (Sub-Agent):** Deep security audit with threat modeling

### Workflow
1. I detect vulnerability pattern
2. I flag: "🚨 SQL injection detected"
3. You want full analysis → Invoke **@code-reviewer** sub-agent
4. Sub-agent provides comprehensive security audit

## Common Vulnerability Patterns

### Authentication
- Weak password policies
- Missing MFA
- Session fixation
- Insecure password storage

### Authorization
- Missing access control
- Privilege escalation
- IDOR (Insecure Direct Object Reference)

### Data Protection
- Unencrypted sensitive data
- Weak encryption algorithms
- Missing HTTPS
- Insecure cookies

### Input Validation
- SQL injection
- Command injection
- XSS
- Path traversal

## Sandboxing Compatibility

**Works without sandboxing:** ✅ Yes
**Works with sandboxing:** ✅ Yes

**Optional: For dependency scanning**
```json
{
  "network": {
    "allowedDomains": [
      "registry.npmjs.org",
      "pypi.org",
      "api.github.com"
    ]
  }
}
```

## Integration with Tools

### With secret-scanner Skill
```
security-auditor: Checks code patterns
secret-scanner: Checks for exposed secrets
Together: Comprehensive security coverage
```

### With /review Command
```bash
/review --scope staged --checks security

# Workflow:
# 1. My automatic security findings
# 2. @code-reviewer sub-agent deep audit
# 3. Comprehensive security report
```

## Customization

Add company-specific security patterns:

```bash
cp -r ~/.claude/skills/security/security-auditor \
      ~/.claude/skills/security/company-security-auditor

# Edit SKILL.md to add:
# - Internal API patterns
# - Company security policies
# - Custom vulnerability checks
```

## Learn More

- [OWASP Top 10](https://owasp.org/www-project-top-ten/)
- [CWE Top 25](https://cwe.mitre.org/top25/)
- [Security Best Practices](../../standards/security/)

© ovachiever · MIT · ovachiever/droid-tings

Similar skills

All skills for Security →

security-auditor by other authors comes first.

security-auditor sickn33 Turns your AI coder into a security expert: conducts audits, analyzes vulnerabilities, reviews SDLC and compliance with OWASP, GDPR, PCI-DSS standards. CX Codex +1 1,400installs security-auditor zhaono1 A skill that hunts vulnerabilities in your code: walks the OWASP Top 10, checks configs, dependencies and leaked secrets. Useful before a release or a review. CX Codex +1 1,000installs security-review getsentry Finds injections, XSS, authorization flaws, and other vulnerabilities in code. Reports only high-confidence findings. CX Codex +1 21,300installs Next.js Security Scan sugarforever A skill that scans Next.js and TypeScript/JavaScript projects for XSS, injection flaws, auth holes and hardcoded secrets. Useful before you ship. CX Codex +1 553installs secure-code-review zebbern This skill walks your code through all ten OWASP Top 10 categories and returns a report with vulnerable examples and working fixes. Useful before a release or when reviewing unfamiliar code. CX Codex +1 ★ 4,676repo stars drupal-security madsnorgaard A coding-agent skill that nudges you toward safe Drupal patterns: parameterized queries, escaped output, permission checks. It activates on its own while you write forms, controllers or handle user input. CX Codex +1 823installs owasp-security hoodini A skill that hands your agent the OWASP Top 10 playbook: access control, injection, crypto, misconfig. Useful while writing auth or touching an API. CX Codex +1 3,000installs security boshu2 This skill reviews code, dependencies, secrets, and prompt surfaces for security risks. Use it for a pre-release review or a repository scan. CX Codex +1 1,400installs

From the same set2

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor