Generated banner for Security Review
Generated logo for Security Review

Security Review

GitHubOfficialFirst committed by Mrigank005Distributed by GitHub

  • Skill
  • Review and audit
  • Security
  • MIT
  • Medium risk

From the author

AI-powered codebase security scanner that reasons about code like a security researcher — tracing data flows, understanding component interactions, and catching vulnerabilities that pattern-matching tools miss. Use this skill when asked to scan code for security vulnerabilities, find bugs, check for SQL injection, XSS, command injection, exposed API keys, hardcoded secrets, insecure dependencies, access control issues, or any request like "is my code secure?", "review for security issues", "audit this codebase", or "check for vulnerabilities". Covers injection flaws, authentication and access control bugs, secrets exposure, weak cryptography, insecure dependencies, and business logic issues across JavaScript, TypeScript, Python, Java, PHP, Go, Ruby, and Rust.
— the description by Mrigank005

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

Security Review is an advanced auditing tool that mimics a human security researcher's approach to codebase analysis. Rather than relying on simple pattern matching, it performs holistic data flow analysis to trace user input to dangerous sinks, understands component interactions, and verifies findings to reduce false positives. It covers a wide range of security concerns including injection flaws, authentication and access control issues, insecure cryptography, and business logic vulnerabilities across multiple programming languages.

What it does

  • Performs deep data flow analysis to trace user input to dangerous sinks
  • Audits project dependencies for known CVEs
  • Scans for hardcoded secrets, API keys, and credentials
  • Identifies injection flaws, authentication bugs, and business logic issues
  • Provides severity ratings and concrete patch proposals for critical findings
  • Filters results through a self-verification pass to minimize false positives

When to use it

  • When you need to audit a codebase for security vulnerabilities
  • Before deploying code to production to check for exposed secrets
  • When investigating potential injection flaws like SQLi or XSS
  • To review authentication and authorization logic
  • When checking for insecure dependencies or outdated libraries

Advantages

  • Context-aware analysis that understands intent and component interactions
  • Reduces noise by self-verifying findings before reporting
  • Provides actionable, language-specific patch proposals
  • Covers a broad spectrum of vulnerabilities beyond simple syntax patterns
  • Supports multiple major programming languages and frameworks

Usage examples

“security-review src/auth/”
The agent scans only the authentication module, identifying potential BOLA or missing auth checks and providing patches for any high-severity findings.
“Is my code secure?”
The agent performs a full project audit, including dependency checks, a secrets scan, and a deep vulnerability analysis, outputting a structured security report.
“Check my repo for vulnerabilities”
The agent conducts a comprehensive security review of the entire codebase, grouping findings by category and providing a summary table with severity levels.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/github/security-review/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip security-review.zip -d .agents/skills

Documentation by Mrigank005

Security Review

An AI-powered security scanner that reasons about your codebase the way a human security researcher would — tracing data flows, understanding component interactions, and catching vulnerabilities that pattern-matching tools miss.

When to Use This Skill

Use this skill when the request involves:

  • Scanning a codebase or file for security vulnerabilities

  • Running a security review or vulnerability check

  • Checking for SQL injection, XSS, command injection, or other injection flaws

  • Finding exposed API keys, hardcoded secrets, or credentials in code

  • Auditing dependencies for known CVEs

  • Reviewing authentication, authorization, or access control logic

  • Detecting insecure cryptography or weak randomness

  • Performing a data flow analysis to trace user input to dangerous sinks

  • Any request phrasing like "is my code secure?", "scan this file", or "check my repo for vulnerabilities"

  • Running /security-review or /security-review <path>

How This Skill Works

Unlike traditional static analysis tools that match patterns, this skill:

  1. Reads code like a security researcher — understanding context, intent, and data flow

  2. Traces across files — following how user input moves through your application

  3. Self-verifies findings — re-examines each result to filter false positives

  4. Assigns severity ratings — CRITICAL / HIGH / MEDIUM / LOW / INFO

  5. Proposes targeted patches — every finding includes a concrete fix

  6. Requires human approval — nothing is auto-applied; you always review first

Execution Workflow

Follow these steps in order every time:

Step 1 — Scope Resolution

Determine what to scan:

  • If a path was provided (/security-review src/auth/), scan only that scope

  • If no path given, scan the entire project starting from the root

  • Identify the language(s) and framework(s) in use (check package.json, requirements.txt, go.mod, Cargo.toml, pom.xml, Gemfile, composer.json, etc.)

  • Read references/language-patterns.md to load language-specific vulnerability patterns

Step 2 — Dependency Audit

Before scanning source code, audit dependencies first (fast wins):

  • Node.js: Check package.json + package-lock.json for known vulnerable packages

  • Python: Check requirements.txt / pyproject.toml / Pipfile

  • Java: Check pom.xml / build.gradle

  • Ruby: Check Gemfile.lock

  • Rust: Check Cargo.toml

  • Go: Check go.sum

  • Flag packages with known CVEs, deprecated crypto libs, or suspiciously old pinned versions

  • Read references/vulnerable-packages.md for a curated watchlist

Step 3 — Secrets & Exposure Scan

