skills/secret-scanning/SKILL.md
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.
npx skillsauth add github/awesome-copilot secret-scanningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 APItools
End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI. Covers all four build backends (setuptools+setuptools_scm, hatchling, flit, poetry), PEP 440 versioning, semantic versioning, dynamic git-tag versioning, OOP/SOLID design, type hints (PEP 484/526/544/561), Trusted Publishing (OIDC), and the full PyPA packaging flow. Use for: creating Python packages, pip-installable SDKs, CLI tools, framework plugins, pyproject.toml setup, py.typed, setuptools_scm, semver, mypy, pre-commit, GitHub Actions CI/CD, or PyPI publishing.
tools
Audit MCP (Model Context Protocol) server configurations for security issues. Use this skill when: - Reviewing .mcp.json files for security risks - Checking MCP server args for hardcoded secrets or shell injection patterns - Validating that MCP servers use pinned versions (not @latest) - Detecting unpinned dependencies in MCP server configurations - Auditing which MCP servers a project registers and whether they're on an approved list - Checking for environment variable usage vs. hardcoded credentials in MCP configs - Any request like "is my MCP config secure?", "audit my MCP servers", or "check .mcp.json" keywords: [mcp, security, audit, secrets, shell-injection, supply-chain, governance]
tools
Enable code intelligence (go-to-definition, find-references, hover, type info) for any programming language by installing and configuring an LSP server for Copilot CLI. Detects the OS, installs the right server, and generates the JSON configuration (user-level or repo-level). Use when you need deeper code understanding and no LSP server is configured, or when the user asks to set up, install, or configure an LSP server.
development
Use this skill whenever the user wants to build scroll animations, scroll effects, parallax, scroll-triggered reveals, pinned sections, horizontal scroll, text animations, or any motion tied to scroll position — in vanilla JS, React, or Next.js. Covers GSAP ScrollTrigger (pinning, scrubbing, snapping, timelines, horizontal scroll, ScrollSmoother, matchMedia) and Framer Motion / Motion v12 (useScroll, useTransform, useSpring, whileInView, variants). Use this skill even if the user just says "animate on scroll", "fade in as I scroll", "make it scroll like Apple", "parallax effect", "sticky section", "scroll progress bar", or "entrance animation". Also triggers for Copilot prompt patterns for GSAP or Framer Motion code generation. Pairs with the premium-frontend-ui skill for creative philosophy and design-level polish.