You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e72091c
Browse filesBrowse the repository at this point in the historyBrowse files
feat(fix): add opt-in --allow-overrides flag (#1573)
socket fix can now write a package manager override when that is the
only way to fix a vulnerability. This happens when a parent package
declares a version range that rules out every fixed version of the
vulnerable dependency.
The flag is off by default. When it is set, socket fix passes
--allow-overrides to Coana in both local and CI mode. Coana then writes
an npm overrides, pnpm overrides, Yarn Berry resolutions or Rush
globalOverrides entry scoped to the blocking parent. The forced version
can sit outside the range the parent declares, so the parent should be
tested afterwards.
Coana only gets the flag when it is set, so runs keep working with
Coana versions that do not know it yet.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
7
7
## [Unreleased]
8
8
9
+
### Added
10
+
-`socket fix --allow-overrides` fixes a vulnerability that a parent package's version range blocks by writing an override or resolution that forces the fixed version under that parent, in npm, pnpm, Yarn Berry and Rush projects.
--all Process all discovered vulnerabilities in local mode. Cannot be used with --id.
167
+
--allow-overrides When the only fix for a vulnerability is blocked by a parent package's declared version range, write an override or resolution that forces the fixed version under that parent. This can install a version outside the range the parent declares, so test the parent afterwards. Works for npm, pnpm, Yarn Berry and Rush projects.
167
168
--autopilot Enable auto-merge for pull requests that Socket opens.
168
169
See GitHub documentation (https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository) for managing auto-merge for pull requests in your repository.
169
170
--debug Enable debug logging in the Coana-based Socket Fix CLI invocation.
Copy file name to clipboardExpand all lines: src/commands/fix/cmd-fix.mts
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,12 @@ export const cmdFix = {
57
57
}
58
58
59
59
constgeneralFlags: MeowFlags={
60
+
allowOverrides: {
61
+
type: 'boolean',
62
+
default: false,
63
+
description:
64
+
"When the only fix for a vulnerability is blocked by a parent package's declared version range, write an override or resolution that forces the fixed version under that parent. This can install a version outside the range the parent declares, so test the parent afterwards. Works for npm, pnpm, Yarn Berry and Rush projects.",
0 commit comments