secret-scanning

Configure GitHub secret scanning, push protection, custom patterns, and alert remediation workflows.

3|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/firstsun-dev/skills --skill secret-scanning-firstsun-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: secret-scanning
Source: https://github.com/firstsun-dev/skills/tree/main/plugins/software-delivery/skills/secret-scanning
Command: npx skills add https://github.com/firstsun-dev/skills --skill secret-scanning-firstsun-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Leaked credentials in Git history, issues, and pull requests create serious security exposure, and teams often lack clear procedures for enabling detection, blocking secret pushes, and remediating alerts. This Skill provides step-by-step operational guidance for the full GitHub secret scanning lifecycle. ## Core Features & Use Cases - Enablement and Configuration: Walks through enabling Secret Protection, push protection, validity checks, AI detection, and path exclusions via secret_scanning.yml at repository, organization, and enterprise scope. - Blocked Push Resolution: Provides exact Git commands (amend, interactive rebase) and bypass workflows, including delegated bypass request handling. - Custom Patterns and Alert Management: Covers regex-based custom pattern creation with dry runs, Copilot-assisted pattern generation, alert triage by validity status, credential rotation, and REST API endpoints. - Use Case: A developer's push is blocked because an API key was committed. Use this Skill to remove the secret from history with interactive rebase, rotate the credential, and configure push protection so it cannot happen again. ## Quick Start Ask the agent to enable secret scanning and push protection for your repository and explain how to resolve a blocked push.

Frequently Asked Questions about secret-scanning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable secret scanning and push protection on GitHub?▼

Navigate to repository Settings, then Advanced Security, and enable Secret Protection followed by Push protection. For organizations, use security configurations under Global settings to enable both features at scale across repositories.

How do I fix a push blocked by GitHub push protection?▼

Remove the secret by amending the latest commit with git commit --amend, or use interactive rebase for earlier commits. Alternatively, visit the bypass URL from the error message, select a reason, and re-push within 3 hours.

How do I create custom secret scanning patterns with regex?▼

Go to Settings, Advanced Security, Custom patterns, and select New pattern. Enter a name and regex, add a sample test string, run a dry run to check up to 1,000 results for false positives, then publish the pattern.

Does GitHub secret scanning work on private repositories?▼

Secret scanning is automatic and free on public repositories. Private and internal organization-owned repositories require GitHub Secret Protection, available on Team or Enterprise Cloud plans.

What should I do first when a secret scanning alert appears?▼

Rotate the exposed credential immediately by revoking and reissuing it, since this matters more than removing it from Git history. Then check the validity status, update references, investigate usage during exposure, and close the alert.

How do I exclude files from GitHub secret scanning?▼

Create a .github/secret_scanning.yml file with a paths-ignore list of glob patterns for directories like docs or test fixtures. The file supports up to 1,000 entries, and excluded paths also skip push protection checks.