Skip to main content

Secure Code Review Checklist Generator

Generate a stack-specific secure code review checklist with OWASP Top 10 coverage, grep patterns, severity ratings, and pre-commit hook configs.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt

                                

What this prompt does

This prompt generates a structured security review checklist tailored to your exact stack — not a generic OWASP summary, but a checklist that knows your language's idioms, your framework's known pitfalls, and your authentication mechanism's specific failure modes. The ten-category structure maps directly to where real vulnerabilities live in production code, and the grep pattern requirement forces the output to be immediately actionable rather than theoretical.

What makes it work is the combination of [language], [framework], and [data_sensitivity] together. A high sensitivity rating on a Laravel app with JWT auth produces different cryptography and logging warnings than the same stack with [data_sensitivity]: internal. The [framework]-Specific category at the end is deliberately open-ended — it catches things like Laravel's mass assignment guard bypasses, Django's CSRF exempt decorator misuse, or Express middleware ordering bugs that no generic list would surface.

The prompt also asks for the secure alternative alongside each vulnerability, so reviewers don't just know what's wrong — they know what right looks like in that language.

When to use it

  • Before merging a feature branch that touches auth, file uploads, or external API calls.
  • When onboarding a junior developer to security review — gives them a concrete checklist they can follow without deep expertise.
  • During a pre-release security pass on an MVP before it handles real user data.
  • When your team inherits a legacy codebase and needs to triage where to start.
  • After a dependency upgrade touching auth libraries or cryptographic packages.
  • When setting up a new repository's pre-commit hooks and security gates from scratch.

Example output

For [language]: PHP, [framework]: Laravel, [app_type]: SaaS API, [auth_type]: JWT + OAuth2, [data_sensitivity]: high:

**Category: Authentication — JWT Issues**
What to look for: Algorithm confusion attacks (HS256 vs RS256), 'none' algorithm
acceptance, missing expiry validation.

Grep pattern:
  grep -rn --include="*.php" --exclude="*.blade.php" \
    "JWT::decode\|'alg'.*'none'\|JWT.*verify.*false" app/

Secure alternative:
  // RS256 is asymmetric — decode with the PUBLIC key, not a shared secret
  Firebase\JWT\JWT::decode($token, new Key($publicKey, 'RS256'));

Severity if exploited: Critical — full authentication bypass.

Recommended tools:
  - enlightn/enlightn (Laravel-specific audit suite, ./vendor/bin/enlightn --ci)
  - enlightn/security-checker (composer.lock advisory check,
    ./vendor/bin/security-checker security:check)
  - spatie/laravel-csp (Content Security Policy headers)

Pre-commit hook:
  ./vendor/bin/enlightn --ci

Pro tips

  • Set [data_sensitivity] honestly — the model calibrates severity ratings and logging warnings based on this. high surfaces PII logging in debug output that low skips.
  • Before treating generated grep patterns as gospel, run them against your actual codebase and check the match count. Patterns that return hundreds of hits need tightening — add --include="*.php" --exclude="*.blade.php" to scope PHP-only files and eliminate Blade template noise from the start.
  • For the [framework]-Specific category, if your framework is niche (e.g., Filament, Livewire), name both the meta-framework and the base: [framework]: Laravel/Livewire 3. You get wire:model mass-assignment and lazy-loading bypass warnings the generic Laravel checklist misses.
  • Pair this prompt's output with your CI pipeline — copy the generated pre-commit hook config directly into .githooks/pre-commit and the linting tools into your composer.json dev dependencies as a single pass.
  • Re-run with a different [auth_type] if your app supports multiple auth paths (e.g., API key + session). Each auth mechanism has its own failure surface and a single checklist will miss the intersections.

Frequently Asked Questions

Does this prompt replace a professional penetration test?
No. It generates a reviewer checklist and grep-based static analysis patterns — useful for catching common vulnerabilities during code review, but it does not simulate runtime exploitation, test infrastructure, or cover chained attack paths. Use it to raise your baseline before engaging a pentester, not instead of one.
How specific should I be with [auth_type] — does 'JWT' work, or do I need more detail?
More detail produces better output. 'JWT + RS256 with refresh tokens stored in httpOnly cookies' tells the model exactly which attack surfaces to address (key rotation, cookie flags, refresh token rotation on use). 'JWT' alone is fine but generates broader, less targeted warnings. If your app mixes auth mechanisms — say, JWT for the API and session cookies for the web UI — run the prompt twice, once per mechanism.
Can I use this for a code review of a file I paste in, rather than a whole codebase?
The prompt as written generates a checklist and grep patterns, not a line-by-line review of specific code. If you want it to review actual code, paste the file after the generated checklist and ask it to apply the checklist to that specific file — that two-step workflow gets you targeted findings without losing the structured framework.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in Cybersecurity Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support