socket 1.1.89 → 1.1.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [1.1.90](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.90) - 2026-04-30
8
+
9
+ ### Added
10
+ - `socket fix` now accepts a `--package-managers` flag to narrow fix computation to specific package managers within an ecosystem (e.g. only PNPM in a monorepo that mixes pnpm/yarn/npm). Accepts space- or comma-separated values and is case-insensitive. When combined with `--ecosystems`, both filters must match.
11
+
12
+ ### Changed
13
+ - Updated the Coana CLI to v `15.2.0`.
14
+
7
15
  ## [1.1.89](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.89) - 2026-04-30
8
16
 
9
17
  ### Fixed
package/dist/cli.js CHANGED
@@ -3772,13 +3772,14 @@ async function discoverGhsaIds(orgSlug, tarHash, options) {
3772
3772
  const {
3773
3773
  cwd = process.cwd(),
3774
3774
  ecosystems,
3775
+ packageManagers,
3775
3776
  silence = false,
3776
3777
  spinner
3777
3778
  } = {
3778
3779
  __proto__: null,
3779
3780
  ...options
3780
3781
  };
3781
- const foundCResult = await utils.spawnCoanaDlx(['find-vulnerabilities', cwd, '--manifests-tar-hash', tarHash, ...(ecosystems?.length ? ['--purl-types', ...ecosystems] : [])], orgSlug, {
3782
+ const foundCResult = await utils.spawnCoanaDlx(['find-vulnerabilities', cwd, '--manifests-tar-hash', tarHash, ...(ecosystems?.length ? ['--purl-types', ...ecosystems] : []), ...(packageManagers?.length ? ['--package-managers', ...packageManagers] : [])], orgSlug, {
3782
3783
  cwd,
3783
3784
  spinner: silence ? undefined : spinner,
3784
3785
  coanaVersion: options?.coanaVersion
@@ -3813,6 +3814,7 @@ async function coanaFix(fixConfig) {
3813
3814
  minimumReleaseAge,
3814
3815
  orgSlug,
3815
3816
  outputFile,
3817
+ packageManagers,
3816
3818
  prLimit,
3817
3819
  showAffectedDirectDependencies,
3818
3820
  silence,
@@ -3905,6 +3907,7 @@ async function coanaFix(fixConfig) {
3905
3907
  coanaVersion,
3906
3908
  cwd,
3907
3909
  ecosystems,
3910
+ packageManagers,
3908
3911
  silence,
3909
3912
  spinner
3910
3913
  }) : ghsas;
@@ -3925,7 +3928,7 @@ async function coanaFix(fixConfig) {
3925
3928
  const tmpDir = os.tmpdir();
3926
3929
  const tmpFile = path.join(tmpDir, `socket-fix-${Date.now()}.json`);
3927
3930
  try {
3928
- const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ...ids, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(include.length ? ['--include', ...include] : []), ...(exclude.length ? ['--exclude', ...exclude] : []), ...(ecosystems.length ? ['--purl-types', ...ecosystems] : []), ...(!applyFixes ? [constants.FLAG_DRY_RUN] : []), '--output-file', tmpFile, ...(debug ? ['--debug'] : []), ...(disableExternalToolChecks ? ['--disable-external-tool-checks'] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3931
+ const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ...ids, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(include.length ? ['--include', ...include] : []), ...(exclude.length ? ['--exclude', ...exclude] : []), ...(ecosystems.length ? ['--purl-types', ...ecosystems] : []), ...(packageManagers.length ? ['--package-managers', ...packageManagers] : []), ...(!applyFixes ? [constants.FLAG_DRY_RUN] : []), '--output-file', tmpFile, ...(debug ? ['--debug'] : []), ...(disableExternalToolChecks ? ['--disable-external-tool-checks'] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3929
3932
  coanaVersion,
3930
3933
  cwd,
3931
3934
  spinner: silence ? undefined : spinner,
@@ -3993,6 +3996,7 @@ async function coanaFix(fixConfig) {
3993
3996
  coanaVersion,
3994
3997
  cwd,
3995
3998
  ecosystems,
3999
+ packageManagers,
3996
4000
  silence,
3997
4001
  spinner
3998
4002
  }) : ghsas).slice(0, adjustedPrLimit);
@@ -4036,7 +4040,7 @@ async function coanaFix(fixConfig) {
4036
4040
 
4037
4041
  // Apply fix for single GHSA ID.
4038
4042
  // eslint-disable-next-line no-await-in-loop
4039
- const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ghsaId, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(include.length ? ['--include', ...include] : []), ...(exclude.length ? ['--exclude', ...exclude] : []), ...(ecosystems.length ? ['--purl-types', ...ecosystems] : []), ...(debug ? ['--debug'] : []), ...(disableExternalToolChecks ? ['--disable-external-tool-checks'] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), '--output-file', tmpFile, ...fixConfig.unknownFlags], fixConfig.orgSlug, {
4043
+ const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ghsaId, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(include.length ? ['--include', ...include] : []), ...(exclude.length ? ['--exclude', ...exclude] : []), ...(ecosystems.length ? ['--purl-types', ...ecosystems] : []), ...(packageManagers.length ? ['--package-managers', ...packageManagers] : []), ...(debug ? ['--debug'] : []), ...(disableExternalToolChecks ? ['--disable-external-tool-checks'] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), '--output-file', tmpFile, ...fixConfig.unknownFlags], fixConfig.orgSlug, {
4040
4044
  coanaVersion,
4041
4045
  cwd,
4042
4046
  spinner: silence ? undefined : spinner,
@@ -4384,6 +4388,7 @@ async function handleFix({
4384
4388
  orgSlug,
4385
4389
  outputFile,
4386
4390
  outputKind,
4391
+ packageManagers,
4387
4392
  prCheck,
4388
4393
  prLimit,
4389
4394
  rangeStyle,
@@ -4410,6 +4415,7 @@ async function handleFix({
4410
4415
  minimumReleaseAge,
4411
4416
  outputFile,
4412
4417
  outputKind,
4418
+ packageManagers,
4413
4419
  prCheck,
4414
4420
  prLimit,
4415
4421
  rangeStyle,
@@ -4437,6 +4443,7 @@ async function handleFix({
4437
4443
  minSatisfying,
4438
4444
  orgSlug,
4439
4445
  outputFile,
4446
+ packageManagers,
4440
4447
  prCheck,
4441
4448
  prLimit,
4442
4449
  rangeStyle,
@@ -4553,6 +4560,12 @@ Available styles:
4553
4560
  description: 'Limit fix analysis to specific ecosystems. Can be provided as comma separated values or as multiple flags. Defaults to all ecosystems.',
4554
4561
  isMultiple: true
4555
4562
  },
4563
+ packageManagers: {
4564
+ type: 'string',
4565
+ default: [],
4566
+ description: '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.',
4567
+ isMultiple: true
4568
+ },
4556
4569
  showAffectedDirectDependencies: {
4557
4570
  type: 'boolean',
4558
4571
  default: false,
@@ -4684,6 +4697,7 @@ async function run$K(argv, importMeta, {
4684
4697
  maxSatisfying,
4685
4698
  minimumReleaseAge,
4686
4699
  outputFile,
4700
+ packageManagers,
4687
4701
  prCheck,
4688
4702
  prLimit,
4689
4703
  rangeStyle,
@@ -4713,6 +4727,20 @@ async function run$K(argv, importMeta, {
4713
4727
  validatedEcosystems.push(ecosystem);
4714
4728
  }
4715
4729
 
4730
+ // Process and validate package manager values early, before dry-run check.
4731
+ // Coana normalizes input to uppercase and rejects unknown values, so do the
4732
+ // same here for a consistent UX and an early failure when invalid.
4733
+ const packageManagersRaw = utils.cmdFlagValueToArray(packageManagers).map(s => s.toUpperCase());
4734
+ const validatedPackageManagers = [];
4735
+ for (const pm of packageManagersRaw) {
4736
+ if (!utils.isValidPackageManager(pm)) {
4737
+ logger.logger.fail(`Invalid package manager: "${pm}". Valid values are: ${arrays.joinAnd([...utils.ALL_PACKAGE_MANAGERS])}`);
4738
+ process.exitCode = 1;
4739
+ return;
4740
+ }
4741
+ validatedPackageManagers.push(pm);
4742
+ }
4743
+
4716
4744
  // Collect ghsas early to validate --all and --id mutual exclusivity.
4717
4745
  const ghsas = arrays.arrayUnique([...utils.cmdFlagValueToArray(cli.flags['id']), ...utils.cmdFlagValueToArray(cli.flags['ghsa']), ...utils.cmdFlagValueToArray(cli.flags['purl'])]);
4718
4746
  const wasValidInput = utils.checkCommandInput(outputKind, {
@@ -4787,6 +4815,7 @@ async function run$K(argv, importMeta, {
4787
4815
  orgSlug,
4788
4816
  outputFile,
4789
4817
  outputKind,
4818
+ packageManagers: validatedPackageManagers,
4790
4819
  prCheck,
4791
4820
  prLimit,
4792
4821
  rangeStyle,
@@ -15615,5 +15644,5 @@ process.on('unhandledRejection', async (reason, promise) => {
15615
15644
  // eslint-disable-next-line n/no-process-exit
15616
15645
  process.exit(1);
15617
15646
  });
15618
- //# debugId=6e6c11a1-66cb-495b-a9aa-426b4995d18c
15647
+ //# debugId=153cbd15-be5d-4aed-94ad-8f71776559da
15619
15648
  //# sourceMappingURL=cli.js.map