
I Built a Security Header Auditor in ~100 Lines of Node.js
I Built a Security Header Auditor in ~100 Lines of Node.js (No Dependencies) Last week I got tired of copy-pasting the same curl command every time I checked a new bug bounty target: curl -s -I https://target.com | grep -iE "content-security-policy|strict-transport-security|..." So I built headers-check — a CLI that audits all seven security headers, validates their values (not just their presence), gives a 0–100 score, and prints a grade. You can run it right now with: npx github:kai-learner/headers-check example.com This is the walkthrough of how I built it. The whole core is ~100 lines of vanilla Node.js with zero runtime dependencies (except chalk for color). If you want a real project to learn from, this is a good one. What It Does $ npx github:kai-learner/headers-check github.com Security Header Audit — https://github.com/ ───────────────────────────────────────────── ✅ Content-Security-Policy default-src 'none'; base-uri 'self'; ... ✅ Strict-Transport-Security max-age=31536000;
Continue reading on Dev.to Tutorial
Opens in a new tab




