# commit-security-scan

The commit-security-scan skill reviews Git changes for security flaws using threat-model context. Use it for pull requests, staged files, or branch diffs.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 126 installs · ★ 129 repo stars
- Author: Factory-AI
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Factory-AI/factory-plugins/tree/HEAD/plugins/security-engineer/skills/commit-security-scan/SKILL.md
- Updated: 2026-10-25
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/commit-security-scan

## What it does

commit-security-scan reviews commits, pull requests, commit ranges, staged work, uncommitted files, and branch comparisons. It reads the changed files and traces data through code to look for weak authentication or authorization, injection risks, exposed secrets, insecure object access, and denial-of-service patterns. The checks follow STRIDE categories and the repository’s threat model.

The scan relies on `.factory/threat-model.md` and `.factory/security-config.json`. Without both files, scanning cannot proceed; the skill first invokes `threat-model-generation` to create them. It then gathers changes with Git or `gh pr diff`, checks possible findings against existing safeguards and severity thresholds, and writes `security-findings.json` with the affected code, risk level, reasoning, and suggested fix.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Factory-AI/factory-plugins --skill commit-security-scan -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/commit-security-scan/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/commit-security-scan/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Factory-AI/factory-plugins --skill commit-security-scan -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/commit-security-scan/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Factory-AI/factory-plugins --skill commit-security-scan -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/commit-security-scan/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Factory-AI/factory-plugins plugins/security-engineer/skills/commit-security-scan
```

2. **Manually: put the files in place**
- File: `.github/skills/commit-security-scan/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Factory-AI/factory-plugins --skill commit-security-scan -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Factory-AI/factory-plugins --path plugins/security-engineer/skills/commit-security-scan
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/commit-security-scan/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Factory-AI/factory-plugins --skill commit-security-scan -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Factory-AI/factory-plugins/tree/HEAD/plugins/security-engineer/skills/commit-security-scan/SKILL.md

## When to use it
- scan a pull request for vulnerabilities
- check staged changes before a commit
- compare two branches for security issues
- review a commit range against the threat model
- trace user input to a risky code sink

## Example prompts
- Scan PR #456 for security vulnerabilities.
- Check my staged changes for security issues before I commit.
- Scan changes from `main` to `feature-branch` and write the findings report.

## Similar
- [security-diff-scan](https://affpapa.org/en/nevibecode/skills/security-diff-scan.md) — skill · 30 installs
- [security-scanning-security-sast](https://affpapa.org/en/nevibecode/skills/security-scanning-security-sast.md) — skill · ★ 50109 repo stars
- [security-scanning](https://affpapa.org/en/nevibecode/skills/security-scanning.md) — skill · 385 installs
- [security-guidance](https://affpapa.org/en/nevibecode/plugins/rohitg00-security-guidance.md) — plugin · ★ 2858 repo stars
- [gha-security-review](https://affpapa.org/en/nevibecode/skills/gha-security-review.md) — skill · 5100 installs
- [deep-security-scan](https://affpapa.org/en/nevibecode/skills/openai-deep-security-scan.md) — skill · 127 installs

From the same set: [factory-ai/factory-plugins](https://affpapa.org/en/nevibecode/by/factory-ai/factory-plugins.md) — 17 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
