New to Claude Skills? Learn how to install them →

jeremylongshore on GitHub

Performing Security Code Review

Free

Automate security audits for your codebase.

Get this skill

Free · Opens the source repo

What Performing Security Code Review does

The Performing Security Code Review skill enables developers and security auditors to conduct thorough security assessments of their codebases. By utilizing this skill, users can identify common vulnerabilities such as SQL injection, cross-site scripting (XSS), and insecure dependencies throughout their source files. The skill operates by scanning the code for specific patterns and practices that are known to pose security risks, providing a structured report that highlights these issues along with remediation guidance.

To effectively use this skill, users need read access to the source files and familiarity with the OWASP Top 10 vulnerabilities. The review process includes scanning for hardcoded secrets, analyzing code for injection vulnerabilities, and auditing dependencies for known security issues. The outputs are organized by severity, allowing teams to prioritize their remediation efforts based on the criticality of the findings. This structured approach not only helps in identifying issues but also educates developers on secure coding practices.

This skill is particularly beneficial for teams looking to integrate security into their development workflow, especially during code reviews or before deployment. By automating the security audit process, it saves time and reduces the likelihood of human error, enabling developers to focus on fixing vulnerabilities rather than manually searching for them. The generated reports serve as a valuable resource for both developers and management, facilitating discussions around security posture and compliance.

Overall, the Performing Security Code Review skill is an essential tool for any development team committed to maintaining a secure codebase. It empowers users to proactively identify and resolve vulnerabilities, ensuring that security is a fundamental aspect of the software development lifecycle.

When to use it

Use this skill when conducting security audits or code reviews to ensure the codebase is free from common vulnerabilities.

When not to use it

This skill may not be suitable for projects without source code access or where security expertise is lacking, as it requires some familiarity with security concepts.

What you can build with it

SQL Injection Review

Trigger a review of database query code to identify SQL injection vulnerabilities, ensuring secure query construction.

Dependency Vulnerability Scan

Check project dependencies for known vulnerabilities using npm audit, reporting findings with CVE identifiers.

Full Codebase Security Audit

Run a comprehensive security scan across the entire codebase, producing a detailed report of all identified vulnerabilities.

How to install Performing Security Code Review

View source

1. Install with the skills CLI

npx skills add jeremylongshore/claude-code-plugins-plus-skills/performing-security-code-review --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by jeremylongshore

Performing Security Code Review

Overview

Conducts security-focused code reviews by scanning source files for common vulnerability patterns including SQL injection, XSS, authentication flaws, insecure dependencies, and secret exposure. Produces structured severity-rated reports with specific remediation guidance.

Prerequisites

  • Read access to all source files in the target project
  • grep available on PATH for pattern matching
  • Access to package.json or equivalent dependency manifest for dependency auditing
  • Familiarity with OWASP Top 10 vulnerability categories

Instructions

  1. Identify the scope of the review: specific files, directories, or the entire codebase. Confirm the primary language(s) and framework(s) in use.
  2. Scan for hardcoded secrets and credentials:
    • Search for patterns matching API keys, tokens, passwords, AWS access keys (AKIA...), and private key headers (BEGIN PRIVATE KEY).
    • Flag any .env files or configuration files containing plaintext secrets.
  3. Analyze code for injection vulnerabilities:
    • Identify raw SQL string concatenation (SQL injection risk).
    • Locate unsanitized user input rendered in HTML (XSS risk).
    • Check for eval(), exec(), or Function() calls with dynamic input (code injection risk).
  4. Review authentication and authorization logic:
    • Verify password hashing uses strong algorithms (bcrypt, argon2) rather than MD5/SHA1.
    • Check for missing authentication on sensitive endpoints.
    • Identify overly permissive CORS configurations.
  5. Audit dependencies for known vulnerabilities:
    • Run npm audit or equivalent package manager audit command.
    • Cross-reference dependency versions against known CVE databases.
  6. Check for insecure communication patterns:
    • Flag HTTP URLs where HTTPS is expected.
    • Identify disabled TLS certificate verification.
  7. Compile findings into a structured report sorted by severity (Critical, High, Medium, Low), including the vulnerable code location, explanation, and remediation steps.

Output

A structured security review report containing:

  • Summary with total findings count by severity level
  • Per-finding entries with: file path, line number, vulnerability type, severity, code snippet, explanation, and recommended fix
  • Dependency audit results with CVE identifiers where applicable
  • Overall risk assessment (Critical / High / Medium / Low / Clean)

Error Handling

ErrorCauseSolution
No source files foundIncorrect scope path or empty directoryVerify the target directory path and confirm it contains source files
Binary files in scanNon-text files matched by search patternsExclude binary extensions and node_modules/ from scans
Dependency manifest missingNo package.json, requirements.txt, or equivalentSkip dependency audit; note in report that dependency analysis was not possible
Permission denied on filesRestricted file accessRequest read permissions or narrow the review scope to accessible files
False positive on secret patternBenign string matching secret regexVerify context before reporting; mark as potential false positive if the match appears in test fixtures or documentation

Examples

SQL injection review: Trigger: "Review this database query code for SQL injection vulnerabilities." Process: Scan all files containing SQL query construction. Identify string concatenation with user input ("SELECT * FROM users WHERE id = " + userId). Report as High severity with remediation: use parameterized queries or prepared statements.

Dependency vulnerability scan: Trigger: "Check this project's dependencies for known security vulnerabilities." Process: Run npm audit on the project. Parse output for vulnerabilities. Report each finding with CVE identifier, affected package, installed version, and patched version. Recommend npm audit fix or manual version pinning.

Full codebase security audit: Trigger: "Run a security scan on this codebase." Process: Execute all seven scan categories (secrets, injection, auth, dependencies, communication, dangerous commands, obfuscation). Produce a comprehensive report with findings grouped by category and sorted by severity.

Resources

Frequently asked questions about Performing Security Code Review

Similar skills