Scan ALL files (including config, env, CI/CD, Dockerfiles, IaC) for:

  • Hardcoded API keys, tokens, passwords, private keys

  • .env files accidentally committed

  • Secrets in comments or debug logs

  • Cloud credentials (AWS, GCP, Azure, Stripe, Twilio, etc.)

  • Database connection strings with credentials embedded

  • Read references/secret-patterns.md for regex patterns and entropy heuristics to apply

Step 4 — Vulnerability Deep Scan

This is the core scan. Reason about the code — don't just pattern-match. Read references/vuln-categories.md for full details on each category.

Injection Flaws

  • SQL Injection: raw queries with string interpolation, ORM misuse, second-order SQLi

  • XSS: unescaped output, dangerouslySetInnerHTML, innerHTML, template injection

  • Command Injection: exec/spawn/system with user input

  • LDAP, XPath, Header, Log injection

Authentication & Access Control

  • Missing authentication on sensitive endpoints

  • Broken object-level authorization (BOLA/IDOR)

  • JWT weaknesses (alg:none, weak secrets, no expiry validation)

  • Session fixation, missing CSRF protection

  • Privilege escalation paths

  • Mass assignment / parameter pollution

Data Handling

  • Sensitive data in logs, error messages, or API responses

  • Missing encryption at rest or in transit

  • Insecure deserialization

  • Path traversal / directory traversal

  • XXE (XML External Entity) processing

  • SSRF (Server-Side Request Forgery)

Cryptography

  • Use of MD5, SHA1, DES for security purposes

  • Hardcoded IVs or salts

  • Weak random number generation (Math.random() for tokens)

  • Missing TLS certificate validation

Business Logic

  • Race conditions (TOCTOU)

  • Integer overflow in financial calculations

  • Missing rate limiting on sensitive endpoints

  • Predictable resource identifiers

Step 5 — Cross-File Data Flow Analysis

After the per-file scan, perform a holistic review:

  • Trace user-controlled input from entry points (HTTP params, headers, body, file uploads) all the way to sinks (DB queries, exec calls, HTML output, file writes)

  • Identify vulnerabilities that only appear when looking at multiple files together

  • Check for insecure trust boundaries between services or modules

Step 6 — Self-Verification Pass

For EACH finding:

  1. Re-read the relevant code with fresh eyes

  2. Ask: "Is this actually exploitable, or is there sanitization I missed?"

  3. Check if a framework or middleware already handles this upstream

  4. Downgrade or discard findings that aren't genuine vulnerabilities

  5. Assign final severity: CRITICAL / HIGH / MEDIUM / LOW / INFO

Step 7 — Generate Security Report

Output the full report in the format defined in references/report-format.md.

Step 8 — Propose Patches

For every CRITICAL and HIGH finding, generate a concrete patch:

  • Show the vulnerable code (before)

  • Show the fixed code (after)

  • Explain what changed and why

  • Preserve the original code style, variable names, and structure

  • Add a comment explaining the fix inline

Explicitly state: "Review each patch before applying. Nothing has been changed yet."

Severity Guide

SeverityMeaningExample
🔴 CRITICALImmediate exploitation risk, data breach likelySQLi, RCE, auth bypass
🟠 HIGHSerious vulnerability, exploit path existsXSS, IDOR, hardcoded secrets
🟡 MEDIUMExploitable with conditions or chainingCSRF, open redirect, weak crypto
🔵 LOWBest practice violation, low direct riskVerbose errors, missing headers
⚪ INFOObservation worth noting, not a vulnerabilityOutdated dependency (no CVE)

Output Rules

  • Always produce a findings summary table first (counts by severity)

  • Never auto-apply any patch — present patches for human review only

  • Always include a confidence rating per finding (High / Medium / Low)

  • Group findings by category, not by file

  • Be specific — include file path, line number, and the exact vulnerable code snippet

  • Explain the risk in plain English — what could an attacker do with this?

  • If the codebase is clean, say so clearly: "No vulnerabilities found" with what was scanned

Reference Files

For detailed detection guidance, load the following reference files as needed:

  • references/vuln-categories.md — Deep reference for every vulnerability category with detection signals, safe patterns, and escalation checkers

    • Search patterns: SQL injection, XSS, command injection, SSRF, BOLA, IDOR, JWT, CSRF, secrets, cryptography, race condition, path traversal

  • references/secret-patterns.md — Regex patterns, entropy-based detection, and CI/CD secret risks

    • Search patterns: API key, token, private key, connection string, entropy, .env, GitHub Actions, Docker, Terraform

  • references/language-patterns.md — Framework-specific vulnerability patterns for JavaScript, Python, Java, PHP, Go, Ruby, and Rust

    • Search patterns: Express, React, Next.js, Django, Flask, FastAPI, Spring Boot, PHP, Go, Rails, Rust

  • references/vulnerable-packages.md — Curated CVE watchlist for npm, pip, Maven, Rubygems, Cargo, and Go modules

    • Search patterns: lodash, axios, jsonwebtoken, Pillow, log4j, nokogiri, CVE

  • references/report-format.md — Structured output template for security reports with finding cards, dependency audit, secrets scan, and patch proposal formatting

    • Search patterns: report, format, template, finding, patch, summary, confidence

