Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

GitHub secret scanning finds exposed credentials in GitHub content, while push protection blocks many supported secrets before they are committed. Public repositories on GitHub.com receive secret scanning automatically at no charge; organization-owned private and internal repositories need GitHub Secret Protection on GitHub Team or GitHub Enterprise Cloud. When an alert appears, rotate or revoke the credential first, then decide whether history cleanup is necessary.

What is GitHub secret scanning?

GitHub secret scanning is a credential-leak detection service. It looks for API keys, passwords, access tokens, private keys, connection strings, and other credential formats in repository content so an owner can revoke or rotate them before someone abuses them. The service scans the entire Git history on every branch, not only the latest commit, and periodically rescans repositories when GitHub adds detector types. Archived repositories can still contain detectable secrets.

Scanning is primarily detective: it reports a secret after it reaches a protected surface. Push protection is the preventative companion. It evaluates supported content during a push and stops the push before the secret reaches the repository, when the detector and repository policy support blocking.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

GitHub reported that more than 1 billion developer pushes were scanned with push protection in 2025 and that 91 million repositories were protected by secret scanning in 2025. Those are GitHub figures, not an independent benchmark.

Popular on Amazon
Silkland 40Gbps USB C 90 Degree Right Angle Adapter 2 Pack, 240W USB4 | Male to Female Extender, 8K@60Hz, Thunderbolt 4/3, Steam Deck, ROG Ally, MacBook, Switch 2, iPhone 18/17/16/15, Quest 3 VR
  • 【90 Degree Full Function USB C Adapter】Supports the latest USB4 standard for up to 40Gbps of bandwidth, 8K video support, and up to 240W Fast charging; Support USB PD 3.1 Extended Power Range (EPR) including 140W, 180W and 240W. Your productivity is easily doubled. *Warm Tip: For the best fit, please make sure the USB-C port is fully exposed; thick or bulky cases may affect compatibility.
  • 【Reliable Quality】Made from high-quality, scratch-resistant aluminum alloy, delicate metal frame. get excellent wear resistance and heat dissipation. Non-Slip Design for easier insertion and removal.
  • 【Small and portable】Ultra thin size, ultra compact design, a petite physique that matches the minimalist design of your modern laptops. Coming with a slim figure that won't block the port next to the one it's plugged into.
  • 【Compatibility】Widely work with most usb c, thunderbolt 4/3 devices. Compatibilit for ROG Ally, Steam Deck, Switch, MacBook Pro, Quest 3 VR headset, Surface Book 2, iPhone 18/17/16/15, Samsung Galaxy S23/S22/S21, Note 20/10, Google Pixel, ChromeBook, etc.
  • 【Excellence Customer Support】If you experience any issues or cable failure, simply reach out to our dedicated customer service team. We provide a prompt response within 18 hours, providing you with the necessary technical support to resolve any concerns.

What does GitHub secret scanning cover?

For a repository with secret scanning enabled, coverage extends beyond source files:

  • All Git history on all branches, including older commits.
  • Issue titles, descriptions, and comments, including closed and historical issues.
  • Pull-request titles, descriptions, and comments.
  • GitHub Discussions titles, posts, and comments.
  • Repository wikis.
  • Secret gists.

GitHub documents the exact surfaces and exclusions in its secret-scanning scope reference. A public-monitoring option for enterprises extends detection to public repositories across GitHub, including public issue and pull-request comments and gists. It looks for secrets associated with enterprise members or, where applicable, users whose email address matches a verified enterprise domain. Public-monitoring findings appear in the enterprise security overview rather than a normal repository alert list.

Are GitHub Actions logs scanned?

Actions workflow-log scanning entered public preview on November 9, 2026. It is available to enterprises on GitHub Enterprise Cloud with GitHub Secret Protection or GitHub Advanced Security, including data-residency environments on GHE.com. An enterprise owner enables it under Enterprise settings → Policies → Advanced Security by selecting Enabled in the All repositories dropdown.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Only workflow runs that finish after enablement are scanned; there is no backfill. The preview detects provider patterns, performs validity checks where supported, and keeps the alert after a log is deleted. It does not detect generic patterns, custom patterns, AI-detected secrets, or values already masked by Actions. Preview findings do not send notifications, so administrators must inspect the repository’s secret-scanning alerts.

Does GitHub secret scanning work on private repositories?

Yes, but the plan and ownership model determine eligibility.

Repository Availability
Public repository on GitHub.com Secret scanning runs automatically for free.
Organization-owned private or internal repository Requires GitHub Secret Protection on GitHub Team or GitHub Enterprise Cloud.
User-owned repository Available on GitHub Enterprise Cloud with Enterprise Managed Users, or on GitHub Enterprise Server when the enterprise has Secret Protection enabled.
Private repositories on GitHub.com without the required Advanced Security license Secret-scanning features are disabled.
Repositories on GitHub Enterprise Server or GHE.com Advanced Security licensing is required.

