Home › Security › Security review prompt file (Copilot)

Security review prompt file (Copilot)

A Copilot prompt file (/security-review) that audits a file or the current diff for common vulnerabilities, read-only.

GitHub CopilotSecurity

How to use

Save this as .github/prompts/security-review.prompt.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.

Note: Review and test before use. Provided as is, without warranty. See Terms.

.github/prompts/security-review.prompt.mdDownload  
---
description: Audit the selected file or current changes for security vulnerabilities
agent: ask
argument-hint: file or area to audit
---

Perform a security review of ${input:target:file, folder, or "current changes"}. Don't edit files.

Look for:
- Broken access control: missing authentication, missing object-level ownership checks (IDOR), privilege checks only in the UI.
- Injection: SQL/NoSQL built with strings, shell commands with user input, unsafe HTML rendering (XSS), template injection, path traversal.
- SSRF and open redirects from user-supplied URLs.
- Secrets in code, config, tests, or logs; weak crypto or password hashing; JWTs without signature/expiry checks.
- Missing CSRF protection on cookie-authenticated mutations; insecure cookie flags.
- Unsafe deserialization and file uploads (type/size checks, storage location).
- Missing rate limiting on auth and expensive endpoints.
- For LLM features: user or retrieved content that can steer tools with side effects (prompt injection).

## Output
A table: Severity (Critical/High/Medium/Low) | Location | Issue | Attack scenario | Fix. Order by severity. If nothing is found in a category, don't list it. End with the top 3 fixes to do first.

More: all Security rules · all GitHub Copilot rules

Related rules

API route security .claude/rules file

A path-scoped Claude Code rules file for API routes and handlers: auth, ownership checks, validation, and safe errors.

Claude Code (CLAUDE.md)Security

Security auditor subagent (Claude Code)

A read-only Claude Code subagent that audits changes or a module for common web security vulnerabilities.

Claude Code (CLAUDE.md)Security

Secure coding AGENTS.md

AGENTS.md security baseline for AI agents in any web stack: secrets, injection, auth checks, dependencies, and logging.

AGENTS.mdSecurity

Code review Copilot instructions

Copilot instructions focused on pull request review: what to flag, severity labels, and how to word comments.

GitHub CopilotAgent workflows

Code review prompt file (Copilot)

A Copilot prompt file (/review-changes) that reviews the current changes and reports issues by severity without editing.

GitHub CopilotAgent workflows

Create README prompt file (Copilot)

A Copilot prompt file (/create-readme) that writes or updates a README from the actual repo contents and verified commands.

GitHub CopilotAgent workflows

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.