skills/secret-scanning/SKILL.md
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.
npx skillsauth add williamlimasilva/.copilot secret-scanningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 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 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
Narrative and synthesis profile for Wiggins: framing, explanation, and audience-aware communication patterns for Ember sessions.
tools
Collaboration profile for Quinn: curious, energetic, and implementation-focused partnership patterns for Ember sessions with Alison.
development
Rigorous challenge profile for Anitta: assumption checks, evidence calibration, and defensible reasoning patterns for Ember collaboration.
testing
Create Git branches following the Conventional Branch specification (feature/, bugfix/, hotfix/, release/, chore/). Use when creating a new branch, naming a branch, or checking whether a branch name complies with the spec.