# Automated pull request creation for new fixes

The following rules are applied to automatic PR creation for vulnerabilities:

* Pull requests are created based on the **Test & Automated Pull Request Frequency** (see screenshot below) setting
* If a scan is manually run (you clicked **Retest now** for the project), the 24-hour window is marked as having been run and no automatic PR is created until the next automated scan runs
* One pull request is created per project
* If **either** the vulnerability itself is new and has a fix available **or** if the fix is new and is not ignored
* For known vulnerabilities see [Automated pull request for known vulnerabilities (backlog)](https://docs.snyk.io/~/changes/m2hJeDrttXy2N83AnRjM/scan-application-code/snyk-open-source/open-source-basics/fix-pull-requests-for-known-vulnerabilities-backlog)

![](https://2533899886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdwVZ6HOZriajCf5nXH%2Fuploads%2Fgit-blob-eeaa60bfa0fc17c64976e041231db4e7faf4a8eb%2Fos1.png?alt=media\&token=049fd199-ea88-4424-895c-9fda0843d1a3)

To know when your last 24-hour window was kicked off, check the project page for **Snapshot taken by recurring test**--also check your email for **\[snyk] Vulnerability alert** for specific scan results:

![](https://2533899886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdwVZ6HOZriajCf5nXH%2Fuploads%2Fgit-blob-375e6da6da9f015c0c57d128496204a5121ae383%2Fos2.png?alt=media\&token=616a92e7-5da6-43ff-844b-417a16664580)

Pull requests for new vulnerabilities are enabled by default for new integrations.

See [Git repository SCM integrations](https://support.snyk.io/hc/en-us/sections/360001138098-Git-repository-SCM-integrations) for full details of supported integrations.

## Enable or disable pull requests for an integration

Enable at the global integration level:

1. Navigate to settings ![](https://2533899886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdwVZ6HOZriajCf5nXH%2Fuploads%2Fgit-blob-6ec48d5a9af2aa5be97d1691317737ef059c75bd%2Fcog_icon.png?alt=media\&token=ff28e035-9d75-4749-aab3-fd21562cd64f) > **Integrations**.
2. Select an SCM integration (for example, GitHub).
3. Enable **New vulnerabilities**

**Apply changes to all overridden projects** will update all of the individual project settings for "Automatic fix pull requests". If a project previously had its own settings for this, clicking on this button will override it with the global setting.

<figure><img src="https://2533899886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdwVZ6HOZriajCf5nXH%2Fuploads%2FmtWOU6i7Yt3sTRcdYW1l%2FScreenshot%202023-05-03%20at%2014.49.59.png?alt=media&#x26;token=ca5eed92-2627-4288-8b46-743bbd0c4fb2" alt="Configure Automatic fix PRs"><figcaption><p>Configure Automatic fix PRs</p></figcaption></figure>

## Enable or disable pull requests for a single project

Enabling/disabling at a project level will override this single project rather than inheriting it from the global integration setting.

1. Under **Projects** select a project and select **Settings** (top right-hand corner).
2. Select **GitHub integration**.
3. Under the **Automatic fix pull requests** section:
   * Select **Customize for only this project**
   * Enable **New vulnerabilities**
   * Select **Save changes**

<figure><img src="https://2533899886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdwVZ6HOZriajCf5nXH%2Fuploads%2Fgit-blob-20dc61d5866cfaa37444f0a25e3d1aa15dd21a12%2Fos3.png?alt=media&#x26;token=61c5341a-b968-4abd-b1fb-00c12c3c997d" alt="Automatic fix pull requests settings at the project level"><figcaption><p>Automatic fix pull requests settings at the project level</p></figcaption></figure>
