@socketsecurity/cli-with-sentry 1.1.22 → 1.1.25

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +37 -56
  3. package/dist/cli.js +74 -24
  4. package/dist/cli.js.map +1 -1
  5. package/dist/constants.js +4 -4
  6. package/dist/constants.js.map +1 -1
  7. package/dist/flags.js +8 -8
  8. package/dist/flags.js.map +1 -1
  9. package/dist/socket-completion.bash +0 -0
  10. package/dist/tsconfig.dts.tsbuildinfo +1 -1
  11. package/dist/types/commands/ci/cmd-ci.d.mts.map +1 -1
  12. package/dist/types/commands/fix/cmd-fix.d.mts.map +1 -1
  13. package/dist/types/commands/fix/coana-fix.d.mts.map +1 -1
  14. package/dist/types/commands/fix/handle-fix.d.mts +3 -2
  15. package/dist/types/commands/fix/handle-fix.d.mts.map +1 -1
  16. package/dist/types/commands/fix/types.d.mts +4 -1
  17. package/dist/types/commands/fix/types.d.mts.map +1 -1
  18. package/dist/types/commands/organization/fetch-organization-list.d.mts +1 -1
  19. package/dist/types/commands/organization/fetch-organization-list.d.mts.map +1 -1
  20. package/dist/types/flags.d.mts.map +1 -1
  21. package/dist/types/sea/bootstrap.d.mts +2 -0
  22. package/dist/types/sea/bootstrap.d.mts.map +1 -0
  23. package/dist/types/sea/build-sea.d.mts +27 -0
  24. package/dist/types/sea/build-sea.d.mts.map +1 -0
  25. package/dist/types/utils/dlx.d.mts +3 -0
  26. package/dist/types/utils/dlx.d.mts.map +1 -1
  27. package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
  28. package/dist/types/utils/organization.d.mts.map +1 -1
  29. package/dist/utils.js +29 -9
  30. package/dist/utils.js.map +1 -1
  31. package/dist/vendor.js +7882 -6790
  32. package/package.json +127 -55
  33. package/shadow-bin/npm +0 -0
  34. package/shadow-bin/npx +0 -0
  35. package/shadow-bin/pnpm +0 -0
  36. package/shadow-bin/yarn +0 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ 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.23](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.23) - 2025-09-22
8
+
9
+ ### Changed
10
+ - Enhanced `--no-apply-fixes` flag naming for improved clarity (previously `--dont-apply-fixes`)
11
+ - Streamlined documentation and help text for better user experience
12
+ - Improved `pnpm dlx` operations by removing unnecessary `--ignore-scripts` flag
13
+
14
+ ### Fixed
15
+ - Resolved JSON example formatting in usage documentation
16
+ - Enhanced test reliability for cdxgen on Windows platforms
17
+ - Improved error handling in optimize command for pnpm environments
18
+
7
19
  ## [1.1.22](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.22) - 2025-09-20
8
20
 
