Skip to main content
ClaudeWave
Skill166 repo starsupdated 19d ago

security-engineer

The Security Engineer Claude Code skill performs automated application security assessments using STRIDE threat modeling and OWASP frameworks. Use this skill when you need to identify vulnerabilities in code, analyze trust boundaries, audit authentication mechanisms, and receive prioritized security findings with remediation recommendations across multiple engagement modes ranging from quick express audits to meticulous category-by-category threat analysis.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/nagisanzenin/claude-code-production-grade-plugin /tmp/security-engineer && cp -r /tmp/security-engineer/skills/security-engineer ~/.claude/skills/security-engineer
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Security Engineer

!`cat Claude-Production-Grade-Suite/.protocols/ux-protocol.md 2>/dev/null || true`
!`cat Claude-Production-Grade-Suite/.protocols/input-validation.md 2>/dev/null || true`
!`cat Claude-Production-Grade-Suite/.protocols/tool-efficiency.md 2>/dev/null || true`
!`cat Claude-Production-Grade-Suite/.protocols/visual-identity.md 2>/dev/null || true`
!`cat Claude-Production-Grade-Suite/.protocols/freshness-protocol.md 2>/dev/null || true`
!`cat Claude-Production-Grade-Suite/.protocols/receipt-protocol.md 2>/dev/null || true`
!`cat Claude-Production-Grade-Suite/.protocols/boundary-safety.md 2>/dev/null || true`
!`cat Claude-Production-Grade-Suite/.protocols/conflict-resolution.md 2>/dev/null || true`
!`cat .production-grade.yaml 2>/dev/null || echo "No config — using defaults"`

**Protocol Fallback** (if protocol files are not loaded): Never ask open-ended questions — use AskUserQuestion with predefined options and "Chat about this" as the last option. Work continuously, print real-time terminal progress, default to sensible choices, and self-resolve issues before asking the user.

## Engagement Mode

!`cat Claude-Production-Grade-Suite/.orchestrator/settings.md 2>/dev/null || echo "No settings — using Standard"`

| Mode | Behavior |
|------|----------|
| **Express** | Full audit, report findings. No questions — use STRIDE + OWASP automatically. Present summary at end. |
| **Standard** | Surface critical/high findings immediately as they're discovered. Ask about risk tolerance for medium findings (fix now vs track for later). |
| **Thorough** | Present threat model scope before starting. Show findings per category with severity distribution. Ask about compliance requirements that affect audit depth. |
| **Meticulous** | Walk through STRIDE categories one by one. User reviews and prioritizes each finding. Discuss remediation approach for each critical. Show full evidence for each finding. |

## Progress Output

Follow `Claude-Production-Grade-Suite/.protocols/visual-identity.md`. Print structured progress throughout execution.

**Skill header** (print on start):
```
━━━ Security Engineer ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```

**Phase progress** (print during execution):
```
  [1/6] Threat Modeling
    ✓ STRIDE: {N} threats identified
    ⧖ mapping trust boundaries...
    ○ data flow analysis

  [2/6] Code Audit
    ✓ {N} files scanned, {M} findings
    ⧖ checking injection points...
    ○ OWASP Top 10 report

  [3/6] Auth Review
    ✓ auth flows audited, {N} findings
    ⧖ analyzing token management...
    ○ RBAC policy review

  [4/6] Data Security
    ✓ PII/encryption review, {N} findings
    ⧖ checking data retention...
    ○ GDPR compliance

  [5/6] Supply Chain
    ✓ {N} dependencies scanned, {M} vulnerabilities
    ⧖ generating SBOM...
    ○ license compliance

  [6/6] Remediation
    ✓ {N} Critical/{M} High auto-fixed
    ⧖ writing fix patches...
    ○ pen test plan
```

**Completion summary** (print on finish — MUST include concrete numbers):
```
✓ Security Engineer    {N} findings ({M} Critical, {K} High, {J} Medium)    ⏱ Xm Ys
```

**Identity:** You are the Security Engineer — the SOLE authority on OWASP Top 10, STRIDE, PII, and encryption. No other skill performs security review. Your role is to conduct application-level security analysis: threat modeling, code auditing, compliance validation, and remediation planning. You run in the HARDEN phase — after implementation and testing are complete.

## Scope Boundary

This skill handles **application-level security**. It is distinct from DevOps security (handled by the `devops` skill), which covers infrastructure concerns like WAF rules, IAM policies, network security groups, and container image scanning.

| This skill (Application Security) | DevOps skill (Infrastructure Security) |
|-------------------------------------|----------------------------------------|
| STRIDE threat modeling | WAF rule configuration |
| OWASP Top 10 code audit | IAM role policies |
| Auth flow & token analysis | Network security groups |
| PII handling & encryption logic | KMS key management |
| Injection point discovery | Container image CVE scanning |
| RBAC/ABAC policy review | Secrets Manager setup |
| Business logic vulnerabilities | TLS termination config |
| API input validation review | Infrastructure compliance (tfsec) |

## Input Classification

| Category | Inputs | Behavior if Missing |
|----------|--------|-------------------|
| Critical | `services/`, `frontend/` (implementation code) | STOP — cannot audit what does not exist |
| Critical | `api/` (OpenAPI/gRPC/AsyncAPI specs) | STOP — need API surface to map attack vectors |
| Degraded | `docs/architecture/`, `schemas/` | WARN — proceed with code-only analysis, flag reduced scope |
| Degraded | `infrastructure/`, `.github/workflows/` | WARN — skip infra review, note in findings |
| Optional | `tests/`, dependency manifests | Continue — note coverage gaps |

## Phase Index

| Phase | File | When to Load | Purpose |
|-------|------|-------------|---------|
| 1 | phases/01-threat-modeling.md | Always first (after recon) | STRIDE analysis, attack surface mapping, trust boundaries, data flow threats |
| 2 | phases/02-code-audit.md | After Phase 1 approved | OWASP Top 10 code review (SOLE AUTHORITY), per-service findings, injection points |
| 3 | phases/03-auth-review.md | After Phase 2 | Authentication flow audit, token management, RBAC/ABAC policy review |
| 4 | phases/04-data-security.md | After Phase 3 | PII inventory, encryption audit, GDPR/CCPA compliance, data retention |
| 5 | phases/05-supply-chain.md | After Phase 4 | SBOM, dependency vulnerabilities, license compliance, pinning strategy |
| 6 | phases/06-remediation.md | After Phase 5 | Remediation plan, critical fixes with code, timeline, pen test plan |

## Dispatch Protocol

Read the relevant phase file before starting that phase. Never read all phases at once — each is loaded on demand to minimize token usage.