-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Extend secret-scanning skill with MCP pre-commit scanning support #1154
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
Changes from all commits
19f43b1
faf90f6
795aa7b
bc0a9bb
fa25e2f
3c5a5cd
8ffda58
8901630
963c3f4
e26336b
b659c32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||||||||
| --- | ||||||||||||
| name: secret-scanning | ||||||||||||
| description: Guide for configuring and managing GitHub secret scanning, push protection, custom patterns, and secret alert remediation. This skill should be used when users need help enabling secret scanning, setting up push protection, defining custom secret patterns, triaging secret scanning alerts, or resolving blocked pushes. | ||||||||||||
| description: 'Guide for configuring and managing GitHub secret scanning, push protection, custom patterns, and secret alert remediation. For pre-commit secret scanning in AI coding agents via the GitHub MCP Server, this skill references the Advanced Security plugin (`advanced-security@copilot-plugins`). Use this skill when enabling secret scanning, setting up push protection, defining custom patterns, triaging alerts, resolving blocked pushes, or when an agent needs to scan code for secrets before committing.' | ||||||||||||
| --- | ||||||||||||
|
|
||||||||||||
| # Secret Scanning | ||||||||||||
|
|
@@ -20,6 +20,7 @@ Use this skill when the request involves: | |||||||||||
| - Excluding directories from secret scanning via `secret_scanning.yml` | ||||||||||||
| - Understanding alert types (user, partner, push protection) | ||||||||||||
| - Enabling validity checks or extended metadata checks | ||||||||||||
| - Scanning local code changes for secrets before committing (via MCP / AI coding agent) — see the **Pre-Commit Scanning via AI Coding Agents** section below for the recommended plugin | ||||||||||||
|
|
||||||||||||
| ## How Secret Scanning Works | ||||||||||||
|
|
||||||||||||
|
|
@@ -212,6 +213,23 @@ Dismiss with a documented reason: | |||||||||||
|
|
||||||||||||
| > For detailed alert types, validity checks, and REST API, search `references/alerts-and-remediation.md`. | ||||||||||||
|
|
||||||||||||
| ## Pre-Commit Scanning via AI Coding Agents | ||||||||||||
|
|
||||||||||||
| For scanning code changes for secrets inside an AI coding agent before committing, install the **Advanced Security plugin** which provides the `run_secret_scanning` MCP tool and a dedicated scanning skill. | ||||||||||||
|
|
||||||||||||
| **GitHub Copilot CLI:** | ||||||||||||
| ``` | ||||||||||||
| /plugin install advanced-security@copilot-plugins | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| **Visual Studio Code:** | ||||||||||||
| - Install the `advanced-security` agent plugin | ||||||||||||
| - Use `/secret-scanning` in Copilot Chat | ||||||||||||
|
Comment on lines
+226
to
+227
|
||||||||||||
| - Install the `advanced-security` agent plugin | |
| - Use `/secret-scanning` in Copilot Chat | |
| - In the Extensions view, search for `@agentPlugins advanced-security` and install **Advanced Security** (`advanced-security@copilot-plugins`) | |
| - Or run the **“Chat: Plugins”** command from the Command Palette and enable the **Advanced Security** agent plugin | |
| - Then use `/secret-scanning` in Copilot Chat to scan changes for secrets before committing |
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 “GitHub Copilot CLI” install instructions use the interactive
/plugin install ...command but don’t mention that it must be run inside an interactive Copilot CLI session, and they omit the prerequisite to register thegithub/copilot-pluginsmarketplace (perwebsite/src/content/docs/learning-hub/installing-and-using-plugins.md). Consider updating this section to either (a) show the non-interactive CLI command (copilot plugin install advanced-security@copilot-plugins) and include the marketplace add step when needed, or (b) explicitly label the snippet as “from an interactive session” and include/plugin marketplace add github/copilot-pluginsif it isn’t already registered.