Files

references/secret-patterns.md

Secret & Credential Detection Patterns

Load this file during Step 3 (Secrets & Exposure Scan).


High-Confidence Secret Patterns

These patterns almost always indicate a real secret:

API Keys & Tokens
# OpenAI
sk-[a-zA-Z0-9]{48}

# Anthropic
sk-ant-[a-zA-Z0-9\-_]{90,}

# AWS Access Key
AKIA[0-9A-Z]{16}

# AWS Secret Key (look for near AWS_ACCESS_KEY_ID assignment)
[0-9a-zA-Z/+]{40}

# GitHub Token
gh[pousr]_[a-zA-Z0-9]{36,}
github_pat_[a-zA-Z0-9]{82}

# Stripe
sk_live_[a-zA-Z0-9]{24,}
rk_live_[a-zA-Z0-9]{24,}

# Twilio Account SID
AC[a-z0-9]{32}
# Twilio API Key
SK[a-z0-9]{32}

# SendGrid
SG\.[a-zA-Z0-9\-_.]{66}

# Slack
xoxb-[0-9]+-[0-9]+-[a-zA-Z0-9]+
xoxp-[0-9]+-[0-9]+-[0-9]+-[a-zA-Z0-9]+
xapp-[0-9]+-[A-Z0-9]+-[0-9]+-[a-zA-Z0-9]+

# Google API Key
AIza[0-9A-Za-z\-_]{35}

# Google OAuth
[0-9]+-[0-9A-Za-z_]{32}\.apps\.googleusercontent\.com

# Cloudflare (near CF_API_TOKEN)
[a-zA-Z0-9_\-]{37}

# Mailgun
key-[a-zA-Z0-9]{32}

# Heroku
[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}
Private Keys
-----BEGIN (RSA |EC |OPENSSH |DSA |PGP )?PRIVATE KEY( BLOCK)?-----
-----BEGIN CERTIFICATE-----
Database Connection Strings
# MongoDB
mongodb(\+srv)?:\/\/[^:]+:[^@]+@

# PostgreSQL / MySQL
(postgres|postgresql|mysql):\/\/[^:]+:[^@]+@

# Redis with password
redis:\/\/:[^@]+@

# Generic connection string with password
(connection[_-]?string|connstr|db[_-]?url).*password=
Hardcoded Passwords (variable name signals)
# Variable names that suggest secrets
(password|passwd|pwd|secret|api_key|apikey|auth_token|access_token|private_key)
  \s*[=:]\s*["'][^"']{8,}["']

Entropy-Based Detection

Apply to string literals > 20 characters in assignment context. High entropy (Shannon entropy > 4.5 bits/char) + length > 20 = likely secret.

Calculate entropy: -sum(p * log2(p)) for each character frequency p
Threshold: > 4.5 bits/char AND > 20 chars AND assigned to a variable

Common false positives to exclude:

  • Lorem ipsum text

  • HTML/CSS content

  • Base64-encoded non-sensitive config (but flag and note)

  • UUID/GUID (entropy is high but format is recognizable)


Files That Should Never Be Committed

Flag if these files exist in the repo root or are tracked by git:

.env
.env.local
.env.production
.env.staging
*.pem
*.key
*.p12
*.pfx
id_rsa
id_ed25519
credentials.json
service-account.json
gcp-key.json
secrets.yaml
secrets.json
config/secrets.yml

Also check .gitignore — if a secret file pattern is NOT in .gitignore, flag it.


CI/CD & IaC Secret Risks

GitHub Actions — flag these patterns:
# Hardcoded values in env: blocks (should use ${{ secrets.NAME }})
env:
  API_KEY: "actual-value-here"   # VULNERABLE

# Printing secrets
- run: echo ${{ secrets.MY_SECRET }}   # leaks to logs
Docker — flag these:
# Secrets in ENV (persisted in image layers)
ENV AWS_SECRET_KEY=actual-value

# Secrets passed as build args (visible in image history)
ARG API_KEY=actual-value
Terraform — flag these:
# Hardcoded sensitive values (should use var or data source)
password = "hardcoded-password"
access_key = "AKIAIOSFODNN7EXAMPLE"

Safe Patterns (Do NOT flag)

These are intentional placeholders — recognize and skip:

"your-api-key-here"
"<YOUR_API_KEY>"
"${API_KEY}"
"${process.env.API_KEY}"
"os.environ.get('API_KEY')"
"REPLACE_WITH_YOUR_KEY"
"xxx...xxx"
"sk-..." (in documentation/comments)

Requirements and compatibility

Written for: GitHub Copilot

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an API key

Security

What our scanner noticed· Medium risk

  • References to credential files

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

First committed by
GitHub avatar of Mrigank005Mrigank005
Publisher
GitHub (Official)
Distributed by
GitHub
Source
github/awesome-copilot · skills/security-review · commit 797337f
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
Mrigank005

AutoGineer is not affiliated with or endorsed by Mrigank005 or GitHub.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download security-review.zip