<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/block-pull-requests-with-exposed-secrets-from-merging-ylrghfwq3" -->

---
title: Block pull requests with exposed secrets from merging
description: GitHub now lets repositories block pull requests from merging if they introduce unresolved secret scanning alerts. The new 'require secret scanning alerts are...
canonical: https://daily.dev/posts/block-pull-requests-with-exposed-secrets-from-merging-ylrghfwq3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Block pull requests with exposed secrets from merging | daily.dev
og:description: GitHub now lets repositories block pull requests from merging if they introduce unresolved secret scanning alerts. The new 'require secret scanning alerts are...
og:url: https://daily.dev/posts/block-pull-requests-with-exposed-secrets-from-merging-ylrghfwq3
og:image: https://api.daily.dev/og/posts/yLrGHfwQ3.png
og:image:alt: Block pull requests with exposed secrets from merging
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Block pull requests with exposed secrets from merging

**[GitHub Changelog](https://daily.dev/sources/github_updates)** · 2 min read · 0 upvotes · 0 comments

## Summary

GitHub now lets repositories block pull requests from merging if they introduce unresolved secret scanning alerts. The new 'require secret scanning alerts are resolved' rule can be added to repository rulesets, checking that a secret scan has completed on the head commit and that no alerts remain open for secrets introduced in the PR's commits. By default it blocks provider pattern secrets, with optional configuration to also block custom or generic pattern secrets. This complements push protection, which blocks secrets at push time; the new rule catches cases push protection isn't configured for, such as generic pattern secrets. The feature is in public preview for GitHub Secret Protection or GitHub Advanced Security customers, configurable via the UI, REST API (require_secret_scanning_alert_resolution), or GraphQL (REQUIRE_SECRET_SCANNING_ALERT_RESOLUTION).

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.blog/changelog/2026-09-09-block-pull-requests-with-exposed-secrets-from-merging>

## Questions this post answers

### How do I block a GitHub pull request from merging if it contains an exposed secret?

Enable the 'Require secret scanning alerts are resolved' rule in a repository ruleset under Repository > Rulesets. Once enabled, developers without bypass permissions cannot merge until a secret scan completes on the head commit and any secret scanning alerts introduced by the pull request's commits are resolved. It is in public preview for GitHub Secret Protection or GitHub Advanced Security customers.

_daily.dev keeps developers current on GitHub security features like PR-level secret scanning enforcement._

### What is the difference between GitHub push protection and the new pull request secret scanning rule?

Push protection blocks a secret at push time, before it ever reaches the repository, while the new pull request rule adds a separate check at merge time, catching secrets that push protection isn't enabled or configured to catch. For example, teams can leave push protection off for generic pattern secrets while still requiring the pull request rule to block those same secret types before merge.

_Teams deciding how to layer secret protections can follow GitHub security changes on daily.dev._

### How do I configure GitHub's require_secret_scanning_alert_resolution rule via the API?

Use the REST API rule type require_secret_scanning_alert_resolution with a secret_types parameter to specify which secret categories to enforce, or use the GraphQL enum REQUIRE_SECRET_SCANNING_ALERT_RESOLUTION when defining the rule programmatically in a repository ruleset targeting specific branches.

_Automating repository security rules gets easier when developers track GitHub API changes on daily.dev._

## Similar posts on daily.dev

- [Enterprise governance and policy improvements for secret scanning](https://daily.dev/posts/enterprise-governance-and-policy-improvements-for-secret-scanning-ayi0mz2mi) · GitHub Changelog · 0 upvotes · 0 comments
- [Secret scanning pattern updates and product improvements](https://daily.dev/posts/secret-scanning-pattern-updates-and-product-improvements-bc0vka53d) · GitHub Changelog · 0 upvotes · 0 comments
- [GitHub Secret Scanning Public Monitoring for Enterprises: Coverage and Gaps](https://daily.dev/posts/github-secret-scanning-public-monitoring-for-enterprises-coverage-and-gaps-txomrmpk3) · StepSecurity · 3 upvotes · 0 comments
- [How GitHub used secret scanning to reach inbox zero](https://daily.dev/posts/how-github-used-secret-scanning-to-reach-inbox-zero-26vbmbpb8) · GitHub Blog · 0 upvotes · 0 comments

---

Tags: [#github](https://daily.dev/tags/github), [#cicd](https://daily.dev/tags/cicd), [#appsec](https://daily.dev/tags/appsec)

[View this post on daily.dev](https://daily.dev/posts/block-pull-requests-with-exposed-secrets-from-merging-ylrghfwq3)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Block pull requests with exposed secrets from merging","url":"https://daily.dev/posts/block-pull-requests-with-exposed-secrets-from-merging-ylrghfwq3","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/block-pull-requests-with-exposed-secrets-from-merging-ylrghfwq3"},"datePublished":"2026-09-09T17:19:36.076Z","dateModified":"2026-09-09T17:19:57.971Z","description":"GitHub now lets repositories block pull requests from merging if they introduce unresolved secret scanning alerts. The new 'require secret scanning alerts are...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3769a45cb98cf81e81d7210e77c71c3c?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3769a45cb98cf81e81d7210e77c71c3c?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"GitHub Changelog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"GitHub Changelog","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/15004b7835da4d89b02b115871f0f6dc","url":"https://daily.dev/sources/github_updates"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/block-pull-requests-with-exposed-secrets-from-merging-ylrghfwq3","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"github,cicd,appsec","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"GitHub Changelog","item":"https://daily.dev/sources/github_updates"},{"@type":"ListItem","position":3,"name":"Block pull requests with exposed secrets from merging"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/block-pull-requests-with-exposed-secrets-from-merging-ylrghfwq3#faq","mainEntity":[{"@type":"Question","name":"How do I block a GitHub pull request from merging if it contains an exposed secret?","acceptedAnswer":{"@type":"Answer","text":"Enable the 'Require secret scanning alerts are resolved' rule in a repository ruleset under Repository \u003e Rulesets. Once enabled, developers without bypass permissions cannot merge until a secret scan completes on the head commit and any secret scanning alerts introduced by the pull request's commits are resolved. It is in public preview for GitHub Secret Protection or GitHub Advanced Security customers. daily.dev keeps developers current on GitHub security features like PR-level secret scanning enforcement."}},{"@type":"Question","name":"What is the difference between GitHub push protection and the new pull request secret scanning rule?","acceptedAnswer":{"@type":"Answer","text":"Push protection blocks a secret at push time, before it ever reaches the repository, while the new pull request rule adds a separate check at merge time, catching secrets that push protection isn't enabled or configured to catch. For example, teams can leave push protection off for generic pattern secrets while still requiring the pull request rule to block those same secret types before merge. Teams deciding how to layer secret protections can follow GitHub security changes on daily.dev."}},{"@type":"Question","name":"How do I configure GitHub's require_secret_scanning_alert_resolution rule via the API?","acceptedAnswer":{"@type":"Answer","text":"Use the REST API rule type require_secret_scanning_alert_resolution with a secret_types parameter to specify which secret categories to enforce, or use the GraphQL enum REQUIRE_SECRET_SCANNING_ALERT_RESOLUTION when defining the rule programmatically in a repository ruleset targeting specific branches. Automating repository security rules gets easier when developers track GitHub API changes on daily.dev."}}]}
```

