CommunitySchreiben & Editierengithub.com

robcsaszar/sentinel

A static security audit skill for Claude Code — OWASP-style findings with file:line evidence and fixes

Was ist sentinel?

sentinel is a Claude Code agent skill that a static security audit skill for Claude Code — OWASP-style findings with file:line evidence and fixes.

Funktioniert mitClaude Code~Codex CLI~Cursor
npx skills add robcsaszar/sentinel

Installed? Explore more Schreiben & Editieren skills: steipete/notion, affaan-m/seo, affaan-m/brand-voice · View all 6 →

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Security Audit Skill

Perform a rigorous static security audit of a web application codebase. Produces a summary table (PASS / FAIL / MANUAL-REVIEW) and per-finding blocks with file:line evidence, risk description, and remediation code.


Phase 1 — Stack Triage

Before scanning any code, answer these questions by reading package.json, config files, and README:

  1. Framework: SvelteKit / Next.js / Express / FastAPI / etc.
  2. Database driver: parameterized (libsql, pg, prisma) vs. raw string (low-level drivers)
  3. Auth mechanism: JWT / HMAC tokens / sessions / OAuth
  4. Deploy target: Fly.io / Cloudflare / Vercel / bare Node — determines which IP header to trust for rate-limiting and audit logs (Fly-Client-IP vs CF-Connecting-IP vs X-Forwarded-For); trusting the wrong one lets an attacker spoof their source IP
  5. File uploads: yes/no — if yes, where stored (local FS, S3-compatible, CDN)
  6. External outbound calls: email API, webhooks, media fetch — potential SSRF surfaces

State your stack summary in one paragraph before Phase 2. Wrong assumptions here produce wrong findings.


Phase 2 — Scan

MANDATORY READ: references/security-checklist.md

Do NOT load references/security-checklist.md for targeted single-endpoint reviews — it will expand scope beyond the task. Load it only for full-codebase audits.

Work through every category in the checklist in order — skipping a group requires a written reason in the report.

For each category:

  • Read the relevant source file(s). Do not mark PASS from memory.
  • If the file doesn't exist, mark MANUAL-REVIEW with a note.
  • Record the verdict (PASS / FAIL / MANUAL-REVIEW) and one-line evidence note.

If the repo is too large to read every file, prioritise by risk: auth flows and token handling first, then input/output boundaries, then dependency config. Note which files were skipped.


Phase 3 — Classify

Review your raw scan notes. For each item, apply the verdict rules:

  • PASS — you read the relevant code and confirmed the control is in place. Cite file:line.
  • FAIL — you found a confirmed, exploitable gap. You have a snippet. You can write a fix.
  • MANUAL-REVIEW — the verdict requires runtime context, infrastructure access, or human judgment (e.g. "verify this token has read-only scope on the Turso dashboard").

Before assigning a verdict, ask: "Can I write the remediation code right now, using only what I've read?" Yes → FAIL. No → MANUAL-REVIEW.

Do not downgrade a FAIL to MANUAL-REVIEW to soften the report.


Phase 4 — Report

Summary table first:

#CategoryStatusNotes
1SQL injectionPASSParameterized throughout
2XSSFAIL{@html} on user-controlled field — see finding

Then, for every FAIL and MANUAL-REVIEW, a finding block:

### [N]. CATEGORY — FAIL
**File:** `src/lib/example.ts:42`
**Snippet:**
  cookies.set(name, token, { httpOnly: true })   // ← missing Secure flag
**Risk:** Cookie transmitted over plain HTTP in non-production; captured by passive MITM.
**Fix:**
  cookies.set(name, token, {
    httpOnly: true,
    secure: process.env.NODE_ENV === "production",
    sameSite: "lax",
  });

MANUAL-REVIEW blocks use the same format but replace Fix with Action describing what the human must verify and where.

PASS items appear only in the summary table — no blocks.


NEVER

  • NEVER mark PASS without reading the file Instead: Read the file, cite file:line in the evidence note. Why: Memory-based PASS verdicts produce false assurance — the whole point of the audit is evidence.

  • NEVER mark FAIL without a code snippet Instead: Quote the exact vulnerable line(s). If you can't find a snippet, it's MANUAL-REVIEW. Why: A FAIL without evidence is noise; developers need the exact location to fix it.

  • NEVER conflate FAIL and MANUAL-REVIEW Instead: FAIL = you can write the fix right now. MANUAL-REVIEW = you cannot, and you say why. Why: Mixing them destroys the actionability of the report.

  • NEVER skip Phase 1 stack triage Instead: Read package.json and one config file before scanning anything. Why: Which IP header to trust, which CSP approach is valid, and which auth model applies all depend on the stack — wrong assumptions cascade into wrong verdicts.

  • NEVER report remediation code that doesn't match the project's framework/library Instead: Write fixes using the exact APIs already in use (e.g. SvelteKit cookies.set, not res.setHeader). Why: Generic remediation that doesn't compile is ignored; framework-specific fixes get merged.

  • NEVER write a finding block for a category you haven't read the source file for Instead: Open the file, read it, then write the block. Why: A finding block without file evidence is assertion, not audit — it erodes trust in the whole report when it turns out to be wrong.

  • NEVER silently skip files in a large repo Instead: Prioritise by risk (auth/token handling → input/output boundaries → dependency config) and explicitly list every skipped file in the report. Why: Silent skips make the audit's coverage claims unverifiable — a clean report on an incomplete scan reads as a false all-clear.

Verwandte Skills

steipete/notion

Notion CLI/API for pages, Markdown content, data sources, files, comments, search, Workers, and raw API calls.

community

affaan-m/seo

Audit, plan, and implement SEO improvements across technical SEO, on-page optimization, structured data, Core Web Vitals, and content strategy. Use when the user wants better search visibility, SEO remediation, schema markup, sitemap/robots work, or keyword mapping.

community

affaan-m/brand-voice

Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and social workflows. Use when the user wants voice consistency without generic AI writing tropes.

community

affaan-m/crosspost

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

community

affaan-m/x-api

X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.

community

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

community