Remediation PRs
Let Socket open pull requests that remediate vulnerabilities, by patching the version you already use or by upgrading to one that isn't vulnerable.
Remediation PRs let Socket open pull requests that remediate vulnerabilities in your repositories. Socket prepares the change, opens the pull request through the Socket GitHub App, and links it back to the alert. You review and merge it like any other pull request.
There are two kinds of remediation PR.
| Patch PR | Upgrade PR | |
|---|---|---|
| What it does | Applies Socket Certified Patches, which remove the vulnerability from the version you already use. | Moves the dependency to a version that isn't vulnerable. |
| Version changes | None | Yes |
| How many | One rolling pull request per repository, which Socket keeps up to date. | One pull request per vulnerability. |
| Branch | socket/patch/<base branch> | socket/fix/<GHSA ID> |
| How it starts | An automation | An automation, or a click on a vulnerability alert |

Before you start
- The Socket GitHub App. Remediation PRs work on repositories connected through Socket for GitHub. Repositories that are only scanned through the Socket CLI or the API can still be remediated locally, with the socket-patch CLI for patches and
socket fixfor upgrades. - Write access for the app. The Socket GitHub App needs Contents and Pull requests write access on the repository. See GitHub App permissions.
- Access to the remediation method. Team plans and above include upgrade PRs. If patch PRs are enabled for your organization, you can use free patches for critical vulnerabilities. The Socket Patches add-on gives you access to paid patches as well.
- Private code access. Both methods require private code access. Free, Team and Business plans include it. On Enterprise, your organization needs the Private code access add-on.
- A default branch scan. Socket computes patches and upgrades against the repository's default branch.
Supported ecosystems
| Ecosystem | Upgrade PRs | Patch PRs |
|---|---|---|
| npm | Yes | Yes |
| PyPI | Yes | Yes |
| RubyGems | Yes | Yes |
| Go | Yes | Yes |
| Maven | Yes | Not yet |
| NuGet | Yes | Not yet |
| Cargo | Yes | Not yet |
Enable Remediation PRs
An organization owner or admin can turn on Remediation PRs for the whole organization.
- In the Socket dashboard, go to Settings → Alerts → Remediation PRs.
- Click Enable Remediation PRs to open the disclaimer.
- Read the disclaimer, check I agree that Socket may temporarily store repository clones, then click Agree and enable.

To open a pull request, Socket temporarily clones the repository into an isolated sandbox and deletes the clone once the pull request has been opened or the attempt has failed. This applies to both patch PRs and upgrade PRs. Accepting the disclaimer means you accept that Socket holds these temporary clones.

Disable Remediation PRs
On the Remediation PRs settings page, open the Settings tab. It shows who enabled Remediation PRs and when, and View disclaimer shows the text they accepted.

To turn Remediation PRs off, click Disable Remediation PRs and confirm. Socket stops opening and updating pull requests for all automations, including queued requests. Pull requests that are already open stay open, and your automations stay saved. Turning Remediation PRs back on asks you to accept the disclaimer again.

Automations
An automation opens remediation PRs for you when a matching vulnerability shows up on a repository's default branch. Automations only run while Remediation PRs are enabled.
To create one, go to Settings → Alerts → Remediation PRs, open the Automations tab and click Add automation.
The Automations tab lists your automations with the repositories each one applies to, its method and its status. Use Filter and Search to narrow the list. To change or remove an automation, open the menu at the end of its row and choose Edit or Delete.

Choose a remediation method
Add automation creates a Patch or upgrade automation. To use another method, click the arrow next to the button and pick one from the menu. The dialog names the method at the top.

