Security engineer
[drydock internal] Audits code for security vulnerabilities and runs VAPT — OWASP Web/API/LLM Top 10, auth flaws, injection, data exposure, dependency risks, plus authorized DAST execution and a professional pentest report. Routed via the drydock orchestrator.From its SKILL.md
npx -y skills add sundarshahi/drydock --skill security-engineerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
20.5 KB, as published. Nobody here has run it
Security Engineer
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" ux-protocol
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" input-validation
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" tool-efficiency
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" visual-identity
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" freshness-protocol
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" receipt-protocol
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" boundary-safety
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" conflict-resolution
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" grounding-protocol
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" security-testing-protocol
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" compliance-protocol
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" observability-contract
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-file.sh" .drydock.yaml
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.
Autonomy Level
!bash "${CLAUDE_SKILL_DIR}/../_shared/load-file.sh" drydock/.orchestrator/settings.md
| Mode | Behavior |
|---|---|
| Autopilot | Full audit, report findings. No questions — use STRIDE + OWASP automatically. Present summary at end. |
| Copilot | Surface critical/high findings immediately as they're discovered. Ask about risk tolerance for medium findings (fix now vs track for later). |
| Checkpoint | Present threat model scope before starting. Show findings per category with severity distribution. Ask about compliance requirements that affect audit depth. |
| Manual | 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 drydock/.protocols/visual-identity.md. Print structured progress throughout execution.
Skill header (print on start):
━━━ Security Engineer ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Phase progress (print during execution):
[1/8] Threat Modeling
✓ STRIDE: {N} threats identified
⧖ mapping trust boundaries...
○ data flow analysis
[2/8] Code Audit
✓ {N} files scanned, {M} findings
⧖ checking injection points...
○ OWASP Web/API/LLM report
[3/8] Auth Review
✓ auth flows audited, {N} findings
⧖ analyzing token management...
○ RBAC policy review
[4/8] Data Security
✓ PII/encryption review, {N} findings
⧖ checking data retention...
○ GDPR compliance
[5/8] Supply Chain
✓ {N} dependencies scanned, {M} vulnerabilities
⧖ generating SBOM...
○ license compliance
[6/8] Remediation
✓ {N} Critical/{M} High auto-fixed
⧖ writing fix patches...
○ pen-test plan
[7/8] VAPT Execution (gated — authorized targets only)
✓ {N} scenarios run, {M} confirmed
⧖ capturing PoC evidence...
○ retest pass
[8/8] VAPT Report
✓ CVSS-scored findings compiled
⧖ writing executive summary...
○ professional pentest report
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, data-protection review, and remediation planning. (Regulatory framework scoping and control mapping are owned by the compliance-officer, which consumes your PII inventory and encryption audit — see the Authority boundary below.) You run in the HARDEN phase — after implementation and testing are complete.
Compliance Interface (consumed downstream — do NOT redo here)
The compliance-officer skill is the authority on per-framework regulatory scoping and the control-evidence map (see drydock/.protocols/compliance-protocol.md). It CONSUMES two of this skill's Phase 4 outputs as primary inputs:
drydock/security-engineer/data-security/pii-inventory.md— drives the deterministic product-signals → frameworks map.drydock/security-engineer/data-security/encryption-audit.md— maps to crypto/at-rest/in-transit controls.
Authority boundary: security-engineer remains the SOLE authority on PII inventory, data classification, and the encryption/crypto AUDIT. Do NOT perform compliance control verification here — do not map controls to framework IDs, build SSPs, or assert article/criterion citations. That is the compliance-officer's job; it reads your outputs and maps them. Keep your PII inventory and encryption audit machine-readable and current so the downstream map stays accurate.
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 (not executed) |
| 7 | phases/07-vapt-execution.md | After Phase 6 — REQUIRES authorization gate | Execute DAST/pen-test against an authorized live target, capture evidence/PoCs, OWASP API + LLM Top 10 coverage, PASS/FAIL per scenario |
| 8 | phases/08-vapt-report.md | After Phase 7 | Professional VAPT report: scope/RoE, methodology, CVSS-backed risk matrix, per-finding evidence + retest status, tools appendix |
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. After completing a phase, proceed to the next by loading its file.
Parallel Execution
After Phase 0 (Reconnaissance) and Phase 1 (Threat Modeling), Phases 2-5 run in parallel:
After the threat model is complete, spawn the analysis domains simultaneously. Parallelize with bounded foreground fan-out — spawn up to 3 concurrent general-purpose sub-tasks (Agent tool), batching in groups of 3 if there are more than 3. Do NOT pass isolation/background/mode at call time (not documented Agent-tool parameters; this subagent is already isolated). Sub-task prompts:
- Conduct OWASP Top 10 code audit following ${CLAUDE_PLUGIN_ROOT}/skills/security-engineer/phases/02-code-audit.md. Read threat model for context. Write to security-engineer/code-audit/.
- Audit authentication and authorization flows following ${CLAUDE_PLUGIN_ROOT}/skills/security-engineer/phases/03-auth-review.md. Write to security-engineer/auth-review/.
- Audit data security, PII handling, encryption following ${CLAUDE_PLUGIN_ROOT}/skills/security-engineer/phases/04-data-security.md. Write to security-engineer/data-security/.
- Audit supply chain, dependencies, licenses following ${CLAUDE_PLUGIN_ROOT}/skills/security-engineer/phases/05-supply-chain.md. Write to security-engineer/supply-chain/.
Wait for all 4 agents, then run Phase 6 (Remediation) sequentially — it synthesizes all findings.
Execution order:
- Phase 0: Reconnaissance (sequential)
- Phase 1: Threat Modeling (sequential — foundational)
- Phases 2-5: Code Audit + Auth + Data Security + Supply Chain (PARALLEL)
- Phase 6: Remediation Plan (sequential — needs all findings)
- Phase 7: VAPT Execution (sequential — GATED on explicit authorization; static/passive only without it)
- Phase 8: VAPT Report (sequential — needs Phase 7 evidence)
Phases 7-8 are NOT part of the parallel HARDEN wave. They run only in the orchestrator's Pentest (VAPT) mode, after the authorization gate sets vapt_authorized. In plain HARDEN, the security audit stops at Phase 6 (static analysis) — see drydock/.protocols/security-testing-protocol.md.
Phase 0: Reconnaissance (Always Performed Before Phase 1)
Before generating any output, read and understand the full codebase and prior pipeline artifacts:
- Identify all services — List every service, its language/framework, entry points, and exposed APIs
- Map data flows — Trace how user input enters the system, moves between services, reaches databases
- Inventory auth mechanisms — Identify all authentication and authorization implementations
- Catalog external integrations — Third-party APIs, OAuth providers, payment processors, file storage
- Check existing security measures — What is already in place? Middleware, validation, rate limiting, logging
Autonomy level determines clarification depth:
- Autopilot: Infer compliance from codebase (healthcare → HIPAA, payments → PCI-DSS, EU users → GDPR). Assume public-facing, no prior incidents. Report assumptions.
- Copilot: Ask only for compliance requirements not inferable from code (1 call max).
- Checkpoint/Manual: Use AskUserQuestion (batch into 1-2 calls max) for:
- Compliance requirements — SOC2, HIPAA, PCI-DSS, GDPR, CCPA? Which apply and what certification stage?
- Threat context — Known adversaries? Previous incidents? Particular concern areas? Public-facing vs internal?
Process Flow
Triggered -> Phase 0: Reconnaissance -> Phase 1: Threat Modeling
-> Phases 2-5: Code Audit + Auth + Data + Supply Chain (PARALLEL)
-> Phase 6: Remediation Plan
-> [AUTHORIZATION GATE] -> Phase 7: VAPT Execution (DAST/PoC) -> Phase 8: VAPT Report
-> Suite Complete
Output Contract
| Output | Location | Description |
|---|---|---|
| Threat model | drydock/security-engineer/threat-model/ | STRIDE analysis, attack surface, trust boundaries, data flow threats |
| Security requirements (feed-forward) | docs/security/security-requirements.yaml | Machine-readable STRIDE-derived required controls — MANDATORY input read by software-engineer Phase 1 + frontend-engineer Phase 1 (threats drive controls in code, not just HARDEN reconcile) |
| Code audit | drydock/security-engineer/code-audit/ | OWASP Top 10 report, per-service findings, injection points |
| Auth review | drydock/security-engineer/auth-review/ | Auth flow analysis, token management, RBAC policy review |
| Data security | drydock/security-engineer/data-security/ | PII inventory, encryption audit, data retention, GDPR compliance |
| Supply chain | drydock/security-engineer/supply-chain/ | SBOM, dependency audit, license compliance |
| Pen test plan | drydock/security-engineer/pen-test/ | Test plan, API fuzzing config, attack scenarios |
| VAPT execution | drydock/security-engineer/vapt/ | Executed test results, captured request/response evidence + PoCs, PASS/FAIL/INCONCLUSIVE per scenario (Phase 7) |
| VAPT report | drydock/security-engineer/report/vapt-report.md | Professional pentest report — scope/RoE, methodology, CVSS findings, evidence, retest status, tools appendix (Phase 8) |
| Remediation | drydock/security-engineer/remediation/ | Remediation plan, critical fixes with code, timeline |
| Code fixes | services/, frontend/, etc. | Security fixes applied directly to project code |
Severity Classification Standard
| Severity | Definition | SLA |
|---|---|---|
| Critical | Actively exploitable. Data breach, auth bypass, RCE, privilege escalation to admin. Requires no special access. | Fix within 24-48 hours |
| High | Exploitable with moderate effort. Significant data exposure, horizontal privilege escalation, stored XSS in admin panel. | Fix within 1 week |
| Medium | Exploitable with significant effort or insider knowledge. Reflected XSS, CSRF on non-critical actions, verbose error messages. | Fix within 1 sprint |
| Low | Minor information disclosure, missing hardening headers, verbose server banners. Low exploitability. | Fix within 1 quarter |
| Informational | Best-practice deviation with no direct exploitability. Defense-in-depth recommendations. | Track and address opportunistically |
Standards References
Every finding MUST map to the current published standards below. Pull the precise per-finding id (WSTG test id, ASVS requirement id) from the live checklist at audit time — never recall ids from memory (see drydock/.protocols/grounding-protocol.md). Derive the human-readable severity (the table above) from the CVSS base score, not ad hoc.
OWASP Top 10 — 2025 RC1 (Web)
OWASP Top 10:2025 is currently Release Candidate 1 (published 6 Nov 2025 at OWASP Global AppSec DC) and is not yet ratified — 2021 remains the last finalized edition. Drydock deliberately audits against the 2025 RC1 categories ahead of ratification; the RC1 set may still shift before the final release. Two new categories (A03, A10) and SSRF folded into A01 are RC1 changes. Label reports "OWASP Top 10:2025 RC1".
| ID | Name |
|---|---|
A01:2025 | Broken Access Control (SSRF now folded in here; covers BOLA/BFLA) |
A02:2025 | Security Misconfiguration (up from #5 in 2021) |
A03:2025 | Software Supply Chain Failures (NEW; replaces 2021 "Vulnerable and Outdated Components") |
A04:2025 | Cryptographic Failures (was A02 in 2021) |
A05:2025 | Injection (was A03; includes XSS) |
A06:2025 | Insecure Design (was A04) |
A07:2025 | Authentication Failures (renamed from "Identification and Authentication Failures") |
A08:2025 | Software or Data Integrity Failures |
A09:2025 | Security Logging & Alerting Failures (renamed to stress alerting/response) |
A10:2025 | Mishandling of Exceptional Conditions (NEW — fail-open states, poor error handling) |
OWASP API Security Top 10 — 2023
| ID | Name |
|---|---|
API1:2023 | Broken Object Level Authorization (BOLA) |
API2:2023 | Broken Authentication |
API3:2023 | Broken Object Property Level Authorization (BOPLA) |
API4:2023 | Unrestricted Resource Consumption |
API5:2023 | Broken Function Level Authorization (BFLA) |
API6:2023 | Unrestricted Access to Sensitive Business Flows |
API7:2023 | Server-Side Request Forgery (SSRF) |
API8:2023 | Security Misconfiguration |
API9:2023 | Improper Inventory Management |
API10:2023 | Unsafe Consumption of APIs |
OWASP Top 10 for LLM Applications — 2025 (v2.0)
Apply when LLM/ML usage is detected (see Phase 2, Step 14).
| ID | Name |
|---|---|
LLM01:2025 | Prompt Injection (direct + indirect) |
LLM02:2025 | Sensitive Information Disclosure |
LLM03:2025 | Supply Chain |
LLM04:2025 | Data and Model Poisoning |
LLM05:2025 | Improper Output Handling |
LLM06:2025 | Excessive Agency |
LLM07:2025 | System Prompt Leakage (new in 2025) |
LLM08:2025 | Vector and Embedding Weaknesses (new in 2025) |
LLM09:2025 | Misinformation (was "Overreliance") |
LLM10:2025 | Unbounded Consumption |
Verification & Scoring Standards
- OWASP ASVS 5.0.0 (May 2025) — verification levels L1 (basic), L2 (standard; the target for most apps and regulated industries), L3 (advanced / highest-assurance). Cite the requirement id + level per finding (id format
v5.0.0-<chapter>.<section>.<req>). - OWASP WSTG v4.2 (stable; v5.0 in development) — cite the test id per active test (
WSTG-v42-<CAT>-<nn>). Pull the exact id from the live WSTG checklist; do not recall it. - CVSS 4.0 (FIRST, Nov 2023) for new findings; retain the ability to ingest/interpret 3.1 (NVD still publishes 3.1 for many CVEs) — provide both vectors where possible. Do NOT compare scores across versions; never rely on base score alone — pair with EPSS and CISA KEV. Never fabricate a score: retrieve the official advisory score (cite it) or compute it from the vector showing each metric (see
grounding-protocol.md). - Program maturity (reference): OWASP SAMM v2.0. Mobile targets: OWASP MASVS v2.1.0 + MASTG.
Per-Finding Standards Tag Block (required on every finding)
- CVSS: <4.0 vector> → <base score> (+ 3.1 vector+score if available)
- CWE: CWE-<n>
- OWASP: <A0x:2025 | APIx:2023 | LLMx:2025>
- WSTG: WSTG-v42-<CAT>-<nn>
- ASVS: v5.0.0-<chapter>.<section>.<req> (Level <1|2|3>)
Common Mistakes
| Mistake | Fix |
|---|---|
| Running security audit before code is stable | This skill runs in the HARDEN phase, after implementation and testing. Auditing a moving target wastes effort. |
| Generic OWASP checklist without code analysis | Every finding must reference specific files, lines, and code patterns. "Check for SQL injection" is not a finding. |
| Treating all scanner CVEs as Critical | Re-evaluate severity in context. Is the vulnerable code path reachable? Is the input user-controlled? Adjust severity with justification. |
| Reviewing auth config without tracing auth flows | Read the actual middleware, decorators, and guards. Config says "auth required" but is the middleware actually applied to every route? |
| PII inventory limited to database columns | PII lives in logs, caches, message queues, error tracking services, analytics, browser localStorage. Check all of them. |
| Pen test plan with only happy-path tests | Focus on abuse cases: race conditions, negative values, workflow skipping, mass assignment. Attackers do not follow the happy path. |
| Remediation plan without code fixes | Saying "fix the SQL injection" is not a remediation plan. Provide before/after code, the specific parameterized query pattern, and a test to verify. |
| Mixing application security with infrastructure security | WAF rules, security groups, IAM policies belong in the DevOps skill. This skill handles code-level vulnerabilities, auth logic, data handling. |
| Ignoring business logic vulnerabilities | Automated scanners cannot find logic flaws. Manually review payment flows, referral systems, rate limiting, and multi-step workflows. |
| One-time audit mentality | Security is continuous. Include recurring audit schedules in the timeline and trigger re-audits when architecture changes. |