socket 1.1.166 → 1.1.168

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,16 @@ 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.168](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.168) - 2026-09-07
8
+
9
+ ### Changed
10
+ - Updated the Coana CLI to v `15.10.37`.
11
+
12
+ ## [1.1.167](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.167) - 2026-09-03
13
+
14
+ ### Changed
15
+ - Updated the Coana CLI to v `15.10.36`.
16
+
7
17
  ## [1.1.166](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.166) - 2026-09-03
8
18
 
9
19
  ### Changed
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.1.166/assets/fleet/badge-follow-x.svg)](https://twitter.com/SocketSecurity)
5
- [![Follow @socket.dev on Bluesky](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.166/assets/fleet/badge-follow-bluesky.svg)](https://bsky.app/profile/socket.dev)
4
+ [![Follow @SocketSecurity](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.168/assets/fleet/badge-follow-x.svg)](https://twitter.com/SocketSecurity)
5
+ [![Follow @socket.dev on Bluesky](https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.168/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
 
@@ -138,8 +138,8 @@ MIT
138
138
  <br/>
139
139
  <div align="center">
140
140
  <picture>
141
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.166/assets/fleet/socket-combomark-dark.svg">
142
- <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.166/assets/fleet/socket-combomark-light.svg">
143
- <img width="324" height="104" alt="Socket" src="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.166/assets/fleet/socket-combomark-light.svg">
141
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.168/assets/fleet/socket-combomark-dark.svg">
142
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.168/assets/fleet/socket-combomark-light.svg">
143
+ <img width="324" height="104" alt="Socket" src="https://raw.githubusercontent.com/SocketDev/socket-cli/v1.1.168/assets/fleet/socket-combomark-light.svg">
144
144
  </picture>
145
145
  </div>
package/dist/cli.js CHANGED
@@ -1915,8 +1915,7 @@ async function performReachabilityAnalysis(options) {
1915
1915
  repoName,
1916
1916
  resolvedPathsSidecar,
1917
1917
  spinner,
1918
- target,
1919
- uploadManifests = true
1918
+ target
1920
1919
  } = {
1921
1920
  __proto__: null,
1922
1921
  ...options
@@ -1956,51 +1955,49 @@ async function performReachabilityAnalysis(options) {
1956
1955
  };
1957
1956
  }
1958
1957
  const wasSpinning = !!spinner?.isSpinning;
1959
- let tarHash;
1960
- if (uploadManifests && orgSlug && packagePaths) {
1961
- // Setup SDK for uploading manifests
1962
- const sockSdkCResult = await utils.setupSdk();
1963
- if (!sockSdkCResult.ok) {
1964
- return sockSdkCResult;
1965
- }
1966
- const sockSdk = sockSdkCResult.data;
1967
- spinner?.start('Uploading manifests for reachability analysis...');
1968
-
1969
- // Ensure uploaded manifest files are relative to analysis target as coana resolves SBOM manifest files relative to this path
1970
- // NOTE: previously stripped any `.socket.facts.json` from packagePaths
1971
- // here to avoid uploading leftover post-reachability output. With the
1972
- // producer flow (`socket manifest gradle --facts`) those files are
1973
- // legitimate INPUT to compute-artifacts, so we now upload them. Stale
1974
- // facts files are cleaned up downstream — see the post-success
1975
- // deletion in handle-create-new-scan.mts.
1976
- const uploadCResult = await utils.handleApiCall(sockSdk.uploadManifestFiles(orgSlug, packagePaths, {
1977
- pathsRelativeTo: path.resolve(cwd, analysisTarget)
1978
- }), {
1979
- description: 'upload manifests',
1980
- spinner
1981
- });
1982
- spinner?.stop();
1983
- if (!uploadCResult.ok) {
1984
- if (wasSpinning) {
1985
- spinner.start();
1986
- }
1987
- return uploadCResult;
1958
+
1959
+ // Setup SDK for uploading manifests
1960
+ const sockSdkCResult = await utils.setupSdk();
1961
+ if (!sockSdkCResult.ok) {
1962
+ return sockSdkCResult;
1963
+ }
1964
+ const sockSdk = sockSdkCResult.data;
1965
+ spinner?.start('Uploading manifests for reachability analysis...');
1966
+
1967
+ // Ensure uploaded manifest files are relative to analysis target as coana resolves SBOM manifest files relative to this path
1968
+ // NOTE: previously stripped any `.socket.facts.json` from packagePaths
1969
+ // here to avoid uploading leftover post-reachability output. With the
1970
+ // producer flow (`socket manifest gradle --facts`) those files are
1971
+ // legitimate INPUT to compute-artifacts, so we now upload them. Stale
1972
+ // facts files are cleaned up downstream see the post-success
1973
+ // deletion in handle-create-new-scan.mts.
1974
+ const uploadCResult = await utils.handleApiCall(sockSdk.uploadManifestFiles(orgSlug, packagePaths, {
1975
+ pathsRelativeTo: path.resolve(cwd, analysisTarget)
1976
+ }), {
1977
+ description: 'upload manifests',
1978
+ spinner
1979
+ });
1980
+ spinner?.stop();
1981
+ if (!uploadCResult.ok) {
1982
+ if (wasSpinning) {
1983
+ spinner.start();
1988
1984
  }
1989
- tarHash = uploadCResult.data?.tarHash;
1990
- if (!tarHash) {
1991
- if (wasSpinning) {
1992
- spinner.start();
1993
- }
1994
- return {
1995
- ok: false,
1996
- message: 'Failed to get manifest tar hash',
1997
- cause: 'Server did not return a tar hash for the uploaded manifests'
1998
- };
1985
+ return uploadCResult;
1986
+ }
1987
+ const tarHash = uploadCResult.data?.tarHash;
1988
+ if (!tarHash) {
1989
+ if (wasSpinning) {
1990
+ spinner.start();
1999
1991
  }
2000
- spinner?.start();
2001
- spinner?.success(`Manifests uploaded successfully. Tar hash: ${tarHash}`);
1992
+ return {
1993
+ ok: false,
1994
+ message: 'Failed to get manifest tar hash',
1995
+ cause: 'Server did not return a tar hash for the uploaded manifests'
1996
+ };
2002
1997
  }
2003
1998
  spinner?.start();
1999
+ spinner?.success(`Manifests uploaded successfully. Tar hash: ${tarHash}`);
2000
+ spinner?.start();
2004
2001
  spinner?.infoAndStop('Running reachability analysis with Coana...');
2005
2002
  const outputFilePath = outputPath || constants.default.DOT_SOCKET_DOT_FACTS_JSON;
2006
2003
 
@@ -2014,12 +2011,12 @@ async function performReachabilityAnalysis(options) {
2014
2011
  }
2015
2012
 
2016
2013
  // Build Coana arguments.
2017
- const coanaArgs = ['run', analysisTarget, '--output-dir', path.dirname(outputFilePath), '--socket-mode', outputFilePath, '--disable-report-submission', ...(isOmittedReachValue(reachabilityOptions.reachAnalysisTimeout) ? [] : ['--analysis-timeout', reachabilityOptions.reachAnalysisTimeout]), ...(isOmittedReachValue(reachabilityOptions.reachAnalysisMemoryLimit) ? [] : ['--memory-limit', reachabilityOptions.reachAnalysisMemoryLimit]), ...(reachabilityOptions.reachConcurrency ? ['--concurrency', `${reachabilityOptions.reachConcurrency}`] : []), ...(reachabilityOptions.reachContinueOnAnalysisErrors ? ['--reach-continue-on-analysis-errors'] : []), ...(reachabilityOptions.reachContinueOnInstallErrors ? ['--reach-continue-on-install-errors'] : []), ...(reachabilityOptions.reachContinueOnMissingLockFiles ? ['--reach-continue-on-missing-lock-files'] : []), ...(reachabilityOptions.reachContinueOnNoSourceFiles ? ['--reach-continue-on-no-source-files'] : []), ...(reachabilityOptions.reachDebug ? ['--debug'] : []), ...(reachabilityOptions.reachDetailedAnalysisLogFile ? ['--print-analysis-log-file'] : []), ...(reachabilityOptions.reachDisableAnalytics ? ['--disable-analytics-sharing'] : []), ...(reachabilityOptions.reachDisableExternalToolChecks ? ['--disable-external-tool-checks'] : []), ...(reachabilityOptions.reachEnableAnalysisSplitting ? [] : ['--disable-analysis-splitting']), ...(tarHash ? ['--run-without-docker', '--manifests-tar-hash', tarHash] : []),
2014
+ const coanaArgs = ['run', analysisTarget, '--output-dir', path.dirname(outputFilePath), '--socket-mode', outputFilePath, '--disable-report-submission', ...(isOmittedReachValue(reachabilityOptions.reachAnalysisTimeout) ? [] : ['--analysis-timeout', reachabilityOptions.reachAnalysisTimeout]), ...(isOmittedReachValue(reachabilityOptions.reachAnalysisMemoryLimit) ? [] : ['--memory-limit', reachabilityOptions.reachAnalysisMemoryLimit]), ...(reachabilityOptions.reachConcurrency ? ['--concurrency', `${reachabilityOptions.reachConcurrency}`] : []), ...(reachabilityOptions.reachContinueOnAnalysisErrors ? ['--reach-continue-on-analysis-errors'] : []), ...(reachabilityOptions.reachContinueOnInstallErrors ? ['--reach-continue-on-install-errors'] : []), ...(reachabilityOptions.reachContinueOnMissingLockFiles ? ['--reach-continue-on-missing-lock-files'] : []), ...(reachabilityOptions.reachContinueOnNoSourceFiles ? ['--reach-continue-on-no-source-files'] : []), ...(reachabilityOptions.reachDebug ? ['--debug'] : []), ...(reachabilityOptions.reachDetailedAnalysisLogFile ? ['--print-analysis-log-file'] : []), ...(reachabilityOptions.reachDisableAnalytics ? ['--disable-analytics-sharing'] : []), ...(reachabilityOptions.reachDisableExternalToolChecks ? ['--disable-external-tool-checks'] : []), ...(reachabilityOptions.reachEnableAnalysisSplitting ? [] : ['--disable-analysis-splitting']), '--run-without-docker', '--manifests-tar-hash', tarHash,
2018
2015
  // Empty reachEcosystems implies scanning all ecosystems.
2019
2016
  ...(reachabilityOptions.reachEcosystems.length ? ['--purl-types', ...reachabilityOptions.reachEcosystems] : []), ...(reachabilityOptions.reachExcludePaths.length ? ['--exclude-dirs', ...reachabilityOptions.reachExcludePaths] : []),
2020
2017
  // sidecarPath is always set above when this is true - Coana rejects this
2021
2018
  // flag without one.
2022
- ...(reachabilityOptions.dynamicSbomInference ? ['--maven-use-only-socket-facts'] : []), ...(reachabilityOptions.reachLazyMode ? ['--lazy-mode'] : []), ...(reachabilityOptions.reachSkipCache ? ['--skip-cache-usage'] : []), ...(reachabilityOptions.reachUseOnlyPregeneratedSboms ? ['--use-only-pregenerated-sboms'] : []), ...(sidecarPath ? ['--compute-artifacts-sidecar', sidecarPath] : [])];
2019
+ ...(reachabilityOptions.dynamicSbomInference ? ['--maven-use-only-socket-facts'] : []), ...(reachabilityOptions.reachSkipCache ? ['--skip-cache-usage'] : []), ...(reachabilityOptions.reachUseOnlyPregeneratedSboms ? ['--use-only-pregenerated-sboms'] : []), ...(sidecarPath ? ['--compute-artifacts-sidecar', sidecarPath] : [])];
2023
2020
 
2024
2021
  // Build environment variables.
2025
2022
  const coanaEnv = {};
@@ -7465,7 +7462,6 @@ async function handleCi(autoManifest) {
7465
7462
  reachEcosystems: [],
7466
7463
  reachEnableAnalysisSplitting: false,
7467
7464
  reachExcludePaths: [],
7468
- reachLazyMode: false,
7469
7465
  reachRetainFactsFile: false,
7470
7466
  reachSkipCache: false,
7471
7467
  reachUseOnlyPregeneratedSboms: false,
@@ -19380,8 +19376,8 @@ const reachabilityFlags = {
19380
19376
  reachLazyMode: {
19381
19377
  type: 'boolean',
19382
19378
  default: false,
19383
- description: 'Enable lazy mode for reachability analysis.',
19384
- hidden: true
19379
+ hidden: true,
19380
+ description: 'Deprecated: lazy mode is no longer supported. This flag is a no-op.'
19385
19381
  },
19386
19382
  reachRetainFactsFile: {
19387
19383
  type: 'boolean',
@@ -19461,6 +19457,10 @@ async function validateReachabilityTarget(targets, cwd) {
19461
19457
  }
19462
19458
 
19463
19459
  const CMD_NAME$a = 'create';
19460
+
19461
+ // Accepted for backwards compatibility but forwarded nowhere, so passing one
19462
+ // must not imply --reach.
19463
+ const DEPRECATED_NO_OP_REACH_FLAGS = new Set(['reachDisableAnalysisSplitting', 'reachLazyMode']);
19464
19464
  const description$c = 'Create a new Socket scan and report';
19465
19465
  const hidden$a = false;
19466
19466
  const generalFlags$1 = {
@@ -19668,7 +19668,7 @@ async function run$d(argv, importMeta, {
19668
19668
  reachDisableAnalytics,
19669
19669
  reachDisableExternalToolChecks,
19670
19670
  reachEnableAnalysisSplitting,
19671
- reachLazyMode,
19671
+ reachLazyMode: _reachLazyMode,
19672
19672
  reachRetainFactsFile,
19673
19673
  reachSkipCache,
19674
19674
  reachUseOnlyPregeneratedSboms,
@@ -19823,9 +19823,8 @@ async function run$d(argv, importMeta, {
19823
19823
 
19824
19824
  // Compare every boolean reach flag against its declared default so newly
19825
19825
  // added flags require --reach automatically instead of relying on a
19826
- // hand-maintained list. The deprecated no-op
19827
- // --reach-disable-analysis-splitting is excluded on purpose.
19828
- const isUsingAnyBooleanReachFlag = Object.entries(reachabilityFlags).some(([name, flag]) => flag.type === 'boolean' && name !== 'reachDisableAnalysisSplitting' && cli.flags[name] !== flag.default);
19826
+ // hand-maintained list. Deprecated no-ops are excluded on purpose.
19827
+ const isUsingAnyBooleanReachFlag = Object.entries(reachabilityFlags).some(([name, flag]) => flag.type === 'boolean' && !DEPRECATED_NO_OP_REACH_FLAGS.has(name) && cli.flags[name] !== flag.default);
19829
19828
  const isUsingAnyReachabilityFlags = hasReachEcosystems || hasReachExcludePaths || isUsingAnyBooleanReachFlag || isUsingNonDefaultConcurrency || isUsingNonDefaultMemoryLimit || isUsingNonDefaultTimeout || isUsingNonDefaultVersion;
19830
19829
 
19831
19830
  // Validate target constraints when --reach is enabled.
@@ -19927,7 +19926,6 @@ async function run$d(argv, importMeta, {
19927
19926
  reachEcosystems,
19928
19927
  reachEnableAnalysisSplitting: Boolean(reachEnableAnalysisSplitting),
19929
19928
  reachExcludePaths,
19930
- reachLazyMode: Boolean(reachLazyMode),
19931
19929
  reachRetainFactsFile: Boolean(reachRetainFactsFile),
19932
19930
  reachSkipCache: Boolean(reachSkipCache),
19933
19931
  reachUseOnlyPregeneratedSboms: Boolean(reachUseOnlyPregeneratedSboms),
@@ -20645,7 +20643,6 @@ async function scanOneRepo(repoSlug, {
20645
20643
  reachEcosystems: [],
20646
20644
  reachEnableAnalysisSplitting: false,
20647
20645
  reachExcludePaths: [],
20648
- reachLazyMode: false,
20649
20646
  reachRetainFactsFile: false,
20650
20647
  reachSkipCache: false,
20651
20648
  reachUseOnlyPregeneratedSboms: false,
@@ -21899,8 +21896,7 @@ async function runScanReach({
21899
21896
  reachabilityOptions: mergedReachabilityOptions,
21900
21897
  resolvedPathsSidecar,
21901
21898
  spinner,
21902
- target: targets[0],
21903
- uploadManifests: true
21899
+ target: targets[0]
21904
21900
  });
21905
21901
  spinner.stop();
21906
21902
 
@@ -22042,7 +22038,7 @@ async function run$7(argv, importMeta, {
22042
22038
  reachDisableAnalytics,
22043
22039
  reachDisableExternalToolChecks,
22044
22040
  reachEnableAnalysisSplitting,
22045
- reachLazyMode,
22041
+ reachLazyMode: _reachLazyMode,
22046
22042
  reachRetainFactsFile,
22047
22043
  reachSkipCache,
22048
22044
  reachUseOnlyPregeneratedSboms,
@@ -22147,7 +22143,6 @@ async function run$7(argv, importMeta, {
22147
22143
  reachEcosystems,
22148
22144
  reachEnableAnalysisSplitting: Boolean(reachEnableAnalysisSplitting),
22149
22145
  reachExcludePaths,
22150
- reachLazyMode: Boolean(reachLazyMode),
22151
22146
  reachRetainFactsFile: Boolean(reachRetainFactsFile),
22152
22147
  reachSkipCache: Boolean(reachSkipCache),
22153
22148
  reachUseOnlyPregeneratedSboms: Boolean(reachUseOnlyPregeneratedSboms),
@@ -24098,5 +24093,5 @@ process.on('unhandledRejection', async (reason, promise) => {
24098
24093
  // eslint-disable-next-line n/no-process-exit
24099
24094
  process.exit(1);
24100
24095
  });
24101
- //# debugId=33f14952-bd82-49b9-8fcf-7a7cc5bf3926
24096
+ //# debugId=4125e182-5da6-4cc5-ae30-fed3061b33a7
24102
24097
  //# sourceMappingURL=cli.js.map