SE

security-review

Audits backend code for security vulnerabilities, secrets, and auth bypasses.

Install

mkdir -p .claude/skills/security-review-prav-raghu && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14465" && unzip -o skill.zip -d .claude/skills/security-review-prav-raghu && rm skill.zip

Installs to .claude/skills/security-review-prav-raghu

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Security audit for backend services and API endpoints — authentication gaps, injection risks, hardcoded secrets, and permission bypass vectors.
143 charsno explicit “when” trigger
Advanced

Key capabilities

  • Check MSAL Bearer token validation via `AzureAuthGuard`.
  • Verify that no route skips authentication via query param, header trick, or env flag.
  • Ensure `PermissionsGuard` (`@RequirePermissions`) fires on every write/destructive endpoint.
  • Validate that `req.user` is only taken from the validated MSAL token.
  • Confirm every request body goes through `class-validator` decorators and `ValidationPipe`.
  • Check for hardcoded secrets, API keys, or connection strings.

How it works

This skill audits backend services and API endpoints by checking authentication, input validation, secret management, output exposure, and infrastructure configurations against a predefined checklist, then reports findings with severity and fixes.

Inputs & outputs

You give it
A branch, path, or service name (e.g., "apps/backend/admin-api/src/modules").
You get back
A security audit report categorizing findings as Blockers, Warnings, or Suggestions, with location, issue, and concrete fix for each.

When to use security-review

  • Security audit
  • Check API authentication
  • Find hardcoded secrets

About this skill

Security Review

Audit the changes or files at: $ARGUMENTS

Run this diff first if reviewing a branch:

!git diff origin/main..HEAD -- $ARGUMENTS 2>/dev/null || find $ARGUMENTS -name "*.ts" | head -20

Audit checklist

Authentication & Authorization

  • MSAL Bearer token validation happens via AzureAuthGuard, consistently — never a locally-signed/custom JWT in production code
  • No route skips auth via query param, header trick, or env flag
  • Genuinely public/unauthenticated endpoints are the exception, not the default
  • PermissionsGuard (@RequirePermissions) fires on every write/destructive endpoint
  • req.user is never taken from the request body or query string — only from the validated MSAL token

Input Validation

  • Every request body goes through class-validator decorators + the global ValidationPipe({ whitelist: true, transform: true })
  • forbidNonWhitelisted: true (or equivalent) so unexpected fields are rejected, not silently dropped
  • No raw/unparameterized SQL (Prisma raw queries, if any, are parameterized)
  • File uploads validate MIME type and size before processing

Secrets & Credentials

  • No hardcoded secrets, Azure client secrets, API keys, tokens, or connection strings anywhere
  • No sensitive values in log output (check AzureMonitorLogger's redact list is complete)
  • .env is gitignored; only .env.example with placeholders is committed
  • No custom password hashing/storage anywhere — auth is delegated entirely to Azure MSAL

Output & Data Exposure

  • Prisma queries use select to exclude sensitive fields from responses
  • Audit log redact() covers password, token, secret, hash, twoFactorSecret
  • Webhook payloads contain no PII, passwords, or internal system IDs
  • No stack traces or internal error messages in production API responses

Infrastructure

  • No wildcard * in CORS origin config in production
  • Helmet is registered in every service's main.ts
  • @nestjs/throttler rate limiting applied per tier (global/auth/sensitive/admin)
  • SSRF prevention in place on any service making outbound HTTP calls (webhook delivery, external-apis)
  • MySQL and Redis are never exposed on a public network/subnet

Report format

Group findings as:

Blockers (must fix before merge) → Warnings (should fix) → Suggestions (nice to have)

Each finding: location, issue, concrete fix.

When not to use it

  • When the user needs to implement custom JWT authentication.
  • When the user needs to use raw/unparameterized SQL queries.
  • When the user needs to implement custom password hashing/storage.

Limitations

  • The skill specifically checks for MSAL Bearer token validation.
  • It prohibits raw/unparameterized SQL queries.
  • It prohibits custom password hashing/storage, delegating auth to Azure MSAL.

How it compares

This skill provides a structured security audit based on a complete checklist for backend services, focusing on common vulnerabilities and best practices, which is more systematic than ad-hoc code reviews.

Compared to similar skills

security-review side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
security-review (this skill)01moReviewAdvanced
backend-security-coder244moNo flagsIntermediate
security-checklist04moReviewIntermediate
fullstack-guardian13moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry