Guides configuring GitHub secret scanning, push protection, custom patterns, exclusions, and alert remediation. Enables pre-commit scanning for AI coding agents via MCP.
From awesome-copilotnpx claudepluginhub ctr26/dotfiles --plugin awesome-copilotThis skill uses the workspace's default tool permissions.
references/alerts-and-remediation.mdreferences/custom-patterns.mdreferences/push-protection.mdFetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Uses ctx7 CLI to fetch current library docs, manage AI coding skills (install/search/generate), and configure Context7 MCP for AI editors.
This skill provides procedural guidance for configuring GitHub secret scanning — detecting leaked credentials, preventing secret pushes, defining custom patterns, and managing alerts.
Use this skill when the request involves:
secret_scanning.ymlSecret scanning automatically detects exposed credentials across:
| Repository Type | Availability |
|---|---|
| Public repos | Automatic, free |
| Private/internal (org-owned) | Requires GitHub Secret Protection on Team/Enterprise Cloud |
| User-owned | Enterprise Cloud with Enterprise Managed Users |
For organizations, use security configurations to enable at scale:
Push protection blocks secrets during the push process — before they reach the repository.
Push protection blocks secrets in:
Create .github/secret_scanning.yml to auto-close alerts for specific directories:
paths-ignore:
- "docs/**"
- "test/fixtures/**"
- "**/*.example"
Limits:
paths-ignoreBest practices:
Non-provider patterns — detect private keys, connection strings, generic API keys:
AI-powered generic secret detection — uses Copilot to detect unstructured secrets like passwords:
Validity checks — verify if detected secrets are still active:
active, inactive, or unknownExtended metadata checks — additional context about who owns a secret:
When push protection blocks a push from the command line:
If the secret is in the latest commit:
# Remove the secret from the file
# Then amend the commit
git commit --amend --all
git push
If the secret is in an earlier commit:
# Find the earliest commit containing the secret
git log
# Start interactive rebase before that commit
git rebase -i <COMMIT-ID>~1
# Change 'pick' to 'edit' for the offending commit
# Remove the secret, then:
git add .
git commit --amend
git rebase --continue
git push
If delegated bypass is enabled and you lack bypass privileges:
For detailed bypass and delegated bypass workflows, search
references/push-protection.md.
Define organization-specific secret patterns using regular expressions.
Custom patterns can be defined at:
Use Copilot secret scanning to generate regex from a text description of the secret type, including optional example strings.
For detailed custom pattern configuration, search
references/custom-patterns.md.
| Type | Description | Visibility |
|---|---|---|
| User alerts | Secrets found in repository | Security tab |
| Push protection alerts | Secrets pushed via bypass | Security tab (filter: bypassed: true) |
| Partner alerts | Secrets reported to provider | Not shown in repo (provider-only) |
active (urgent), inactive (lower priority), unknownDismiss with a documented reason:
For detailed alert types, validity checks, and REST API, search
references/alerts-and-remediation.md.
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:
@agentPlugins) and install the advanced-security plugin/secret-scanning in Copilot ChatSee: Advanced Security Plugin — Secret Scanning Skill
Announced in Secret scanning in AI coding agents via the GitHub MCP Server (March 2026)
For detailed documentation, load the following reference files as needed:
references/push-protection.md — Push protection mechanics, bypass workflow, delegated bypass, user push protection
bypass, delegated, bypass request, command line, REST API, user push protectionreferences/custom-patterns.md — Custom pattern creation, regex syntax, dry runs, Copilot regex generation, scopes
custom pattern, regex, dry run, publish, organization, enterprise, Copilotreferences/alerts-and-remediation.md — Alert types, validity checks, extended metadata, generic alerts, secret removal, REST API
user alert, partner alert, validity, metadata, generic, remediation, git history, REST API