copilot-security-instructions
✨ A customizable copilot-instructions.md ruleset & prompts to guide GitHub Copilot toward secure coding defaults in Java, Node.js, C# and Python. Blocks risky patterns, teaches safe habits.
Install / Use
claude mcp add Robotti-io -- npx -y github:Robotti-io/copilot-security-instructionsIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
SecuritySupported Platforms
Skill content
View source on GitHub🛡️ Copilot Security Instructions
A comprehensive toolkit to guide GitHub Copilot toward secure coding practices. This project includes customizable instructions and security-focused prompts to help development teams identify and mitigate security risks effectively.
Designed for security-conscious teams, this configuration ensures Copilot suggests safer code patterns, avoids common vulnerabilities, and reinforces best practices — all without disrupting your workflow.
🔐 What's Inside
This project offers:
- Secure-by-default guidance for all languages (e.g., input validation, secret handling, safe logging).
- Language-specific secure patterns:
- ☕ Java
- 🟩 Node.js
- 🟦 C#
- 🐍 Python
- "Do Not Suggest" lists to block risky Copilot completions (e.g.,
eval, inline SQL, insecure deserialization). - AI hallucination protections to prevent package spoofing, non-existent APIs, and misinformation risks.
- Mentorship-style tips to help newer engineers build secure coding habits.
- Custom agents & Agent Skills under
agents/andskills/for repeatable AppSec workflows inside Copilot. - An installable GitHub Copilot CLI plugin under
plugins/copilot-securityfor reusable AppSec agents and skills across projects. - An MCP server for seamless integration of these prompts into other projects.
🗂️ Prompt Catalogue
Explore the available prompts and their intended use cases:
These prompt files live under prompts/ in this repo and are intended to be copied into a consuming repository’s .github/prompts/.
Recommended workflow: start with the application-security-orchestrator agent (see agents/application-security-orchestrator.agent.md).
It standardizes intake, then hands off to specialist agents (Analyst/Architect/Engineer) depending on whether you want findings, a threat model, or implemented fixes.
| Prompt | Description | Intended Use | | --- | --- | --- | | access-control-review.prompt.md | Review and report on access control / authorization architecture for project. | Perform analysis of the current architecture for access control and authorization within the project. | | assess-logging.prompt.md | Identify unsafe logging and exposure of sensitive data. | Audit log output for leaks and recommend safer patterns. | | business-logic-review.prompt.md | Analyze overall business logic flow and decision making. | Map application behavior and critique critical logic paths. | | check-access-controls.prompt.md | Audit authorization and access control weaknesses. | Ensure RBAC/ABAC enforcement and consistent permission checks. | | check-for-secrets.prompt.md | Detect hardcoded secrets and credentials. | Locate embedded keys or tokens and suggest secure storage. | | check-for-unvalidated-genai-acceptances.prompt.md | Find unvalidated AI-generated code or hallucinated assets. | Verify that AI suggestions are real, tested, and documented. | | add-content-security-policy.prompt.md | Design, implement, and roll out a new Content Security Policy (CSP) safely. | Add CSP to a web app with a deployable policy string, rollout plan, and verification steps. | | csp-review.prompt.md | Review a web application’s Content-Security-Policy (CSP) for XSS resistance, safe third-party usage, and deployability. | Evaluate an existing CSP policy and recommend hardening + rollout steps. | | dependency-cve-triage.prompt.md | Triage a known CVE against a project's dependency: explain the exploit, assess reachability and configuration, and produce a structured Dependency Tracker report. | Analyze a specific CVE's impact on local code, determine exploitability, and generate a concise triage report. | | review-auth-flows.prompt.md | Evaluate authentication logic and session handling. | Review login flows for common risks and best practices. | | scan-for-insecure-apis.prompt.md | Spot deprecated or insecure API usage. | Replace risky APIs with modern, safer alternatives. | | secure-code-review.prompt.md | Perform a comprehensive security review of the codebase. | Conduct an end-to-end audit for security issues. | | threat-model.prompt.md | Produce a lightweight threat model using the 4Q approach with scoped threats, mitigations, and a validation plan. | Threat-model a feature/system or PR diff and generate durable artifacts. | | validate-input-handling.prompt.md | Check for missing or unsafe input validation. | Evaluate request handling for validation and sanitization gaps. |
🧑💻 Agents
| Agent | Purpose | | --- | --- | | application-security-orchestrator | Standardize intake and route to the right specialist. | | application-security-analyst | Read-only findings + remediation guidance. | | application-security-architect | Threat models + guardrails + ADRs. | | application-security-engineer | Implement fixes + tests with minimal diffs. |
🧩 Skills
| Skill | Intended use | | --- | --- | | secure-code-review | Repeatable security review workflow + findings template. | | access-control-review | Review identity, access control, and authorization architecture with evidence-first reporting. | | input-validation-hardening | Tighten validation boundaries and parsing safety. | | dependency-cve-triage | CVE reachability + remediation plan workflow. | | secrets-and-logging-hygiene | Prevent secret leaks and add redaction defaults. | | genai-acceptance-review | Prevent over-trust and prompt/tool injection risks. | | threat-model | Full 4Q threat modeling workflow with CLI-friendly Mermaid docs and validation helpers. | | secure-fix-validation | Prove fixes work and don’t regress behavior. |
📦 How to Use in a Real Project
Tip for contributors: when adding a file under prompts/, update the Prompt Catalogue table.
Option 1: Leveraging Static Files
This option is best when you want to vendor a fixed set of guidance files directly into a repository instead of installing the reusable CLI plugin.
Copy the components you want from this repository into the matching .github/ locations in your target project:
| From this repository | Copy into target project | Purpose |
| --- | --- | --- |
| copilot-instructions.md | .github/copilot-instructions.md | Repository-wide default coding and security guidance |
| prompts/*.prompt.md | .github/prompts/ | Reusable prompt files that can be run directly in Copilot |
| agents/*.agent.md | .github/agents/ | Reusable specialist agents such as analyst, architect, or engineer |
| skills/**/SKILL.md and skill-local files | .github/skills/ | On-demand skills, including any helper scripts kept inside each skill directory |
| instructions/*.instructions.md | .github/instructions/ | Path-specific instructions for matching file globs |
Notes:
- If you copy a skill directory, copy the entire folder, not just
SKILL.md. Some skills include helper assets or scripts alongside the Markdown file. - The root-level
instructions/folder in this repository is currently empty, so there are no path-specific instruction files to copy right now. - If you only need a subset, copy only the prompts, agents, or skills you plan to use.
-
Copy
copilot-instructions.mdinto your repo under.github/copilot-instructions.md. -
Copy whichever reusable folders and files you want to adopt:
- prompts into
.github/prompts/ - agents into
.github/agents/ - skills into
.github/skills/ - instructions into
.github/instructions/when this repository provides them
- prompts into
-
Open the prompt or agent-enabled workflow you want to run within your IDE.
-
For prompt files, click the
Run Promptbutton at the top-right of the file.
ℹ️ Note: If you don't see the run prompt button; check to make sure the
Chat: Prompt Filesfunctionality is enabled in your settings
-
For agents and skills, invoke them from Copilot Chat after the files are present in
.github/agents/and.github/skills/.
Option 2: Leveraging the MCP Server
The MCP server simplifies the integration of secure coding prompts into your workflow. Follow these steps:
Run MCP from source
-
Install dependencies
npm install -
Setup environment
cp .env.example .envThe MCP server reads configuration from a
.envfile. Customize the following variables as needed:| Variable | Description | Default | | --- | --- | --- | |
server.port| Port the MCP server listens on. |8080| |server.ssl| Whether to use ssl for express server |false| |server.ssl.pfx| Path to pfx file |localhost.pfx| |server.ssl.pfx.passphrase| Passphrase for pfx file |PFX_PASSPHRASE| |server.hostname| Hostname the server binds to. |localhost| |logger.transports.console.enabled| Enable console logging output. |false| |logger.transports.console.level| Log level for console output. |info| |logger.transports.amqp.enabled| Enable AMQP-based logging. |false| |logger.transports.amqp.level| Log level for AMQP transport. |http| |logger.transports.amqp.hostname| Hostname of the AMQP broker. |localhost| |logger.transports.amqp.port| Port for the AMQP broker. |5672| |logger.transports.amqp.username| Username for AMQP authentication. |guest| |logger.transports.amqp.password| Password for AMQP authentication. |guest| |logger.transports.amqp.exchange| Exchange name used for AMQP logging. |logs| |logger.transports.amqp.vhost| Virtual host for AMQP logging. |/logs| |logger.transports.amqp.heartbeat| Heartbeat interval in seconds. |60| |logger.transports.amqp.locale| Locale for the AMQP connection. |en_US| |logger.transports.amqp.type| AMQP exchange type. |direct| |logger.transports.amqp.durable| Whether the AMQP exchange is durable. |false| -
Start the server
npm start
Run MCP in Docker
-
Build docker container
docker build -t copilot-security-mcp . -
Run docker container
docker run -d -p 8080:8080 copilot-security-mcp
Configuring VSCode for MCP
-
Open VSCode and run the
MCP: Open User Configurationcommand. -
Add the following JSON configuration:
{ "servers": { "copilot-instructions-mcp": { "url": "http://localhost:8080/mcp" } } } -
Save the configuration.
-
Navigate to the Extensions menu in VSCode.
-
Locate the
copilot-instructions-mcpserver, click the settings cog, and selectstart server.
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
84.4kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
73.4kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ruflo
73.0k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
CowAgent
47.1kOpen-source super AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
