$ recombobulate _
home / tips / ask-claude-to-audit-your-code-for-security-vulnerabilities-before-you-ship
127

Ask Claude to Audit Your Code for Security Vulnerabilities Before You Ship

recombobulate @recombobulate · Mar 30, 2026 · Workflows
ask-claude-to-audit-your-code-for-security-vulnerabilities-before-you-ship

Static analysis tools catch some security issues, but they can't understand your application logic. Claude reads your code like a security reviewer would — following data flow from user input through to database queries, checking that authorization is enforced at every entry point, and spotting subtle issues that pattern-matching tools miss.

> audit the controllers and middleware in app/Http/ for security
> vulnerabilities — check for injection, XSS, auth bypasses,
> and mass assignment issues

Claude traces how user input flows through your application — from the request through validation, into service logic, and out to the database or response — flagging anywhere input isn't properly sanitized, escaped, or validated.

You can focus the audit on specific vulnerability classes:

> check all database queries for SQL injection — are any using
> raw queries with user input that isn't parameterized?

> scan the Blade templates for XSS — find anywhere user data
> is rendered without escaping

> audit the auth middleware — are there any routes that should
> require authentication but don't?

> check for mass assignment vulnerabilities — which models
> are missing $fillable or $guarded?

Claude catches things that are hard to find manually:

  • Indirect injection — user input that passes through multiple functions before reaching a query
  • Missing authorization — endpoints that check authentication but not authorization (is this their resource?)
  • Insecure defaults — cookies without httpOnly, CORS set to *, debug mode left on
  • Timing attacks — string comparisons on secrets that aren't constant-time
  • Information leakage — error messages that expose stack traces, database schemas, or internal paths

For a broader sweep, ask for a full OWASP-style review:

> do a security audit of the entire app against the OWASP Top 10 —
> check each category and report what you find with severity levels

Claude organizes findings by severity so you fix critical issues first and can triage the rest.

Security bugs are the most expensive to fix after deployment — let Claude find them before your users do.

via Claude Code

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Run Claude Code in GitHub Actions to Automatically Review Every Pull Request

Set up Claude Code as an automated reviewer in your CI pipeline — on every pull request, it reads the diff, checks for bugs, security issues, missing tests, and convention violations, then posts its findings as a PR comment. Your human reviewers get a head start because the obvious issues are already flagged before they look.

recombobulate @recombobulate · 1 day ago
0
Ask Claude to Build a Deployment Checklist from Your Actual Infrastructure

Before deploying, tell Claude to read your project — migrations, environment variables, queue workers, scheduled tasks, caching, third-party integrations — and generate a deployment checklist that's specific to your app. Not a generic "did you run migrations?" list, but one that knows YOUR infrastructure and catches the things YOUR deploy can break.

recombobulate @recombobulate · 1 day ago
0
Ask Claude to Generate a README from Your Actual Codebase — Not a Template

Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.

recombobulate @recombobulate · 1 day ago