PluginBench
Skill
Pass
Audit score 90

security-scan

codewithmukesh/dotnet-claude-kit

Deep static security scan for .NET apps across 6 layers: packages, secrets, OWASP patterns, auth, CORS, and data protection.

What is security-scan?

Runs defense-in-depth static analysis across vulnerable packages, hardcoded secrets, OWASP code patterns, authentication configuration, CORS policy, and data protection. Produces severity-rated findings mapped to OWASP Top 10:2025 with specific remediation steps. Use before release, after dependency updates, or during security audits.

  • Scans for vulnerable NuGet packages and transitive dependencies
  • Detects hardcoded secrets and sensitive credentials in source and config files
  • Identifies OWASP code patterns: SQL injection, unsafe HTML rendering, weak crypto, IDOR
  • Audits endpoint authentication posture and JWT validation settings
  • Checks CORS configuration for wildcard origins and credential misuse
  • Flags PII in logs and plaintext sensitive data storage

How to install security-scan

npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill security-scan
Prerequisites
  • dotnet CLI installed and project accessible
  • Read references/scan-layers.md for detection patterns and OWASP mappings before executing
Claude Code
Cursor
Windsurf
Cline

How to use security-scan

  1. 1.Choose which layers to scan based on your scenario (all 6 for pre-release, specific layers for targeted reviews)
  2. 2.Execute the scan by running the appropriate layer checks (package vulnerability scan, secrets pattern matching, code analysis)
  3. 3.Review findings and rate severity contextually—skip test fixtures and dev-only values, reserve Critical for exploitable-now issues
  4. 4.Generate report with summary table, per-layer status, and detailed findings including file:line, OWASP category, impact, and remediation code
  5. 5.Note that this is static analysis only and does not replace a penetration test

Use cases

Good for
  • Pre-release security gate before shipping to production
  • Security audit after dependency updates or authentication system changes
  • Penetration test preparation to fix static issues beforehand
  • Incident response and quarterly security reviews
  • Public API exposure assessment across all 6 layers
Who it's for
  • Backend engineers building .NET applications
  • Security engineers conducting code reviews
  • DevOps teams implementing pre-release gates
  • Development teams preparing for external penetration tests

security-scan FAQ

What's the difference between this and a penetration test?

This is static analysis that catches known patterns: hardcoded secrets, SQL injection, weak crypto, missing auth attributes. It misses business-logic flaws, complex authorization bypasses, and runtime-only vulnerabilities. Use it pre-pentest to fix low-hanging fruit.

Should I flag test fixtures and dev-only secrets?

No. Skip or mark INFO, not HIGH. Test-fixture secrets and appsettings.Development.json values are expected. Reserve findings for production-exposed issues.

How do I choose which layers to scan?

Scan all 6 for pre-release gates, incident response, and quarterly reviews. For targeted scans: Layer 1 after dependency updates, Layers 3–5 for new endpoints, Layer 4 for auth changes, Layer 2 for config changes, Layer 6 for logging changes.

What if an endpoint has no explicit [Authorize] attribute?

Flag as MEDIUM. The behavior depends on ambient global policy. Make intent explicit per endpoint with [Authorize] or [AllowAnonymous] to avoid confusion and security gaps.

Can I use this instead of a security code review?

No. This catches patterns but not all vulnerabilities. Pair it with manual review, the authentication and configuration skills for deep remediation, and a pentest before production.

Full instructions (SKILL.md)

Source of truth, from codewithmukesh/dotnet-claude-kit.


name: security-scan description: > Deep security scanning for .NET applications across 6 layers: vulnerable packages, secrets detection, OWASP code patterns, auth configuration, CORS policy, and data protection. Produces severity-rated findings with specific remediation steps. Load this skill when: "security scan", "security audit", "check for vulnerabilities", "find secrets", "OWASP", "auth review", "CORS check", "security review", "penetration test prep", "CVE check", "vulnerability scan", "hardcoded password", "data protection", "security posture".

/security-scan — 6-Layer Security Pipeline

What

Runs a defense-in-depth static scan across 6 layers. A project with zero CVEs can still have hardcoded secrets, SQL injection, and missing auth — each layer catches a different vulnerability class. Findings map to the OWASP Top 10:2025 taxonomy and are rated Critical/High/Medium/Low by exploitability, impact, and exposure — a Critical SQL injection on a public endpoint outranks a Low info-disclosure on an admin page.

