@socketsecurity/cli-with-sentry 1.6.0 → 1.6.1

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,11 @@ 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.6.1](https://github.com/SocketDev/socket-cli/releases/tag/v1.6.1) - 2026-10-08
8
+
9
+ ### Changed
10
+ - Updated the Coana CLI to v `15.12.2`.
11
+
7
12
  ## [1.6.0](https://github.com/SocketDev/socket-cli/releases/tag/v1.6.0) - 2026-10-07
8
13
 
9
14
  ### Added
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Socket CLI
2
2
 
3
3
  [![Socket Badge](https://socket.dev/api/badge/npm/package/socket)](https://socket.dev/npm/package/socket)
4
- [![Follow @SocketSecurity](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.0/assets/fleet/badge-follow-x.svg)](https://twitter.com/SocketSecurity)
5
- [![Follow @socket.dev on Bluesky](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.0/assets/fleet/badge-follow-bluesky.svg)](https://bsky.app/profile/socket.dev)
4
+ [![Follow @SocketSecurity](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.1/assets/fleet/badge-follow-x.svg)](https://twitter.com/SocketSecurity)
5
+ [![Follow @socket.dev on Bluesky](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.1/assets/fleet/badge-follow-bluesky.svg)](https://bsky.app/profile/socket.dev)
6
6
 
7
7
  CLI for [Socket.dev](https://socket.dev) — scan dependencies, audit packages, apply security patches, and gate installs from your terminal or CI. This is the 1.x line of the published `socket` package on npm.
8
8
 
@@ -171,8 +171,8 @@ MIT
171
171
  <br/>
172
172
  <div align="center">
173
173
  <picture>
174
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.0/assets/fleet/socket-combomark-dark.svg">
175
- <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.0/assets/fleet/socket-combomark-light.svg">
176
- <img width="324" height="104" alt="Socket" src="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.0/assets/fleet/socket-combomark-light.svg">
174
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.1/assets/fleet/socket-combomark-dark.svg">
175
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.1/assets/fleet/socket-combomark-light.svg">
176
+ <img width="324" height="104" alt="Socket" src="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.6.1/assets/fleet/socket-combomark-light.svg">
177
177
  </picture>
178
178
  </div>
package/dist/cli.js CHANGED
@@ -9034,6 +9034,18 @@ function readWrittenFiles(outputFile) {
9034
9034
  const files = result?.modifiedFiles;
9035
9035
  return Array.isArray(files) && files.every(f => typeof f === 'string') ? new Set(files) : undefined;
9036
9036
  }
9037
+ // Coana exits with this code after writing an --output-file that lists computed fixes it left unapplied.
9038
+ const COANA_FIXES_NOT_APPLIED_EXIT_CODE = 5;
9039
+ function isFixesNotAppliedExit(result) {
9040
+ return !result.ok && result.data?.code === COANA_FIXES_NOT_APPLIED_EXIT_CODE;
9041
+ }
9042
+ function readNotAppliedFixes(fixesResultJson) {
9043
+ const notApplied = fixesResultJson?.notApplied;
9044
+ return Array.isArray(notApplied) ? notApplied : [];
9045
+ }
9046
+ function formatNotAppliedFixes(notApplied) {
9047
+ return notApplied.map(f => ` ${f.ghsa}: ${f.purl} -> ${f.fixedVersion}: ${f.reason}`).join('\n');
9048
+ }
9037
9049
  async function coanaFix(fixConfig) {
9038
9050
  if (!fixConfig.dynamicSbomInference) {
9039
9051
  return await coanaFixWithFacts(fixConfig, undefined);
@@ -9250,7 +9262,7 @@ async function coanaFixWithFacts(fixConfig, factsSlot) {
9250
9262
  if (!silence) {
9251
9263
  spinner?.stop();
9252
9264
  }
9253
- if (!fixCResult.ok) {
9265
+ if (!fixCResult.ok && !isFixesNotAppliedExit(fixCResult)) {
9254
9266
  return fixCResult;
9255
9267
  }
9256
9268
 
@@ -9267,11 +9279,24 @@ async function coanaFixWithFacts(fixConfig, factsSlot) {
9267
9279
  const tmpContent = await fs$1.promises.readFile(tmpFile, 'utf8');
9268
9280
  await fs$1.promises.writeFile(outputFile, tmpContent, 'utf8');
9269
9281
  }
9282
+ const ghsaDetails = fixesResultJson ? [fixesResultJson] : [];
9283
+ const notApplied = readNotAppliedFixes(fixesResultJson);
9284
+ if (!fixCResult.ok || notApplied.length) {
9285
+ return {
9286
+ ok: false,
9287
+ message: fixesResultJson?.type === 'no-fixes-applied' ? 'No computed fixes were applied' : 'Some computed fixes were not applied',
9288
+ cause: formatNotAppliedFixes(notApplied),
9289
+ data: {
9290
+ fixedAll: false,
9291
+ ghsaDetails
9292
+ }
9293
+ };
9294
+ }
9270
9295
  return {
9271
9296
  ok: true,
9272
9297
  data: {
9273
9298
  fixedAll: true,
9274
- ghsaDetails: fixesResultJson ? [fixesResultJson] : []
9299
+ ghsaDetails
9275
9300
  }
9276
9301
  };
9277
9302
  } finally {
@@ -9378,7 +9403,13 @@ async function coanaFixWithFacts(fixConfig, factsSlot) {
9378
9403
  spinner: silence ? undefined : spinner,
9379
9404
  stdio: silence ? 'pipe' : 'inherit'
9380
9405
  });
9381
- if (!fixCResult.ok) {
9406
+ if (isFixesNotAppliedExit(fixCResult)) {
9407
+ if (!silence) {
9408
+ logger.logger.warn(`Not every fix for ${ghsaId} was applied:\n${formatNotAppliedFixes(readNotAppliedFixes(fs$2.readJsonSync(tmpFile, {
9409
+ throws: false
9410
+ })))}`);
9411
+ }
9412
+ } else if (!fixCResult.ok) {
9382
9413
  if (!silence) {
9383
9414
  logger.logger.error(`Update failed for ${ghsaId}: ${utils.getErrorCause(fixCResult)}`);
9384
9415
  }
@@ -24467,5 +24498,5 @@ process.on('unhandledRejection', async (reason, promise) => {
24467
24498
  // eslint-disable-next-line n/no-process-exit
24468
24499
  process.exit(1);
24469
24500
  });
24470
- //# debugId=b7761d71-38de-4772-91bc-d1db319250b4
24501
+ //# debugId=e70a53df-f766-401c-8399-eee0c4d48cc7
24471
24502
  //# sourceMappingURL=cli.js.map