Organizations can review eligibility and an estimated cost from the organization’s Security and quality tab: open Assessments, then choose the Secret Protection option. Public repositories can be enabled for free; private and internal repositories consume Advanced Security licenses.

How many secret types does GitHub detect?

The catalog changes as providers introduce token formats. GitHub’s supported-patterns documentation listed 532 of 532 provider patterns on November 12, 2026. Treat that number as a dated snapshot, not a permanent limit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Also popular on Amazon
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Detectors fall into three practical groups:

  • Provider patterns: identifiable credentials for services such as cloud, payments, source control, and communications providers. These are generally regular-expression detectors, and supported providers may offer validity checks.
  • Generic patterns: credentials without a unique provider signature, including RSA, OpenSSH, EC, generic, and PGP private keys; PostgreSQL, MySQL, and MongoDB connection strings; and HTTP Basic or Bearer authentication headers. Generic patterns cannot be validity-checked.
  • AI-detected secrets: unstructured values such as passwords identified from context rather than a fixed token format. Password validity cannot be checked. AI push protection is in public preview and uses Secret Protection AI credits.

Organizations with Secret Protection can also create custom regular-expression patterns and optionally enable push protection for each one. GitHub offers AI assistance for generating a custom expression, but the organization remains responsible for reviewing false positives and exclusions.

Some credentials are represented as pairs. For example, an access-key identifier and its secret must occur in the same file and both be pushed before GitHub creates the paired alert. Splitting the two values across files or repositories does not satisfy the pair detector.

Push protection supports only the newest token versions that GitHub can identify with high confidence. Legacy formats can still produce post-push alerts while being skipped by push protection. A GitHub Enterprise Server personal access token is not detected on GitHub Enterprise Cloud, and an Enterprise Cloud token is not detected on Enterprise Server.

What is the difference between GitHub secret scanning and push protection?

Secret scanning detects a leak after it is present; push protection attempts to prevent the leak at push time. You normally want both because prevention does not cover every detector, while post-push scanning catches older history, unsupported formats, and non-push surfaces.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Capability Secret scanning Push protection
Timing After a supported secret is found in repository content During a supported push, before the commit reaches the repository
Primary result Alert with location and status Blocked push, with an option to remove or explain the finding
Public repositories Automatic and free on GitHub.com User-level protection is on by default for public repositories; repository-level controls can add policy and alerts
Private/internal organization repositories Requires Secret Protection Requires Secret Protection and administrator enablement
Custom and generic patterns Available when enabled by policy Available when the individual pattern is enabled for push protection
AI-detected passwords Included with Secret Protection and Advanced Security Public preview; consumes Secret Protection AI credits

GitHub publishes a live table of supported push surfaces covering command-line pushes, GitHub web commits and uploads, REST API requests, and GitHub MCP-server interactions for public repositories. Detector support differs by surface and token type, so consult that table rather than assuming every push path behaves identically.

How do I enable push protection?

There are two distinct controls: user push protection and repository push protection.

  1. User protection: On GitHub.com, protection for a personal account is enabled by default for pushes to public repositories. It can stop a user’s push even when the repository has not enabled repository-level push protection.
  2. Repository protection: A repository administrator, organization owner, security manager, or enterprise owner enables it at repository, organization, or enterprise scope. Private repositories require Secret Protection. In repository security settings, turn on secret scanning and push protection, then enable generic, custom, or AI detectors as needed.
  3. Organization policy: Owners can configure a security configuration that applies the setting across repositories and choose which custom or generic patterns are eligible for blocking.

Repository push protection creates an alert when a contributor bypasses it. User-level protection by itself does not create a repository alert when a user bypasses a block.

Also popular on Amazon
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Where are GitHub secret-scanning alerts?

Open the repository’s Security and quality tab, then the secret-scanning view. GitHub currently uses that label; some older training material calls it the Security tab.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

There are three alert categories:

  1. User alerts: a supported secret was detected in repository content. The default list contains provider and enabled custom patterns. A separate generic list contains generic and AI findings.
  2. Push-protection bypass alerts: a contributor allowed a blocked push. Filter the alert list with bypassed:true.
  3. Partner alerts: a participating provider was notified directly. These do not appear in the repository’s Security and quality tab. GitHub states that partner alerts are not sent to repository administrators; the provider may validate and revoke the token itself.

An alert can show the secret type, file path, line, branch, commit, author, code context, and validity state: Valid, Invalid, or Unknown. Where a provider supplies it, extended metadata can include the credential owner, creation and expiry dates, and associated project or organization. Availability varies by provider and token type.