Detection patterns, OWASP mappings, remediation code, and the report template live in references/scan-layers.md — read it before executing.

Honesty rule: this is static analysis, not a penetration test. It catches known patterns but misses business-logic flaws, complex authorization bypasses, and runtime-only vulnerabilities. Every report states this.

When

  • Pre-release security gate — full scan, non-negotiable before production
  • "Security scan", "security audit", "find secrets", "CVE check", "OWASP"
  • After a dependency update (Layer 1), auth changes (Layer 4), config changes (Layer 2), or logging changes (Layer 6)
  • Pre-pentest preparation — fix static issues before paying for a pentest
  • Incident response and quarterly reviews

How

Step 1: Choose Layers

ScenarioLayers
Pre-release gate / pentest prep / incident / quarterlyAll 6
After dependency update1
New endpoint added3, 4, 5
Auth system changes4
Config file changes2
Logging changes6
Public API exposure3, 4, 5
Internal-only service1, 2, 3

Step 2: Execute the Layers

Read references/scan-layers.md for the detection patterns per layer. Delegate deep auth and secrets review to the security-auditor agent, pairing the authentication and configuration skills.

#LayerOWASP 2025Method
1Package vulnerabilitiesA03 Supply Chaindotnet list package --vulnerable --include-transitive
2Secrets detection—Pattern scan over .cs/.json/.yml/.xml/.config
3OWASP code patternsA05 Injection, A08 Integrity, A04 Crypto, A01 Access ControlSource scan: raw SQL, Html.Raw, BinaryFormatter, MD5/SHA1, IDOR
4Auth configurationA07 Authentication, A01 Access Controlget_endpoint_map — every route's auth posture in one call; flag unmarked endpoints; then JWT validation settings
5CORS policyA02 MisconfigurationWildcard origins, credentials combos, method/header breadth
6Data protectionA04 Crypto, A09 Logging & AlertingPII in logs, over-broad responses, plaintext sensitive storage

Step 3: Rate with Context

Severity must match actual risk — over-classification causes alert fatigue and buries the real Critical:

  • Test-fixture "secrets" and appsettings.Development.json values are expected — skip or mark INFO, don't flag as HIGH
  • A missing XML comment is never a security finding
  • Reserve Critical for exploitable-now issues: injection on public endpoints, exposed production secrets, auth bypass

Step 4: Report

Every finding: [SEVERITY] file:line — title, OWASP category, what's wrong, impact if exploited, and remediation code (before/after). Produce the summary table + per-layer status table from the reference template, prefixed with the static-analysis disclaimer.

Example

User: /security-scan before we ship

Claude: Running all 6 layers...

| Layer | Status | Findings |
|-------|--------|----------|
| 1. Packages | PASS | 0 CVEs (142 packages incl. transitive) |
| 2. Secrets | PASS | 0 real secrets (2 dev-only values skipped) |
| 3. OWASP Patterns | FAIL | 1 SQL injection |
| 4. Auth Config | WARN | 2 endpoints missing explicit auth attributes |
| 5. CORS | PASS | Explicit origins from configuration |
| 6. Data Protection | WARN | Customer email logged at Information level |

[HIGH] SearchOrders.cs:34 — SQL Injection (A05:2025)
  FromSqlRaw($"...LIKE '%{search}%'") → attacker controls the query.
  Fix: db.Orders.Where(o => EF.Functions.Like(o.Name, $"%{search}%"))

[MEDIUM] OrderEndpoints.cs:18,31 — no [Authorize]/[AllowAnonymous]; behavior
  depends on ambient global policy. Make intent explicit per endpoint.

[LOW] OrderPlacedHandler.cs:22 — PII in logs (A09:2025). Log CustomerId, not email.

Note: static analysis only — this does not replace a penetration test.

Related

  • references/scan-layers.md — detection patterns, OWASP 2025 mappings, report template
  • /verify — Phase 5 runs a lightweight version of this scan per change set
  • /health-check — Dimension 7 (Security Posture) is the spot-check version
  • authentication / configuration — remediation patterns for Layers 4 and 2