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
Forward Coana's new --package-managers filter (coana-tech/coana-package-manager#2214) through socket fix so users can narrow fix computation to specific package managers within an ecosystem (e.g. only PNPM in a monorepo that mixes pnpm/yarn/npm).
The flag accepts comma- or space-separated values, is case-insensitive (normalized to uppercase before validation and forward), and is passed to both `find-vulnerabilities` and `compute-fixes-and-upgrade-purls`. When combined with --ecosystems, both filters must match (Coana intersects them per-artifact).
Valid values mirror Coana's getFilterablePackageManagers(): CARGO, COMPOSER, GO, GRADLE, MAVEN, NPM, NUGET, PIPENV, PIP_REQUIREMENTS, PNPM, POETRY, RUBYGEMS, RUSH, SBT, YARN.
Out of scope (matching the Coana PR): --package-managers is not added to socket scan reach / the coana run command — that command's --purl-types runs at ecosystem-level pre-install and a per-PM filter would require a larger refactor in Coana.
--no-apply-fixes Compute fixes only, do not apply them. Logs what upgrades would be applied. If combined with --output-file, the output file will contain the upgrades that would be applied.
184
184
--no-major-updates Do not suggest or apply fixes that require major version updates of direct or transitive dependencies
185
185
--output-file Path to store upgrades as a JSON file at this path.
186
+
--package-managers Limit fix analysis to specific package managers within an ecosystem (e.g. NPM, PNPM, YARN, MAVEN, POETRY). Accepts space- or comma-separated values and is case-insensitive. When combined with --ecosystems, an artifact must satisfy both filters.
186
187
--pr-limit Maximum number of pull requests to create in CI mode (default 10). Has no effect in local mode.
187
188
--range-style Define how dependency version ranges are updated in package.json (default 'preserve').
'Limit fix analysis to specific ecosystems. Can be provided as comma separated values or as multiple flags. Defaults to all ecosystems.',
168
172
isMultiple: true,
169
173
},
174
+
packageManagers: {
175
+
type: 'string',
176
+
default: [],
177
+
description:
178
+
'Limit fix analysis to specific package managers within an ecosystem (e.g. NPM, PNPM, YARN, MAVEN, POETRY). Accepts space- or comma-separated values and is case-insensitive. When combined with --ecosystems, an artifact must satisfy both filters.',
179
+
isMultiple: true,
180
+
},
170
181
showAffectedDirectDependencies: {
171
182
type: 'boolean',
172
183
default: false,
@@ -311,6 +322,7 @@ async function run(
311
322
maxSatisfying,
312
323
minimumReleaseAge,
313
324
outputFile,
325
+
packageManagers,
314
326
prCheck,
315
327
prLimit,
316
328
rangeStyle,
@@ -336,6 +348,7 @@ async function run(
336
348
minSatisfying: boolean
337
349
minimumReleaseAge: string
338
350
outputFile: string
351
+
packageManagers: string[]
339
352
prCheck: boolean
340
353
prLimit: number
341
354
rangeStyle: RangeStyle
@@ -370,6 +383,24 @@ async function run(
370
383
validatedEcosystems.push(ecosystemasPURL_Type)
371
384
}
372
385
386
+
// Process and validate package manager values early, before dry-run check.
387
+
// Coana normalizes input to uppercase and rejects unknown values, so do the
388
+
// same here for a consistent UX and an early failure when invalid.
0 commit comments