| Method | What Socket does |
|---|---|
| Patch or upgrade | Patches keep your current version. If no patch exists, or your plan doesn't include it, Socket opens an upgrade PR. |
| Patch only | Socket never changes versions. Vulnerabilities without a patch are left for you to handle. |
| Upgrade only | One upgrade PR per vulnerability. |
The methods you can pick depend on your plan.
Choose what to match
An automation matches on:
- Priority: Socket's composite priority for the finding, from Critical to Low.
- Repositories: all repositories, or the ones you pick. A repository shows up in the list once the Socket GitHub App can access it.
- Ecosystems
Show advanced options adds:
- Severity: the severity of the vulnerability itself.
- Reachability
- Minimum EPSS score (%): only alerts whose exploit probability is at least this value.
- Known exploited vulnerabilities only: only alerts listed in the CISA KEV catalog.
These conditions apply to both patch and upgrade PRs. For example, if you select a repository, npm and High priority, that automation contributes only matching npm findings from that repository to the patch PR. A condition you leave empty matches anything.
Choose where to start
Automations that patch have a Start with setting.
- Future findings only: patch vulnerabilities found from now on. You can include existing ones later.
- Existing and future findings: also patch the vulnerabilities you have today.
Under both options, a repository you connect after creating the automation has every matching vulnerability patched, including the ones it already had when you connected it.
With Existing and future findings selected, Run preview shows which repositories and findings the automation would change before you save it.
How automations behave
- An automation only looks at alerts on a repository's default branch that your security policy doesn't ignore.
- Each repository and advisory pair is attempted once for an upgrade PR. If the attempt fails or you close the pull request, the automation doesn't try that pair again. You can still open one from the alert.
- Upgrade PRs from automations count toward the open pull request limit. Patch PRs are still opened and updated when the limit is reached.
- Use the Status toggle in the list, or Active in the dialog, to pause an automation. If no other active patch automation covers the repository, the patch PR stays open and Socket stops updating it. A build already in progress can finish with the previous settings.
- If you narrow the conditions, Socket rebuilds the patch PR using the findings that still match active automations. If no active patch automation covers the repository after the change, its patch PR stays open and Socket stops updating it.
- When you delete an automation, the confirmation dialog lets you close open patch PRs that no other active patch automation covers. Leave the box unchecked to keep them open. Upgrade PRs stay open.
Open an upgrade PR from an alert
Once Remediation PRs are enabled, Owners, Admins, Members and Contributors can open an upgrade PR straight from a vulnerability alert.
- Open a vulnerability alert on the Alerts page.
- Go to the Remediation tab.
- Click Open upgrade PR.
Socket upgrades the dependency and regenerates the lockfiles in an isolated sandbox. This usually takes 5 to 15 minutes, and longer for large repositories. When the pull request opens, the button turns into View upgrade PR.

A few things to know:
- One pull request per vulnerability. If an upgrade PR for the advisory is already open on the repository, Socket links you to it.
- Draft pull requests. When Socket can't regenerate every lockfile on its side, for example because a package comes from a private registry, it opens the pull request as a draft. The description explains what to run locally to finish it.
- Partial upgrades. When Socket can't remove every vulnerable version, the description says so and lists what it left out and why.
- Closed pull requests. If you close an upgrade PR without merging it, Socket treats the upgrade as declined. Use Re-open upgrade PR on the alert to get a new one.
- Open pull request limit. An organization can have at most 10 upgrade PRs open or in progress at once. Merge or close some to make room. Patch PRs don't count toward this limit. If you need a higher limit, contact your Socket sales representative.

Patch PRs
Socket keeps one patch PR per repository. Each time there's something new to patch, Socket updates that same pull request, so you don't get a new pull request per vulnerability. When a run shows there's nothing left to patch, Socket closes it.
The pull request description lists the patched packages with their advisories and severity, the files that changed, and any package manager setting Socket had to add so the patched packages install.

Socket only updates the branch while it holds Socket's own commits:
- If you push to the patch PR, Socket stops updating it and leaves one comment saying so. Your commits, the title and the description stay as they are. After you merge or close it, Socket opens a new one when there's more to patch.
- If you close the patch PR without merging, Socket treats that set of patches as declined. It opens a new patch PR when the set of patches changes.
- If you merge the patch PR, the vulnerabilities show as patched after the next scan of the default branch.
Repositories that commit Socket patch files under .socket/vendor can't get patch PRs. Remove those files from the default branch first.
Track remediation PRs
Open Remediation in the dashboard sidebar. The Patch PRs and Upgrade PRs tabs show what Socket did and why.
While Remediation PRs are off, the page says so. Owners and admins get an Open in Settings button that takes them to the settings page.