Alerts can be open, resolved, or dismissed. Common resolution reasons are Revoked, False positive, and Used in tests. Generic findings have operational limits: a repository can have at most 5,000 generic alerts, only the first five generic locations are shown, and an AI-detected secret shows only its first location. Generic and AI lists do not appear in security-overview summary cards.

Why didn’t push protection block my secret?

A supported secret can still escape a push block for several documented reasons:

  • Push protection covers only a subset of the lowest-false-positive user-alert patterns; detection does not guarantee blocking.
  • The token is an old or legacy format that the push detector does not support.
  • A very large or complex push timed out. GitHub may scan it afterward and create alerts even though it could not stop the push.
  • The push contains more than five new secrets; the interface shows only the first five at once.
  • More than 1,000 existing secrets are included, in which case push protection does not block the push.
  • A public-repository push larger than 50 MB is skipped by push protection.
  • The pattern, generic scanning, custom rule, or AI detector is disabled by organization policy.

If a bypass dialog lacks commit or file-path details, GitHub says the scan likely ran out of time because the push was too large or its history was too complex. A post-push alert still requires remediation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I fix a GitHub secret-scanning alert?

Use this order: revoke or rotate first, remove future exposure, verify the application, then close the alert with an accurate reason.

  1. Identify the credential and owner. Open the alert and record its provider, location, branch, commit, validity, and any extended metadata. Treat an unknown status as potentially active.
  2. Revoke or rotate immediately. Use the issuing provider’s console or API to disable the exposed key and create a replacement. GitHub’s guidance is explicit: rotate immediately to prevent unauthorized access.
  3. Move the replacement out of code. Store it in repository or environment secrets, deployment-platform secret storage, or an approved enterprise secret manager. Change the application to read the value at runtime and ensure logs do not print it.
  4. Check for use of the old credential. Review provider audit logs, API activity, billing, and permission changes. For a public repository, assume the value was copied and monitor the revoked credential’s account or project.
  5. Remove the value from the current code. Amend an unpushed commit or use interactive rebase before pushing. For already-pushed history, a rewrite can use git filter-repo --replace-text, followed by a carefully coordinated git push --force-with-lease.
  6. Decide whether to rewrite history. GitHub says history removal is time-intensive and often unnecessary once the credential is revoked. Rewriting affects every collaborator, fork, clone, and automation that references the old commit, so coordinate it only when policy or compliance requires removal.
  7. Resolve the alert. In the alert menu choose Close alert, then select Revoked, False positive, or Used in tests. Do not mark an active credential as a false positive merely because the application has not failed yet.

For large exposures, Secret Protection security campaigns group related alerts, assign owners, and track remediation. The REST API can update an alert’s state and resolution or assign it to a user with write access; repository or organization administrator permissions are required. GitHub’s documented examples use the API version header X-GitHub-Api-Version: 2026-03-10.

Also popular on Amazon
BENFEI USB C Hub 5-in-1 with 4K HDMI(Certified), 100W Power Delivery, 3 USB-A, Silicone Cable, Aluminum Case Compatible with MacBook Pro/Air, iPad Pro, iMac, iPhone 15 Pro/Pro Max, XPS, Thinkpad
  • Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
  • Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
  • 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
  • 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
  • Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.

What happens if I bypass push protection?

A repository-level bypass requires a reason and, unless delegated bypass is configured, is available to anyone with write access. GitHub records the event in the audit log, creates an alert in the repository, organization, and enterprise security views, and emails relevant owners, security managers, and watching repository administrators.

The reason controls the initial state: Used in tests closes the alert as used in tests; False positive closes it as a false positive; and I’ll fix it later leaves an open alert. Delegated bypass lets designated actors approve requests, bypass on their own, or receive an exemption. Use a bypass only when the value is demonstrably non-secret or a controlled test fixture, and document the decision.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Is GitHub Secret Protection worth it for private repositories?

Secret Protection is GitHub’s Advanced Security SKU for continuous secret monitoring and prevention on eligible private and internal repositories. It adds push protection, custom patterns, AI-detected secrets, delegated bypass and dismissal, security campaigns, and security-overview analytics to the basic public-repository experience.

GitHub does not publish a USD list price on its Advanced Security license-billing page. Billing is based on unique active committers: a person whose commit was pushed to an enabled repository during the previous 90 days. GitHub App bots are ignored, and one person contributing to multiple repositories consumes one organization- or enterprise-scope license rather than one per repository.

