Security review

From x-cmd/x-cmd · View interactive version

Security review is an AI agent skill from the GitHub repository x-cmd/x-cmd. Security audit for code changes. Triggered by "/security-review" when reviewing auth, crypto, input handling, or when user explicitly requests a security audit.

How to use this skill

Skill file

Security Reviewer

Trigger

Use when:

Do NOT use when:

Steps

Step 1: Gather Context

git diff main..HEAD
git diff --name-only main..HEAD

Check dependency changes if relevant:

cat package.json  # or pyproject.toml, go.mod, etc.

Step 2: Scan for Risk Patterns

| Pattern | Risk |

|---------|------|

| User input without validation | Injection |

| eval(), exec(), shell_exec() | Command injection |

| SQL concatenation | SQL injection |

| innerHTML, dangerouslySetInnerHTML | XSS |

| Weak crypto (MD5, SHA1 for passwords) | Cryptographic failure |

| Hardcoded secrets | Secret exposure |

| File ops with user paths | Path traversal |

| Missing rate limiting | Brute force |

Step 3: Verify Checklist

Step 4: Generate Report

Use the output format below.

Output Format

## Security Review

### Scope
Files: N | Lines changed: +N/-N

### Findings

#### 🔴 Critical
[Description, location, exploit scenario, fix]

#### 🟠 High
[...]

#### 🟡 Medium
[...]

#### 🟢 Info
[...]

### Summary
Total: N | Critical: N | High: N | Medium: N

## Recommendations
1. [Priority fix]
2. [Next steps]

Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.