9
21
  ### Changed
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Socket Badge](https://socket.dev/api/badge/npm/package/socket)](https://socket.dev/npm/package/socket)
4
4
  [![Follow @SocketSecurity](https://img.shields.io/twitter/follow/SocketSecurity?style=social)](https://twitter.com/SocketSecurity)
5
5
 
6
- > CLI tool for [Socket.dev]
6
+ CLI for [Socket.dev] security analysis
7
7
 
8
8
  ## Usage
9
9
 
@@ -14,73 +14,58 @@ socket --help
14
14
 
15
15
  ## Commands
16
16
 
17
- - `socket npm [args...]` and `socket npx [args...]` - Wraps `npm` and `npx` to
18
- integrate [Socket.dev] and preempt installation of alerted packages using the
19
- builtin resolution of `npm` to precisely determine package installations
17
+ - `socket npm [args...]` and `socket npx [args...]` - Wraps npm/npx with Socket security scanning
20
18
 
21
- - `socket optimize` - Optimize dependencies with
22
- [`@socketregistry`](https://github.com/SocketDev/socket-registry) overrides
23
- _(👀 [our blog post](https://socket.dev/blog/introducing-socket-optimize))_
19
+ - `socket fix` - Fix CVEs in dependencies
24
20
 
25
- - `--pin` - Pin overrides to their latest version
26
- - `--prod` - Add overrides for only production dependencies
21
+ - `socket optimize` - Optimize dependencies with [`@socketregistry`](https://github.com/SocketDev/socket-registry) overrides
27
22
 
28
- - `socket cdxgen [command]` - Call out to
29
- [cdxgen](https://cyclonedx.github.io/cdxgen/#/?id=getting-started). See
30
- [their documentation](https://cyclonedx.github.io/cdxgen/#/CLI?id=getting-help)
31
- for commands.
23
+ - `socket cdxgen [command]` - Run [cdxgen](https://cyclonedx.github.io/cdxgen/#/?id=getting-started) for SBOM generation
32
24
 
33
25
  ## Aliases
34
26
 
35
27
  All aliases support the flags and arguments of the commands they alias.
36
28
 
37
- - `socket ci` - alias for `socket scan create --report` which creates a report for the current directory and quits with an exit code if the result is unhealthy
29
+ - `socket ci` - Alias for `socket scan create --report` (creates report and exits with error if unhealthy)
38
30
 
39
31
  ## Flags
40
32
 
41
33
  ### Output flags
42
34
 
43
- - `--json` - Outputs result as JSON which can be piped into [`jq`](https://stedolan.github.io/jq/) and other tools
44
- - `--markdown` - Outputs result as Markdown which can be copied into issues, pull requests, or chats
35
+ - `--json` - Output as JSON
36
+ - `--markdown` - Output as Markdown
45
37
 
46
38
  ### Other flags
47
39
 
48
- - `--dry-run` - Run a command without uploading anything
49
- - `--debug` - Output additional debug
50
- - `--help` - Prints help documentation
51
- - `--max-old-space-size` - Set Node's V8 [`--max-old-space-size`](https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-mib) option
52
- - `--max-semi-space-size` - Set Node's V8 [`--max-semi-space-size`](https://nodejs.org/api/cli.html#--max-semi-space-sizesize-in-mib) option
53
- - `--version` - Prints the Socket CLI version
40
+ - `--dry-run` - Run without uploading
41
+ - `--debug` - Show debug output
42
+ - `--help` - Show help
43
+ - `--max-old-space-size` - Set Node.js memory limit
44
+ - `--max-semi-space-size` - Set Node.js heap size
45
+ - `--version` - Show version
54
46
 
55
47
  ## Configuration files
56
48
 
57
- Socket CLI reads and uses data from a
58
- [`socket.yml` file](https://docs.socket.dev/docs/socket-yml) in the folder you
59
- run it in. It supports the version 2 of the `socket.yml` file format and makes
60
- use of the `projectIgnorePaths` to excludes files when creating a report.
49
+ Socket CLI reads [`socket.yml`](https://docs.socket.dev/docs/socket-yml) configuration files.
50
+ Supports version 2 format with `projectIgnorePaths` for excluding files from reports.
61
51
 
62
52
  ## Environment variables
63
53
 
64
- - `SOCKET_CLI_API_TOKEN` - Set the Socket API token
65
- - `SOCKET_CLI_CONFIG` - A JSON stringified Socket configuration object
66
- - `SOCKET_CLI_GITHUB_API_URL` - Change the base URL for GitHub REST API calls
67
- - `SOCKET_CLI_GIT_USER_EMAIL` - The git config `user.email` used by Socket CLI<br>
68
- *Defaults:* `github-actions[bot]@users.noreply.github.com`<br>
69
- - `SOCKET_CLI_GIT_USER_NAME` - The git config `user.name` used by Socket CLI<br>
70
- *Defaults:* `github-actions[bot]`<br>
71
- - `SOCKET_CLI_GITHUB_TOKEN` - A classic or fine-grained [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with the "repo" scope or read/write permissions set for "Contents" and "Pull Request"<br>
72
- *Aliases:* `GITHUB_TOKEN`<br>
73
- - `SOCKET_CLI_NO_API_TOKEN` - Make the default API token `undefined`
74
- - `SOCKET_CLI_NPM_PATH` - The absolute location of the npm directory
75
- - `SOCKET_CLI_ORG_SLUG` - Specify the Socket organization slug<br><br>
76
- - `SOCKET_CLI_ACCEPT_RISKS` - Accept risks of a Socket wrapped npm/npx run
77
- - `SOCKET_CLI_VIEW_ALL_RISKS` - View all risks of a Socket wrapped npm/npx run
54
+ - `SOCKET_CLI_API_TOKEN` - Socket API token
55
+ - `SOCKET_CLI_CONFIG` - JSON configuration object
56
+ - `SOCKET_CLI_GITHUB_API_URL` - GitHub API base URL
57
+ - `SOCKET_CLI_GIT_USER_EMAIL` - Git user email (default: `github-actions[bot]@users.noreply.github.com`)
58
+ - `SOCKET_CLI_GIT_USER_NAME` - Git user name (default: `github-actions[bot]`)
59
+ - `SOCKET_CLI_GITHUB_TOKEN` - GitHub token with repo access (alias: `GITHUB_TOKEN`)
60
+ - `SOCKET_CLI_NO_API_TOKEN` - Disable default API token
61
+ - `SOCKET_CLI_NPM_PATH` - Path to npm directory
62
+ - `SOCKET_CLI_ORG_SLUG` - Socket organization slug
63
+ - `SOCKET_CLI_ACCEPT_RISKS` - Accept npm/npx risks
64
+ - `SOCKET_CLI_VIEW_ALL_RISKS` - Show all npm/npx risks
78
65
 
79
66
  ## Contributing
80
67
 
81
- ### Setup
82
-
83
- To run locally execute the following commands:
68
+ Run locally:
84
69
 
85
70
  ```
86
71
  npm install
@@ -88,23 +73,19 @@ npm run build
88
73
  npm exec socket
89
74
  ```
90
75
 
91
- ### Environment variables for development
76
+ ### Development environment variables
92
77
 
93
- - `SOCKET_CLI_API_BASE_URL` - Change the base URL for Socket API calls<br>
94
- *Defaults:* The "apiBaseUrl" value of socket/settings local app data if present, else `https://api.socket.dev/v0/`<br>
95
- - `SOCKET_CLI_API_PROXY` - Set the proxy Socket API requests are routed through, e.g. if set to<br>
96
- [`http://127.0.0.1:9090`](https://docs.proxyman.io/troubleshooting/couldnt-see-any-requests-from-3rd-party-network-libraries), then all request are passed through that proxy<br>
97
- *Aliases:* `HTTPS_PROXY`, `https_proxy`, `HTTP_PROXY`, and `http_proxy`<br>
98
- - `SOCKET_CLI_API_TIMEOUT` - Set the timeout in milliseconds for Socket API requests
99
- - `SOCKET_CLI_DEBUG` - Enable debug logging in Socket CLI
100
- - `DEBUG` - Enable debug logging based on the [`debug`](https://socket.dev/npm/package/debug) package
78
+ - `SOCKET_CLI_API_BASE_URL` - API base URL (default: `https://api.socket.dev/v0/`)
79
+ - `SOCKET_CLI_API_PROXY` - Proxy for API requests (aliases: `HTTPS_PROXY`, `https_proxy`, `HTTP_PROXY`, `http_proxy`)
80
+ - `SOCKET_CLI_API_TIMEOUT` - API request timeout in milliseconds
81
+ - `SOCKET_CLI_DEBUG` - Enable debug logging
82
+ - `DEBUG` - Enable [`debug`](https://socket.dev/npm/package/debug) package logging
101
83
 
102
84
  ## See also
103
85
 
104
- - [Announcement blog post](https://socket.dev/blog/announcing-socket-cli-preview)
105
- - [Socket API Reference](https://docs.socket.dev/reference) - The API used by Socket CLI
106
- - [Socket GitHub App](https://github.com/apps/socket-security) - The plug-and-play GitHub App
107
- - [`@socketsecurity/sdk`](https://github.com/SocketDev/socket-sdk-js) - The SDK used by Socket CLI
86
+ - [Socket API Reference](https://docs.socket.dev/reference)
87
+ - [Socket GitHub App](https://github.com/apps/socket-security)
88
+ - [`@socketsecurity/sdk`](https://github.com/SocketDev/socket-sdk-js)
108
89
 
109
90
  [Socket.dev]: https://socket.dev/
110
91
 
package/dist/cli.js CHANGED
@@ -2378,7 +2378,7 @@ async function handleCi(autoManifest) {
2378
2378
 
2379
2379
  const config$k = {
2380
2380
  commandName: 'ci',
2381
- description: 'Shorthand for `socket scan create --report --no-interactive`',
2381
+ description: 'Alias for `socket scan create --report` (creates report and exits with error if unhealthy)',
2382
2382
  hidden: false,
2383
2383
  flags: {
2384
2384
  ...flags.commonFlags,
@@ -3544,14 +3544,17 @@ async function getFixEnv() {
3544
3544
 
3545
3545
  async function coanaFix(fixConfig) {
3546
3546
  const {
3547
+ applyFixes,
3547
3548
  autopilot,
3548
3549
  cwd,
3549
- dontApplyFixes,
3550
+ disableMajorUpdates,
3550
3551
  ghsas,
3551
3552
  glob,
3552
3553
  limit,
3554
+ minimumReleaseAge,
3553
3555
  orgSlug,
3554
3556
  outputFile,
3557
+ showAffectedDirectDependencies,
3555
3558
  spinner
3556
3559
  } = fixConfig;
3557
3560
  const fixEnv = await getFixEnv();
@@ -3594,7 +3597,7 @@ async function coanaFix(fixConfig) {
3594
3597
  const shouldOpenPrs = fixEnv.isCi && fixEnv.repoInfo;
3595
3598
  if (!shouldOpenPrs) {
3596
3599
  // Inform user about local mode when fixes will be applied.
3597
- if (!dontApplyFixes && ghsas.length) {
3600
+ if (applyFixes && ghsas.length) {
3598
3601
  const envCheck = checkCiEnvVars();
3599
3602
  if (envCheck.present.length) {
3600
3603
  // Some CI vars are set but not all - show what's missing.
@@ -3616,7 +3619,7 @@ async function coanaFix(fixConfig) {
3616
3619
  }
3617
3620
  };
3618
3621
  }
3619
- const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ...(isAll ? ['all'] : ghsas), ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(glob ? ['--glob', glob] : []), ...(dontApplyFixes ? [constants.FLAG_DRY_RUN] : []), ...(outputFile ? ['--output-file', outputFile] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3622
+ const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ...(isAll ? ['all'] : ghsas), ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(glob ? ['--glob', glob] : []), ...(!applyFixes ? [constants.FLAG_DRY_RUN] : []), ...(outputFile ? ['--output-file', outputFile] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3620
3623
  cwd,
3621
3624
  spinner,
3622
3625
  stdio: 'inherit'
@@ -3651,7 +3654,7 @@ async function coanaFix(fixConfig) {
3651
3654
  const shouldSpawnCoana = adjustedLimit > 0;
3652
3655
  let ids;
3653
3656
  if (shouldSpawnCoana && isAll) {
3654
- const foundCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(glob ? ['--glob', glob] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3657
+ const foundCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(glob ? ['--glob', glob] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3655
3658
  cwd,
3656
3659
  spinner
3657
3660
  });
@@ -3693,7 +3696,7 @@ async function coanaFix(fixConfig) {
3693
3696
 
3694
3697
  // Apply fix for single GHSA ID.
3695
3698
  // eslint-disable-next-line no-await-in-loop
3696
- 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] : []), ...(glob ? ['--glob', glob] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3699
+ 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] : []), ...(glob ? ['--glob', glob] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3697
3700
  cwd,
3698
3701
  spinner,
3699
3702
  stdio: 'inherit'
@@ -3903,18 +3906,21 @@ async function convertIdsToGhsas(ids) {
3903
3906
  return validGhsas;
3904
3907
  }
3905
3908
  async function handleFix({
3909
+ applyFixes,
3906
3910
  autopilot,
3907
3911
  cwd,
3908
- dontApplyFixes,
3912
+ disableMajorUpdates,
3909
3913
  ghsas,
3910
3914
  glob,
3911
3915
  limit,
3912
3916
  minSatisfying,
3917
+ minimumReleaseAge,
3913
3918
  orgSlug,
3914
3919
  outputFile,
3915
3920
  outputKind,
3916
3921
  prCheck,
3917
3922
  rangeStyle,
3923
+ showAffectedDirectDependencies,
3918
3924
  spinner,
3919
3925
  unknownFlags
3920
3926
  }) {
@@ -3922,27 +3928,32 @@ async function handleFix({
3922
3928
  require$$9.debugDir('inspect', {
3923
3929
  autopilot,
3924
3930
  cwd,
3931
+ disableMajorUpdates,
3925
3932
  ghsas,
3926
3933
  glob,
3927
3934
  limit,
3928
3935
  minSatisfying,
3929
- dontApplyFixes,
3936
+ applyFixes,
3930
3937
  outputFile,
3931
3938
  outputKind,
3932
3939
  prCheck,
3933
3940
  rangeStyle,
3941
+ showAffectedDirectDependencies,
3934
3942
  unknownFlags
3935
3943
  });
3936
3944
  await outputFixResult(await coanaFix({
3937
3945
  autopilot,
3938
- dontApplyFixes,
3946
+ applyFixes,
3939
3947
  cwd,
3948
+ disableMajorUpdates,
3940
3949
  // Convert mixed CVE/GHSA/PURL inputs to GHSA IDs only
3941
3950
  ghsas: await convertIdsToGhsas(ghsas),
3942
3951
  glob,
3943
3952
  limit,
3953
+ minimumReleaseAge,
3944
3954
  orgSlug,
3945
3955
  rangeStyle,
3956
+ showAffectedDirectDependencies,
3946
3957
  spinner,
3947
3958
  unknownFlags,
3948
3959
  outputFile
@@ -3951,7 +3962,7 @@ async function handleFix({
3951
3962
 
3952
3963
  const CMD_NAME$t = 'fix';
3953
3964
  const DEFAULT_LIMIT = 10;
3954
- const description$z = 'Update dependencies with "fixable" Socket alerts';
3965
+ const description$z = 'Fix CVEs in dependencies';
3955
3966
  const hidden$s = false;
3956
3967
  const cmdFix = {
3957
3968
  description: description$z,
@@ -3964,11 +3975,20 @@ const generalFlags$2 = {
3964
3975
  default: false,
3965
3976
  description: `Enable auto-merge for pull requests that Socket opens.\nSee ${vendor.terminalLinkExports('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.`
3966
3977
  },
3967
- dontApplyFixes: {
3978
+ applyFixes: {
3968
3979
  aliases: ['onlyCompute'],
3969
3980
  type: 'boolean',
3970
- default: false,
3971
- description: '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.'
3981
+ default: true,
3982
+ description: '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.',
3983
+ // Hidden to allow custom documenting of the negated `--no-apply-fixes` variant.
3984
+ hidden: true
3985
+ },
3986
+ majorUpdates: {
3987
+ type: 'boolean',
3988
+ default: true,
3989
+ description: 'Allow major version updates. Use --no-major-updates to disable.',
3990
+ // Hidden to allow custom documenting of the negated `--no-major-updates` variant.
3991
+ hidden: true
3972
3992
  },
3973
3993
  id: {
3974
3994
  type: 'string',
@@ -3999,6 +4019,16 @@ Available styles:
3999
4019
  type: 'string',
4000
4020
  default: '',
4001
4021
  description: 'Path to store upgrades as a JSON file at this path.'
4022
+ },
4023
+ minimumReleaseAge: {
4024
+ type: 'string',
4025
+ default: '',
4026
+ description: 'Set a minimum age requirement for suggested upgrade versions (e.g., 1h, 2d, 3w). A higher age requirement reduces the risk of upgrading to malicious versions. For example, setting the value to 1 week (1w) gives ecosystem maintainers one week to remove potentially malicious versions.'
4027
+ },
4028
+ showAffectedDirectDependencies: {
4029
+ type: 'boolean',
4030
+ default: false,
4031
+ description: 'List the direct dependencies responsible for introducing transitive vulnerabilities and list the updates required to resolve the vulnerabilities'
4002
4032
  }
4003
4033
  };
4004
4034
  const hiddenFlags = {
@@ -4076,7 +4106,20 @@ async function run$K(argv, importMeta, {
4076
4106
  ${utils.getFlagApiRequirementsOutput(`${parentName}:${CMD_NAME$t}`)}
4077
4107
 
4078
4108
  Options
4079
- ${utils.getFlagListOutput(config.flags)}
4109
+ ${utils.getFlagListOutput({
4110
+ ...config.flags,
4111
+ // Explicitly document the negated --no-apply-fixes variant.
4112
+ noApplyFixes: {
4113
+ ...config.flags['applyFixes'],
4114
+ hidden: false
4115
+ },
4116
+ // Explicitly document the negated --no-major-updates variant.
4117
+ noMajorUpdates: {
4118
+ ...config.flags['majorUpdates'],
4119
+ description: 'Do not suggest or apply fixes that require major version updates of direct or transitive dependencies',
4120
+ hidden: false
4121
+ }
4122
+ })}
4080
4123
 
4081
4124
  Environment Variables (for CI/PR mode)
4082
4125
  CI Set to enable CI mode
@@ -4099,22 +4142,26 @@ async function run$K(argv, importMeta, {
4099
4142
  allowUnknownFlags: false
4100
4143
  });
4101
4144
  const {
4145
+ applyFixes,
4102
4146
  autopilot,
4103
- dontApplyFixes,
4104
4147
  glob,
4105
4148
  json,
4106
4149
  limit,
4150
+ majorUpdates,
4107
4151
  markdown,
4108
4152
  maxSatisfying,
4153
+ minimumReleaseAge,
4109
4154
  outputFile,
4110
4155
  prCheck,
4111
4156
  rangeStyle,
4157
+ showAffectedDirectDependencies,
4112
4158
  // We patched in this feature with `npx custompatch meow` at
4113
4159
  // socket-cli/patches/meow#13.2.0.patch.
4114
4160
  unknownFlags = []
4115
4161
  } = cli.flags;
4116
4162
  const dryRun = !!cli.flags['dryRun'];
4117
4163
  const minSatisfying = cli.flags['minSatisfying'] || !maxSatisfying;
4164
+ const disableMajorUpdates = !majorUpdates;
4118
4165
  const outputKind = utils.getOutputKind(json, markdown);
4119
4166
  const wasValidInput = utils.checkCommandInput(outputKind, {
4120
4167
  test: utils.RangeStyles.includes(rangeStyle),
@@ -4150,16 +4197,19 @@ async function run$K(argv, importMeta, {
4150
4197
  const ghsas = arrays.arrayUnique([...utils.cmdFlagValueToArray(cli.flags['id']), ...utils.cmdFlagValueToArray(cli.flags['ghsa']), ...utils.cmdFlagValueToArray(cli.flags['purl'])]);
4151
4198
  await handleFix({
4152
4199
  autopilot,
4153
- dontApplyFixes,
4200
+ applyFixes,
4154
4201
  cwd,
4202
+ disableMajorUpdates,
4155
4203
  ghsas,
4156
4204
  glob,
4157
4205
  limit,
4206
+ minimumReleaseAge,
4158
4207
  minSatisfying,
4159
4208
  prCheck,
4160
4209
  orgSlug,
4161
4210
  outputKind,
4162
4211
  rangeStyle,
4212
+ showAffectedDirectDependencies,
4163
4213
  spinner,
4164
4214
  unknownFlags,
4165
4215
  outputFile
@@ -4988,7 +5038,7 @@ const yargsConfig = {
4988
5038
  };
4989
5039
  const config$e = {
4990
5040
  commandName: 'cdxgen',
4991
- description: 'Create an SBOM with CycloneDX generator (cdxgen)',
5041
+ description: 'Run cdxgen for SBOM generation',
4992
5042
  hidden: false,
4993
5043
  // Stub out flags and help.
4994
5044
  // TODO: Convert yargs to meow.
@@ -6336,7 +6386,7 @@ async function run$y(argv, importMeta, {
6336
6386
 
6337
6387
  const require$5 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
6338
6388
  const CMD_NAME$r = constants.NPM;
6339
- const description$w = 'Run npm with the Socket wrapper';
6389
+ const description$w = 'Wraps npm with Socket security scanning';
6340
6390
  const hidden$q = false;
6341
6391
  const cmdNpm = {
6342
6392
  description: description$w,
@@ -6414,7 +6464,7 @@ async function run$x(argv, importMeta, context) {
6414
6464
 
6415
6465
  const require$4 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
6416
6466
  const CMD_NAME$q = constants.NPX;
6417
- const description$v = 'Run npx with the Socket wrapper';
6467
+ const description$v = 'Wraps npx with Socket security scanning';
6418
6468
  const hidden$p = false;
6419
6469
  const cmdNpx = {
6420
6470
  description: description$v,
@@ -7486,12 +7536,12 @@ async function run$u(argv, importMeta, {
7486
7536
  pin: {
7487
7537
  type: 'boolean',
7488
7538
  default: false,
7489
- description: 'Pin overrides to their latest version'
7539
+ description: 'Pin overrides to latest version'
7490
7540
  },
7491
7541
  prod: {
7492
7542
  type: 'boolean',
7493
7543
  default: false,
7494
- description: 'Only add overrides for production dependencies'
7544
+ description: 'Add overrides for production dependencies only'
7495
7545
  }
7496
7546
  },
7497
7547
  help: (command, config) => `
@@ -9527,7 +9577,7 @@ async function run$m(argv, importMeta, {
9527
9577
 
9528
9578
  const require$3 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
9529
9579
  const CMD_NAME$g = constants.PNPM;
9530
- const description$j = 'Run pnpm with the Socket wrapper';
9580
+ const description$j = 'Wraps pnpm with Socket security scanning';
9531
9581
  const hidden$g = true;
9532
9582
  const cmdPnpm = {
9533
9583
  description: description$j,
@@ -14688,7 +14738,7 @@ async function run$1(argv, importMeta, {
14688
14738
 
14689
14739
  const require$1 = require$$5.createRequire((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.js', document.baseURI).href)));
14690
14740
  const CMD_NAME = constants.YARN;
14691
- const description = 'Run yarn with the Socket wrapper';
14741
+ const description = 'Wraps yarn with Socket security scanning';
14692
14742
  const hidden = true;
14693
14743
  const cmdYarn = {
14694
14744
  description,
@@ -14945,5 +14995,5 @@ void (async () => {
14945
14995
  await utils.captureException(e);
14946
14996
  }
14947
14997
  })();
14948
- //# debugId=4aa44248-7031-4a9e-8cad-1c9fbaa730ef
14998
+ //# debugId=3a127de6-5ee9-48f9-aded-7e7e7e868c6a
14949
14999
  //# sourceMappingURL=cli.js.map