Enterprise Cloud supports metered monthly billing; Enterprise plans can use volume or subscription licensing. Enterprise Server 3.13 and later can use metered billing through GitHub Connect. Check the in-product estimate at Organization Security and quality → Assessments → estimated cost and GitHub’s official billing documentation rather than relying on third-party price claims.

AI push protection consumes Secret Protection AI credits based on file content scanned. A push can consume credits even when no secret is found, so GitHub recommends setting a budget with “stop when limit reached” before enabling it. Post-push AI-detected alerts remain included with Secret Protection and Advanced Security.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What is the free secret risk assessment?

On GitHub Team or GitHub Enterprise, an organization owner or security manager can run a free, on-demand assessment without enabling continuous Secret Protection everywhere. Go to Organization Security and quality → Assessments → Scan your organization.

Also popular on Amazon
𝟒𝐏𝐚𝐜𝐤 𝐔𝐩𝐠𝐫𝐚𝐝𝐞𝐝 USB to USB C Adapter,Type-C Female to A Male Charger Converter for iPhone 18 Charger,iWatch Ultra SE 9 10,iPhone 17 Pro Max 16 15 14,Samsung S25,AirPods,iPad,Car,Xbox
  • 【Read before You Buy】 Note: This adapter is USB 2.0 version and cannot transmit HDM, VGA, or other video signals. Nevertheless, they are fully capable of charging devices,duplicating files, and can be seamlessly integrated with USB-C earphones, wireless network adapters, and SD card adapters.
  • 【Easy to Use and Safe】Thanks to modern manufacturing techniques, we've made these adapters sufficiently compact so that they can remain inserted in your device without noticeable protrusion or inconvenience. This means you don't have to constantly plug and unplug them, reducing the likelihood of wear and misalignment, and making them more convenient to carry around.
  • 【Reliable Quality】Engineered for enhanced durability, durable aluminum alloy shell material,get excellent wear resistance and heat dissipation,the male USB C and female USB connectors & the male USB and female USB C connectors are designed to be plugged and unplugged up to 20000 times. Provides data transfer, device charging, memory space expansion, and additional computer peripherals.
  • 【Think more for you】Do you need to connect a USB-C-enabled device to an odd device that only has USB-A ports? Then these USB-A male to USB-C female adapters are made for you.Simply insert the adapter into the USB-A port on the device, and you can instantly connect your USB-C device to the device that originally didn't have the correct connection port.
  • 【Trusted xiwxi Quality and Service】As a responsible brand seller, you will receive xiwxi's 12-month Quality assurance and lifetime friendly customer service, you're not just buying a product,you're investing in peace of mind with all-round quality and exceptional customer service.

The report counts detected secrets, public leaks, secrets that push protection could have prevented, and categories such as cloud keys, GitHub tokens, and AI-detected secrets. It is a point-in-time inventory, not a substitute for continuous monitoring, non-repository surfaces, push blocking, campaigns, or delegated governance.

How should a team operate secret scanning day to day?

  • Enable secret scanning and push protection for every repository covered by your license, and keep generic and custom detectors aligned with your architecture.
  • Give developers a short path to rotate credentials and replace hardcoded values with environment or managed-secret references.
  • Review open alerts and bypass alerts regularly; assign an owner and due date rather than relying on email alone.
  • Use provider validity checks where available, but treat generic and AI findings as potentially active because they cannot be validity-checked.
  • Limit force-push permissions and document when history rewriting is required.
  • Run the free risk assessment before licensing a larger population to estimate preventable leaks and detector categories.
  • Assume a public leak is copied immediately. Revoke first, investigate second, and preserve provider audit evidence.

GitHub reported that a new secret appears in publicly visible code about once every two seconds and that manual revocation has averaged around 40 days, with roughly one in five secrets taking more than 90 days. Those figures explain why prevention and rapid rotation should be treated as complementary controls, not alternatives.

Frequently Asked Questions

Can GitHub secret scanning detect a secret in an old commit?

Yes. Repository scanning examines Git history on all branches, so an old value can generate an alert even after the file was edited or deleted. A removed line is not equivalent to a revoked credential; disable or rotate the credential first.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do partner alerts show up for repository administrators?

No. Partner alerts go directly to the participating secret provider and are not listed in the repository’s Security and quality tab. The provider may validate and revoke the token, but your team should still replace it wherever it was used.

Can I use the secret-scanning REST API to assign an alert?

Yes. A repository or organization administrator with write access can update an alert’s state and resolution and assign or unassign it. The documented examples use API version header 2026-03-10.

Will deleting a GitHub Actions log remove its secret-scanning alert?

No. In the 2026 public preview, a finding remains available after the workflow log is deleted. The preview scans only runs completed after the enterprise policy was enabled and does not send notifications for those findings.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply. Prices as of December 6, 2026 10:01 am GMT.