nodefony-security-review

Audits Nodefony code diffs and runs red-team attack campaigns against security components.

Updated Dec 19, 2023
One-click install
npx skills add https://github.com/nodefony/nodefony-core --skill nodefony-security-review-nodefony
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodefony-security-review
Source: https://github.com/nodefony/nodefony-core/tree/main/.claude/skills/nodefony-security-review
Command: npx skills add https://github.com/nodefony/nodefony-core --skill nodefony-security-review-nodefony

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Security regressions in a fullstack framework slip through when reviews are ad hoc: unbound SQL, leaked credentials in logs, RFC violations in HTTP/WS handling, and authorization gaps across the shared HTTP+WebSocket pipeline. This Skill enforces a rigorous, repeatable security gate before every commit and proactively attacks security components to prove they resist real threats. ## Core Features & Use Cases - Pre-commit REVIEW mode: Scans only the changed diff against a categorized checklist (injection bindings, secret redaction, RFC compliance for HTTP/WS/cookies/CORS/JWT, Zero Trust 403 defaults, zero any typing, dependency vulnerability audit) and outputs a per-category verdict with blockers. - RED/BLUE-TEAM mode: Runs two-pass attack campaigns on a security brick (auth, JWT, CSRF, CORS, sessions) — threat-first matrix designed before reading code to avoid confirmation bias, then code-first coverage pass — producing <brick>.attack.test.ts files and a factual per-vector report. - Framework-specific attack design: Conceives attacks unique to Nodefony's architecture (shared HTTP+WS pipeline, token in ALS, api.request bridge, WS channels, firewall zones, DI scopes, trust-proxy) beyond generic OWASP lists, with a find → fix → re-prove cycle. - Use Case: Before committing a change to the session module, run a security review to verify cookies carry HttpOnly; Secure; SameSite, no password hashes reach the profiler logs, and all SQL uses bound parameters — then get a commit/no-commit verdict. ## Quick Start Ask the agent to run a security review of the current uncommitted diff before committing, or request a red-team attack campaign on a specific security brick such as JWT authentication.

Frequently Asked Questions about nodefony-security-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a security review before committing code?

Invoke the review mode on your uncommitted diff; it scans only changed TypeScript files with targeted grep checks for injection, leaked secrets, RFC violations, auth gaps, and unsafe typing. The output is a per-category verdict with blockers that must be fixed before committing.

How to red-team test an authentication module?

Use the RED/BLUE-TEAM mode: first build a threat matrix from OWASP/RFC sources and framework-specific attack surfaces before reading the code, then run attack tests against a real store or provider. Found flaws are fixed and re-proven, followed by a coverage pass on remaining branches.

What security checks does the review cover for SQL injection?

It verifies all queries use bound parameters, flagging raw interpolated templates or string concatenation passed to database calls as blockers. Drizzle's tagged sql templates are considered safe because they bind interpolated values automatically.

Does it check dependencies for known vulnerabilities?

Yes, when package.json or the lockfile changes, it runs npm audit against OSV and GitHub Advisory databases. High or critical severity vulnerabilities in runtime dependencies are treated as blockers requiring a patch, pin, or alternative.

Why must attack tests be written before reading the implementation code?

Reading the implementation first creates confirmation bias, causing tests to prove what the code does rather than what it should resist. The threat-first pass designs attacks from the architecture and OWASP/RFC sources so a failing test reveals a genuine vulnerability.

What are the limitations of the red-team mode for crypto-delegated components?

When a brick delegates cryptography to an audited library like WebAuthn verification, the mode proves the surrounding wiring (single-use challenges, origin checks, counter storage) and reads the delegation instead of forging valid cryptographic inputs. The assumed limit is documented in the report.