-
Notifications
You must be signed in to change notification settings - Fork 47
Adds Security Champion chat / agent mode to provide comprehensive security guidance by integrating Microsoft's Security Development Lifecycle (SDL) practices alongside existing OWASP frameworks. #408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…M applications - include OWASP Top 10 for LLM Applications (2025) security practices - outline responsibilities and areas to inspect during development stages - emphasize security champion mindset and ongoing threat awareness 🔒 - Generated by Copilot
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #408 +/- ##
==========================================
- Coverage 83.41% 83.39% -0.03%
==========================================
Files 20 20
Lines 3510 3510
==========================================
- Hits 2928 2927 -1
- Misses 582 583 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…nd tools list 🔒 - Generated by Copilot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a Security Champion agent and comprehensive OWASP security instruction files to integrate Microsoft's Security Development Lifecycle (SDL) practices alongside existing OWASP frameworks. The PR introduces security guidance across the development lifecycle, from design through runtime, with detailed coding standards for both traditional web applications and LLM-specific security concerns.
Changes:
- Adds Security Champion conversational agent for security-focused code review and advisory
- Introduces comprehensive OWASP Top 10 secure coding instructions for web applications
- Adds OWASP Top 10 for LLM Applications (2025) secure coding instructions for AI/ML security
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 14 comments.
| File | Description |
|---|---|
.github/agents/security-champion.agent.md |
New conversational agent that serves as a security advisor, integrating Microsoft SDL practices with OWASP frameworks to guide security reviews across all development stages |
.github/instructions/owasp-for-web-applications.instructions.md |
New instruction file providing comprehensive secure coding guidelines based on OWASP Top 10, covering vulnerabilities from access control to SSRF |
.github/instructions/owasp-for-llms.instructions.md |
New instruction file providing LLM-specific security guidelines based on OWASP Top 10 for LLM Applications (2025), covering prompt injection, data leakage, and other AI-specific risks |
.github/instructions/owasp-for-web-applications.instructions.md
Outdated
Show resolved
Hide resolved
.github/instructions/owasp-for-web-applications.instructions.md
Outdated
Show resolved
Hide resolved
.github/instructions/owasp-for-web-applications.instructions.md
Outdated
Show resolved
Hide resolved
.github/instructions/security/owasp-for-web-applications.instructions.md
Show resolved
Hide resolved
.github/instructions/owasp-for-web-applications.instructions.md
Outdated
Show resolved
Hide resolved
.github/instructions/owasp-for-web-applications.instructions.md
Outdated
Show resolved
Hide resolved
- clarify the directive for secure coding practices - emphasize the importance of a security-first mindset - enhance instructions for code reviews and security education 🔒 - Generated by Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
.github/instructions/owasp-for-web-applications.instructions.md
Outdated
Show resolved
Hide resolved
.github/instructions/owasp-for-web-applications.instructions.md
Outdated
Show resolved
Hide resolved
.github/instructions/owasp-for-web-applications.instructions.md
Outdated
Show resolved
Hide resolved
.github/instructions/owasp-for-web-applications.instructions.md
Outdated
Show resolved
Hide resolved
…curity champion agent documentation 🔒 - Generated by Copilot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
…hampion agent documentation 🔒 - Generated by Copilot
- enhance clarity and structure of security instructions - add maturity status to both documents - improve emphasis on security principles and practices - refine sections for better readability and understanding 🔒 - Generated by Copilot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
.github/instructions/owasp-for-web-applications.instructions.md
Outdated
Show resolved
Hide resolved
|
Hi! A small request: could you update the PR title to include the conventional commit format with scope? This ensures release-please picks it up correctly for the changelog. Suggested: `feat(agents): add security champion agent with Microsoft SDL practices Thanks! |
… guidelines 🔒 - Generated by Copilot
katriendg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. This is valuable, there are a few optimizations I feel are relevant before we merge.
- Please re-run the
/prompt-analyseorprompt-builderagent again and ensure you add your new files to the context, and ask it to review your three files for recommendations. There are several open recommendations you can still apply before we merge. - Evaluate the usage of the
.instructions.mdfiles andapplyTo. Is it possible to merge into the custom agent instead? Especially for the LLM application instructions we do not want to enforce this upon every single edit of applicable files. Again here the Task-Researcher and/or Prompt Builder agents may help you refactor some of this in an efficient way. ## Required Phasesgiven this agent has specific phases (in your case Stages), you should be able to easily reformat the agent to follow the phases approach. Also prompt-builder may do this for you.
Hope these make sense!
.github/instructions/owasp-for-web-applications.instructions.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
.github/instructions/security/owasp-for-web-applications.instructions.md
Show resolved
Hide resolved
Thank you for your feedback and help! |
.github/instructions/security/owasp-for-web-applications.instructions.md
Show resolved
Hide resolved
.github/instructions/security/owasp-for-web-applications.instructions.md
Show resolved
Hide resolved
…tore web applications guidelines - introduce OWASP Top 10 for LLM Applications with detailed security measures - restore comprehensive secure coding instructions for web applications - ensure clear communication of security practices and principles 🔒 - Generated by Copilot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
.github/instructions/security/owasp-for-web-applications.instructions.md
Show resolved
Hide resolved
.github/instructions/security/owasp-for-web-applications.instructions.md
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
.github/instructions/security/owasp-for-web-applications.instructions.md
Outdated
Show resolved
Hide resolved
…uctions.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
.github/instructions/security/owasp-for-web-applications.instructions.md
Show resolved
Hide resolved
.github/instructions/security/owasp-for-web-applications.instructions.md
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…uctions.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| // GOOD: Load from environment or secret store | ||
| const apiKey = process.env.API_KEY; | ||
| // TODO: Ensure API_KEY is securely configured in your environment. |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This TypeScript example line has trailing whitespace after the semicolon. It’s minor, but it can cause noisy diffs and formatting churn in copied examples. Remove the trailing spaces in the snippet.
|
|
||
| // ❌ BAD: Direct exposure of sensitive data | ||
| const prompt = `Analyze this customer: Name: ${customer.name}, SSN: ${customer.ssn}, Income: ${customer.income}`; | ||
| // System prompt leaks: "You have access to database: postgres://admin:password@..." |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The examples include credential-shaped strings (for example, a database URL with admin:password@...). Even in comments, these can trip secret scanners and are easy to cargo-cult into real code. Prefer neutral placeholders like postgres://user:REDACTED@db.example/… or POSTGRES_CONNECTION_STRING.
| // System prompt leaks: "You have access to database: postgres://admin:password@..." | |
| // System prompt leaks: "You have access to database: postgres://user:REDACTED@db.example/..." |
| * #file:../instructions/security/owasp-for-web-applications.instructions.md for web application security | ||
| * #file:../instructions/security/owasp-for-llms.instructions.md for AI/ML security |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using #file: to inline two large instruction files (especially the ~500+ line LLM guidance) will significantly increase the agent’s base context and can crowd out user-provided code/context in longer chats. Consider linking to these files by path and summarizing the key rules here, or splitting out a shorter ‘core rules’ file for inlining while keeping the full guidance as reference.
| * #file:../instructions/security/owasp-for-web-applications.instructions.md for web application security | |
| * #file:../instructions/security/owasp-for-llms.instructions.md for AI/ML security | |
| * [OWASP for Web Applications](../instructions/security/owasp-for-web-applications.instructions.md): core web application security principles (input validation, authentication, access control, output encoding, and error handling) | |
| * [OWASP for LLMs](../instructions/security/owasp-for-llms.instructions.md): AI/ML and LLM-specific security guidance (prompt injection, data leakage, model abuse, and safety controls) |
| @@ -0,0 +1,569 @@ | |||
| --- | |||
| description: "When generating, reviewing, or refactoring code that interacts with Large Language Models (LLMs), read and follow these OWASP Top 10 for LLM Applications (2025) secure coding guidelines to protect against prompt injection, data leakage, and LLM-specific vulnerabilities. Apply these instructions to any LLM integration, agent framework, RAG pipeline, or AI-powered feature. Provide clear and concise security feedback and points of improvement." | |||
| applyTo: '**/*' | |||
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applyTo: '**/*' makes these LLM-specific instructions load for every file in the workspace, even when the user is not working on any LLM integration. That can add a lot of irrelevant guidance and token overhead in unrelated chats. Consider narrowing applyTo (for example, to the directories or file types where LLM code lives) or removing applyTo and relying on explicit inclusion from an agent/prompt when needed.
| applyTo: '**/*' | |
| applyTo: '.github/**/*.prompt.md|.github/**/*.agent.md|.github/**/*.instructions.md|.github/skills/**/SKILL.md' |
🔒 - Generated by Copilot
Pull Request
Description
Related Issue(s)
#416
Type of Change
Select all that apply:
Code & Documentation:
Infrastructure & Configuration:
AI Artifacts:
prompt-builderagent and addressed all feedback.github/instructions/*.instructions.md).github/prompts/*.prompt.md).github/agents/*.agent.md)Sample Prompts and Usage
Checklist
Required Checks
AI Artifact Contributions
/prompt-analyzeto review contributionprompt-builderreviewRequired Automated Checks
The following validation commands must pass before merging:
npm run lint:mdnpm run spell-checknpm run lint:frontmatternpm run lint:md-linksnpm run lint:psSecurity Considerations
Additional Notes