Patch PRs tab
Each row is a repository and base branch, with Latest run, Pull request and Last update. The Pull request column shows the state of the patch PR and the automations that cover the repository.
| State | Meaning |
|---|---|
| No PR yet | Socket hasn't opened a patch PR for this repository. |
| Open | The patch PR is open and waiting for review. |
| Merged, waiting for scan | You merged it. Socket is waiting for a scan of the default branch. |
| Merged | Socket has scanned the default branch since the PR was merged. |
| Closed | The patch PR was closed without being merged. |
Latest run shows how the most recent run for the repository went.
| Latest run | Meaning |
|---|---|
| Queued | The run is waiting to start. |
| Building | Socket is preparing the patches. |
| Opened PR | The run opened a new patch PR. |
| Updated PR | The run updated the open patch PR. |
| Left PR unchanged | The open patch PR already holds everything there is to patch. |
| Stopped updating PR | Socket closed the patch PR and left a comment on it that says why. |
| Nothing to patch | No vulnerability needed a patch, and no patch PR was open. |
| Failed | Socket couldn't finish the run. Click Why? for the reason. |
| Skipped | Socket left the repository alone, for example because the last patch PR was closed without being merged. Click Why? for the reason. |
Use History to see recent runs for the repository. Each run shows what started it, for example Automation saved, Alert changed, Scan finished or Scheduled check, and how many packages weren't patched.
Click Run now to have Socket check the repository for patches right away. An active automation has to cover the repository, and there's a short wait between runs.

Upgrade PRs tab
Open upgrade pull requests shows how many of the organization's upgrade PRs are open or being prepared, out of the limit. A banner appears when three or fewer are left, and when the limit is reached.
Each attempt has a row with Repository, Attempt status, Pull request and Last update. The advisory is listed under the repository. The Pull request column also shows who requested the upgrade or which automation started it.
| Attempt status | Meaning |
|---|---|
| Queued | The attempt is waiting to start. |
| Applying upgrade | Socket is upgrading the dependency. |
| Finalizing upgrade | Socket is finishing the upgrade and opening the pull request. |
| Opened PR | The pull request is open and ready for review. |
| Opened draft PR | The pull request opened as a draft because a lockfile needs to be finalized locally. |
| Failed | Socket couldn't open a pull request. Click Why? for the reason. |
| Skipped | Socket didn't open a pull request, for example because one was already open. |
| No patch available | A Patch or upgrade automation found no usable patch for a vulnerability that was already there when the automation was created. |

Troubleshooting
| What you see | What to do |
|---|---|
| There's no Open upgrade PR button on the alert. | The feature isn't available to your organization or your plan, or your role can't open upgrade PRs. |
| "An organization admin has to enable Remediation PRs in Settings before Socket can open one." | Ask an organization admin to enable Remediation PRs. |
| The repository isn't connected through the Socket GitHub App. | Install the Socket GitHub App on the repository, or remediate locally with the socket-patch CLI or socket fix. |
| The Socket GitHub App needs Contents and Pull requests write access. | Update the app's permissions on GitHub. See GitHub App permissions. |
| "Open upgrade PR limit reached for this organization" | Merge or close some of the open upgrade PRs, or contact your Socket sales representative to request a higher limit. |
| Socket can't open upgrade PRs for this package's ecosystem yet. | See Supported ecosystems. |
| Socket found no upgrade path for the alert. | The default branch may differ from the scanned commit, or no safe version fits your other dependencies. Trying again gives the same result until the repository changes. |
| The directories the upgrade changes have no lockfile Socket can update. | Commit the lockfile your package manager writes to the default branch, then try again. |
| The attempt timed out. | Large repositories can time out on the first attempt. Try again from the alert. |
| The repository’s GitHub connection changed after the upgrade was requested. | Check the repository’s GitHub connection, then request the upgrade again. |
| Socket held back a partially written lockfile. | Use socket fix locally to apply the upgrade and regenerate the lockfile. |
| The patch PR branch already exists and belongs to someone else. | Review the existing branch with its owner. Once the branch name is available, Socket can open a patch PR. |
Related
Updated 40 minutes ago