@socketsecurity/cli-with-sentry 1.0.85 → 1.0.87
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/README.md +41 -52
- package/dist/cli.js +323 -327
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +20 -48
- package/dist/constants.js.map +1 -1
- package/dist/flags.js +5 -4
- package/dist/flags.js.map +1 -1
- package/dist/socket-completion.bash +0 -2
- package/dist/utils.js +122 -119
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +381 -381
- package/external/@coana-tech/cli/cli.mjs +25295 -30074
- package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +39 -1
- package/external/@socketsecurity/registry/external/browserslist.js +7 -1
- package/external/@socketsecurity/registry/external/libnpmpack.js +93488 -97365
- package/external/@socketsecurity/registry/external/make-fetch-happen.js +4689 -7729
- package/external/@socketsecurity/registry/external/pacote.js +51922 -72554
- package/external/@socketsecurity/registry/lib/constants/env.js +4 -4
- package/external/@socketsecurity/registry/lib/npm.js +2 -4
- package/external/@socketsecurity/registry/lib/path.js +17 -0
- package/package.json +13 -13
- package/dist/tsconfig.dts.tsbuildinfo +0 -1
- package/dist/types/cli.d.mts +0 -3
- package/dist/types/cli.d.mts.map +0 -1
- package/dist/types/commands/analytics/cmd-analytics.d.mts +0 -10
- package/dist/types/commands/analytics/cmd-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts +0 -8
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts +0 -8
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/handle-analytics.d.mts +0 -9
- package/dist/types/commands/analytics/handle-analytics.d.mts.map +0 -1
- package/dist/types/commands/analytics/output-analytics.d.mts +0 -28
- package/dist/types/commands/analytics/output-analytics.d.mts.map +0 -1
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts +0 -10
- package/dist/types/commands/audit-log/cmd-audit-log.d.mts.map +0 -1
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts +0 -15
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts.map +0 -1
- package/dist/types/commands/audit-log/handle-audit-log.d.mts +0 -9
- package/dist/types/commands/audit-log/handle-audit-log.d.mts.map +0 -1
- package/dist/types/commands/audit-log/output-audit-log.d.mts +0 -22
- package/dist/types/commands/audit-log/output-audit-log.d.mts.map +0 -1
- package/dist/types/commands/ci/cmd-ci.d.mts +0 -10
- package/dist/types/commands/ci/cmd-ci.d.mts.map +0 -1
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts +0 -4
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts.map +0 -1
- package/dist/types/commands/ci/handle-ci.d.mts +0 -2
- package/dist/types/commands/ci/handle-ci.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-auto.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-get.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-list.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-list.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-set.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config-unset.d.mts +0 -10
- package/dist/types/commands/config/cmd-config-unset.d.mts.map +0 -1
- package/dist/types/commands/config/cmd-config.d.mts +0 -3
- package/dist/types/commands/config/cmd-config.d.mts.map +0 -1
- package/dist/types/commands/config/discover-config-value.d.mts +0 -3
- package/dist/types/commands/config/discover-config-value.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-auto.d.mts +0 -7
- package/dist/types/commands/config/handle-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-get.d.mts +0 -7
- package/dist/types/commands/config/handle-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-set.d.mts +0 -8
- package/dist/types/commands/config/handle-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/handle-config-unset.d.mts +0 -7
- package/dist/types/commands/config/handle-config-unset.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-auto.d.mts +0 -4
- package/dist/types/commands/config/output-config-auto.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-get.d.mts +0 -4
- package/dist/types/commands/config/output-config-get.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-list.d.mts +0 -6
- package/dist/types/commands/config/output-config-list.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-set.d.mts +0 -3
- package/dist/types/commands/config/output-config-set.d.mts.map +0 -1
- package/dist/types/commands/config/output-config-unset.d.mts +0 -3
- package/dist/types/commands/config/output-config-unset.d.mts.map +0 -1
- package/dist/types/commands/fix/agent-fix.d.mts +0 -42
- package/dist/types/commands/fix/agent-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/cmd-fix.d.mts +0 -10
- package/dist/types/commands/fix/cmd-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/coana-fix.d.mts +0 -6
- package/dist/types/commands/fix/coana-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/fix-branch-helpers.d.mts +0 -4
- package/dist/types/commands/fix/fix-branch-helpers.d.mts.map +0 -1
- package/dist/types/commands/fix/fix-env-helpers.d.mts +0 -13
- package/dist/types/commands/fix/fix-env-helpers.d.mts.map +0 -1
- package/dist/types/commands/fix/get-actual-tree.d.mts +0 -3
- package/dist/types/commands/fix/get-actual-tree.d.mts.map +0 -1
- package/dist/types/commands/fix/handle-fix.d.mts +0 -11
- package/dist/types/commands/fix/handle-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/npm-fix.d.mts +0 -7
- package/dist/types/commands/fix/npm-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/output-fix-result.d.mts +0 -3
- package/dist/types/commands/fix/output-fix-result.d.mts.map +0 -1
- package/dist/types/commands/fix/pnpm-fix.d.mts +0 -7
- package/dist/types/commands/fix/pnpm-fix.d.mts.map +0 -1
- package/dist/types/commands/fix/pull-request.d.mts +0 -47
- package/dist/types/commands/fix/pull-request.d.mts.map +0 -1
- package/dist/types/commands/fix/shared.d.mts +0 -8
- package/dist/types/commands/fix/shared.d.mts.map +0 -1
- package/dist/types/commands/fix/socket-git.d.mts +0 -32
- package/dist/types/commands/fix/socket-git.d.mts.map +0 -1
- package/dist/types/commands/install/cmd-install-completion.d.mts +0 -10
- package/dist/types/commands/install/cmd-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/cmd-install.d.mts +0 -3
- package/dist/types/commands/install/cmd-install.d.mts.map +0 -1
- package/dist/types/commands/install/handle-install-completion.d.mts +0 -2
- package/dist/types/commands/install/handle-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/output-install-completion.d.mts +0 -12
- package/dist/types/commands/install/output-install-completion.d.mts.map +0 -1
- package/dist/types/commands/install/setup-tab-completion.d.mts +0 -13
- package/dist/types/commands/install/setup-tab-completion.d.mts.map +0 -1
- package/dist/types/commands/json/cmd-json.d.mts +0 -10
- package/dist/types/commands/json/cmd-json.d.mts.map +0 -1
- package/dist/types/commands/json/handle-cmd-json.d.mts +0 -2
- package/dist/types/commands/json/handle-cmd-json.d.mts.map +0 -1
- package/dist/types/commands/json/output-cmd-json.d.mts +0 -2
- package/dist/types/commands/json/output-cmd-json.d.mts.map +0 -1
- package/dist/types/commands/login/apply-login.d.mts +0 -2
- package/dist/types/commands/login/apply-login.d.mts.map +0 -1
- package/dist/types/commands/login/attempt-login.d.mts +0 -6
- package/dist/types/commands/login/attempt-login.d.mts.map +0 -1
- package/dist/types/commands/login/cmd-login.d.mts +0 -10
- package/dist/types/commands/login/cmd-login.d.mts.map +0 -1
- package/dist/types/commands/logout/apply-logout.d.mts +0 -2
- package/dist/types/commands/logout/apply-logout.d.mts.map +0 -1
- package/dist/types/commands/logout/attempt-logout.d.mts +0 -2
- package/dist/types/commands/logout/attempt-logout.d.mts.map +0 -1
- package/dist/types/commands/logout/cmd-logout.d.mts +0 -10
- package/dist/types/commands/logout/cmd-logout.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-conda.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest-setup.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/cmd-manifest.d.mts +0 -10
- package/dist/types/commands/manifest/cmd-manifest.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts +0 -8
- package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +0 -7
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts.map +0 -1
- package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts +0 -8
- package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts.map +0 -1
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts +0 -13
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +0 -1
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts +0 -9
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +0 -1
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts +0 -9
- package/dist/types/commands/manifest/handle-manifest-conda.d.mts.map +0 -1
- package/dist/types/commands/manifest/handle-manifest-setup.d.mts +0 -2
- package/dist/types/commands/manifest/handle-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/output-manifest-setup.d.mts +0 -3
- package/dist/types/commands/manifest/output-manifest-setup.d.mts.map +0 -1
- package/dist/types/commands/manifest/output-requirements.d.mts +0 -6
- package/dist/types/commands/manifest/output-requirements.d.mts.map +0 -1
- package/dist/types/commands/manifest/run-cdxgen.d.mts +0 -2
- package/dist/types/commands/manifest/run-cdxgen.d.mts.map +0 -1
- package/dist/types/commands/manifest/setup-manifest-config.d.mts +0 -3
- package/dist/types/commands/manifest/setup-manifest-config.d.mts.map +0 -1
- package/dist/types/commands/npm/cmd-npm.d.mts +0 -10
- package/dist/types/commands/npm/cmd-npm.d.mts.map +0 -1
- package/dist/types/commands/npx/cmd-npx.d.mts +0 -10
- package/dist/types/commands/npx/cmd-npx.d.mts.map +0 -1
- package/dist/types/commands/oops/cmd-oops.d.mts +0 -10
- package/dist/types/commands/oops/cmd-oops.d.mts.map +0 -1
- package/dist/types/commands/optimize/add-overrides.d.mts +0 -20
- package/dist/types/commands/optimize/add-overrides.d.mts.map +0 -1
- package/dist/types/commands/optimize/apply-optimization.d.mts +0 -14
- package/dist/types/commands/optimize/apply-optimization.d.mts.map +0 -1
- package/dist/types/commands/optimize/cmd-optimize.d.mts +0 -10
- package/dist/types/commands/optimize/cmd-optimize.d.mts.map +0 -1
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +0 -5
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/get-dependency-entries.d.mts +0 -3
- package/dist/types/commands/optimize/get-dependency-entries.d.mts.map +0 -1
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +0 -42
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/handle-optimize.d.mts +0 -8
- package/dist/types/commands/optimize/handle-optimize.d.mts.map +0 -1
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +0 -8
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/ls-by-agent.d.mts +0 -13
- package/dist/types/commands/optimize/ls-by-agent.d.mts.map +0 -1
- package/dist/types/commands/optimize/output-optimize-result.d.mts +0 -9
- package/dist/types/commands/optimize/output-optimize-result.d.mts.map +0 -1
- package/dist/types/commands/optimize/shared.d.mts +0 -2
- package/dist/types/commands/optimize/shared.d.mts.map +0 -1
- package/dist/types/commands/optimize/types.d.mts +0 -9
- package/dist/types/commands/optimize/types.d.mts.map +0 -1
- package/dist/types/commands/optimize/update-lockfile.d.mts +0 -11
- package/dist/types/commands/optimize/update-lockfile.d.mts.map +0 -1
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +0 -8
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-dependencies.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-list.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-policy-license.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-policy-security.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-policy.d.mts +0 -3
- package/dist/types/commands/organization/cmd-organization-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization-quota.d.mts +0 -10
- package/dist/types/commands/organization/cmd-organization-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/cmd-organization.d.mts +0 -3
- package/dist/types/commands/organization/cmd-organization.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-dependencies.d.mts +0 -12
- package/dist/types/commands/organization/fetch-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-license-policy.d.mts +0 -8
- package/dist/types/commands/organization/fetch-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-organization-list.d.mts +0 -8
- package/dist/types/commands/organization/fetch-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-quota.d.mts +0 -8
- package/dist/types/commands/organization/fetch-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/fetch-security-policy.d.mts +0 -8
- package/dist/types/commands/organization/fetch-security-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-dependencies.d.mts +0 -7
- package/dist/types/commands/organization/handle-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-license-policy.d.mts +0 -3
- package/dist/types/commands/organization/handle-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-organization-list.d.mts +0 -3
- package/dist/types/commands/organization/handle-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-quota.d.mts +0 -3
- package/dist/types/commands/organization/handle-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/handle-security-policy.d.mts +0 -3
- package/dist/types/commands/organization/handle-security-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/output-dependencies.d.mts +0 -8
- package/dist/types/commands/organization/output-dependencies.d.mts.map +0 -1
- package/dist/types/commands/organization/output-license-policy.d.mts +0 -4
- package/dist/types/commands/organization/output-license-policy.d.mts.map +0 -1
- package/dist/types/commands/organization/output-organization-list.d.mts +0 -4
- package/dist/types/commands/organization/output-organization-list.d.mts.map +0 -1
- package/dist/types/commands/organization/output-quota.d.mts +0 -4
- package/dist/types/commands/organization/output-quota.d.mts.map +0 -1
- package/dist/types/commands/organization/output-security-policy.d.mts +0 -4
- package/dist/types/commands/organization/output-security-policy.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package-score.d.mts +0 -10
- package/dist/types/commands/package/cmd-package-score.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package-shallow.d.mts +0 -17
- package/dist/types/commands/package/cmd-package-shallow.d.mts.map +0 -1
- package/dist/types/commands/package/cmd-package.d.mts +0 -3
- package/dist/types/commands/package/cmd-package.d.mts.map +0 -1
- package/dist/types/commands/package/fetch-purl-deep-score.d.mts +0 -51
- package/dist/types/commands/package/fetch-purl-deep-score.d.mts.map +0 -1
- package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +0 -8
- package/dist/types/commands/package/fetch-purls-shallow-score.d.mts.map +0 -1
- package/dist/types/commands/package/handle-purl-deep-score.d.mts +0 -3
- package/dist/types/commands/package/handle-purl-deep-score.d.mts.map +0 -1
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts +0 -6
- package/dist/types/commands/package/handle-purls-shallow-score.d.mts.map +0 -1
- package/dist/types/commands/package/output-purls-deep-score.d.mts +0 -5
- package/dist/types/commands/package/output-purls-deep-score.d.mts.map +0 -1
- package/dist/types/commands/package/output-purls-shallow-score.d.mts +0 -29
- package/dist/types/commands/package/output-purls-shallow-score.d.mts.map +0 -1
- package/dist/types/commands/package/parse-package-specifiers.d.mts +0 -9
- package/dist/types/commands/package/parse-package-specifiers.d.mts.map +0 -1
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +0 -10
- package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts.map +0 -1
- package/dist/types/commands/raw-npm/run-raw-npm.d.mts +0 -2
- package/dist/types/commands/raw-npm/run-raw-npm.d.mts.map +0 -1
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +0 -10
- package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts.map +0 -1
- package/dist/types/commands/raw-npx/run-raw-npx.d.mts +0 -2
- package/dist/types/commands/raw-npx/run-raw-npx.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-create.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-create.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-del.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-del.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-list.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-list.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-update.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-update.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository-view.d.mts +0 -10
- package/dist/types/commands/repository/cmd-repository-view.d.mts.map +0 -1
- package/dist/types/commands/repository/cmd-repository.d.mts +0 -3
- package/dist/types/commands/repository/cmd-repository.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-create-repo.d.mts +0 -16
- package/dist/types/commands/repository/fetch-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-delete-repo.d.mts +0 -8
- package/dist/types/commands/repository/fetch-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-list-all-repos.d.mts +0 -10
- package/dist/types/commands/repository/fetch-list-all-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-list-repos.d.mts +0 -15
- package/dist/types/commands/repository/fetch-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-update-repo.d.mts +0 -16
- package/dist/types/commands/repository/fetch-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/fetch-view-repo.d.mts +0 -8
- package/dist/types/commands/repository/fetch-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-create-repo.d.mts +0 -10
- package/dist/types/commands/repository/handle-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-delete-repo.d.mts +0 -3
- package/dist/types/commands/repository/handle-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-list-repos.d.mts +0 -11
- package/dist/types/commands/repository/handle-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-update-repo.d.mts +0 -10
- package/dist/types/commands/repository/handle-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/handle-view-repo.d.mts +0 -3
- package/dist/types/commands/repository/handle-view-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-create-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-create-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-delete-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-delete-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-list-repos.d.mts +0 -4
- package/dist/types/commands/repository/output-list-repos.d.mts.map +0 -1
- package/dist/types/commands/repository/output-update-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-update-repo.d.mts.map +0 -1
- package/dist/types/commands/repository/output-view-repo.d.mts +0 -4
- package/dist/types/commands/repository/output-view-repo.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-create.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-create.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-del.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-del.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-diff.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-diff.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-github.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-github.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-list.d.mts +0 -3
- package/dist/types/commands/scan/cmd-scan-list.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts +0 -3
- package/dist/types/commands/scan/cmd-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-reach.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-report.d.mts +0 -3
- package/dist/types/commands/scan/cmd-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-setup.d.mts +0 -10
- package/dist/types/commands/scan/cmd-scan-setup.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan-view.d.mts +0 -3
- package/dist/types/commands/scan/cmd-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/cmd-scan.d.mts +0 -3
- package/dist/types/commands/scan/cmd-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/create-scan-from-github.d.mts +0 -12
- package/dist/types/commands/scan/create-scan-from-github.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +0 -20
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +0 -8
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-diff-scan.d.mts +0 -8
- package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-list-scans.d.mts +0 -18
- package/dist/types/commands/scan/fetch-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-report-data.d.mts +0 -17
- package/dist/types/commands/scan/fetch-report-data.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts +0 -8
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-scan.d.mts +0 -4
- package/dist/types/commands/scan/fetch-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +0 -8
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts.map +0 -1
- package/dist/types/commands/scan/generate-report.d.mts +0 -43
- package/dist/types/commands/scan/generate-report.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-create-github-scan.d.mts +0 -12
- package/dist/types/commands/scan/handle-create-github-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts +0 -21
- package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-delete-scan.d.mts +0 -3
- package/dist/types/commands/scan/handle-delete-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-diff-scan.d.mts +0 -10
- package/dist/types/commands/scan/handle-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-list-scans.d.mts +0 -13
- package/dist/types/commands/scan/handle-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-config.d.mts +0 -2
- package/dist/types/commands/scan/handle-scan-config.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-metadata.d.mts +0 -3
- package/dist/types/commands/scan/handle-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-reach.d.mts +0 -8
- package/dist/types/commands/scan/handle-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-report.d.mts +0 -12
- package/dist/types/commands/scan/handle-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/handle-scan-view.d.mts +0 -3
- package/dist/types/commands/scan/handle-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/output-create-new-scan.d.mts +0 -4
- package/dist/types/commands/scan/output-create-new-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-delete-scan.d.mts +0 -4
- package/dist/types/commands/scan/output-delete-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-diff-scan.d.mts +0 -8
- package/dist/types/commands/scan/output-diff-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/output-list-scans.d.mts +0 -4
- package/dist/types/commands/scan/output-list-scans.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-config-result.d.mts +0 -3
- package/dist/types/commands/scan/output-scan-config-result.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-github.d.mts +0 -3
- package/dist/types/commands/scan/output-scan-github.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-metadata.d.mts +0 -4
- package/dist/types/commands/scan/output-scan-metadata.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-reach.d.mts +0 -3
- package/dist/types/commands/scan/output-scan-reach.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-report.d.mts +0 -20
- package/dist/types/commands/scan/output-scan-report.d.mts.map +0 -1
- package/dist/types/commands/scan/output-scan-view.d.mts +0 -4
- package/dist/types/commands/scan/output-scan-view.d.mts.map +0 -1
- package/dist/types/commands/scan/setup-scan-config.d.mts +0 -3
- package/dist/types/commands/scan/setup-scan-config.d.mts.map +0 -1
- package/dist/types/commands/scan/stream-scan.d.mts +0 -7
- package/dist/types/commands/scan/stream-scan.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest-org-slug.d.mts +0 -2
- package/dist/types/commands/scan/suggest-org-slug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest-repo-slug.d.mts +0 -9
- package/dist/types/commands/scan/suggest-repo-slug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts +0 -2
- package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest_branch_slug.d.mts +0 -2
- package/dist/types/commands/scan/suggest_branch_slug.d.mts.map +0 -1
- package/dist/types/commands/scan/suggest_target.d.mts +0 -2
- package/dist/types/commands/scan/suggest_target.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +0 -10
- package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +0 -13
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +0 -13
- package/dist/types/commands/threat-feed/handle-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/output-threat-feed.d.mts +0 -4
- package/dist/types/commands/threat-feed/output-threat-feed.d.mts.map +0 -1
- package/dist/types/commands/threat-feed/types.d.mts +0 -15
- package/dist/types/commands/threat-feed/types.d.mts.map +0 -1
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +0 -9
- package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts +0 -3
- package/dist/types/commands/uninstall/cmd-uninstall.d.mts.map +0 -1
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts +0 -2
- package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts +0 -6
- package/dist/types/commands/uninstall/output-uninstall-completion.d.mts.map +0 -1
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts +0 -6
- package/dist/types/commands/uninstall/teardown-tab-completion.d.mts.map +0 -1
- package/dist/types/commands/wrapper/add-socket-wrapper.d.mts +0 -2
- package/dist/types/commands/wrapper/add-socket-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts +0 -2
- package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts.map +0 -1
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts +0 -10
- package/dist/types/commands/wrapper/cmd-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts +0 -2
- package/dist/types/commands/wrapper/postinstall-wrapper.d.mts.map +0 -1
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +0 -2
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts.map +0 -1
- package/dist/types/constants.d.mts +0 -149
- package/dist/types/constants.d.mts.map +0 -1
- package/dist/types/flags.d.mts +0 -17
- package/dist/types/flags.d.mts.map +0 -1
- package/dist/types/instrument-with-sentry.d.mts +0 -2
- package/dist/types/instrument-with-sentry.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/index.d.mts +0 -8
- package/dist/types/shadow/npm/arborist/index.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts +0 -35
- package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist/types.d.mts +0 -123
- package/dist/types/shadow/npm/arborist/types.d.mts.map +0 -1
- package/dist/types/shadow/npm/arborist-helpers.d.mts +0 -39
- package/dist/types/shadow/npm/arborist-helpers.d.mts.map +0 -1
- package/dist/types/shadow/npm/bin.d.mts +0 -2
- package/dist/types/shadow/npm/bin.d.mts.map +0 -1
- package/dist/types/shadow/npm/inject.d.mts +0 -2
- package/dist/types/shadow/npm/inject.d.mts.map +0 -1
- package/dist/types/shadow/npm/install.d.mts +0 -13
- package/dist/types/shadow/npm/install.d.mts.map +0 -1
- package/dist/types/shadow/npm/link.d.mts +0 -2
- package/dist/types/shadow/npm/link.d.mts.map +0 -1
- package/dist/types/shadow/npm/paths.d.mts +0 -7
- package/dist/types/shadow/npm/paths.d.mts.map +0 -1
- package/dist/types/types.d.mts +0 -29
- package/dist/types/types.d.mts.map +0 -1
- package/dist/types/utils/agent.d.mts +0 -12
- package/dist/types/utils/agent.d.mts.map +0 -1
- package/dist/types/utils/alert/artifact.d.mts +0 -35
- package/dist/types/utils/alert/artifact.d.mts.map +0 -1
- package/dist/types/utils/alert/fix.d.mts +0 -6
- package/dist/types/utils/alert/fix.d.mts.map +0 -1
- package/dist/types/utils/alert/severity.d.mts +0 -14
- package/dist/types/utils/alert/severity.d.mts.map +0 -1
- package/dist/types/utils/alerts-map.d.mts +0 -24
- package/dist/types/utils/alerts-map.d.mts.map +0 -1
- package/dist/types/utils/api.d.mts +0 -18
- package/dist/types/utils/api.d.mts.map +0 -1
- package/dist/types/utils/check-input.d.mts +0 -9
- package/dist/types/utils/check-input.d.mts.map +0 -1
- package/dist/types/utils/cmd.d.mts +0 -5
- package/dist/types/utils/cmd.d.mts.map +0 -1
- package/dist/types/utils/coana.d.mts +0 -4
- package/dist/types/utils/coana.d.mts.map +0 -1
- package/dist/types/utils/color-or-markdown.d.mts +0 -16
- package/dist/types/utils/color-or-markdown.d.mts.map +0 -1
- package/dist/types/utils/completion.d.mts +0 -11
- package/dist/types/utils/completion.d.mts.map +0 -1
- package/dist/types/utils/config.d.mts +0 -32
- package/dist/types/utils/config.d.mts.map +0 -1
- package/dist/types/utils/determine-org-slug.d.mts +0 -2
- package/dist/types/utils/determine-org-slug.d.mts.map +0 -1
- package/dist/types/utils/errors.d.mts +0 -14
- package/dist/types/utils/errors.d.mts.map +0 -1
- package/dist/types/utils/fail-msg-with-badge.d.mts +0 -2
- package/dist/types/utils/fail-msg-with-badge.d.mts.map +0 -1
- package/dist/types/utils/fs.d.mts +0 -9
- package/dist/types/utils/fs.d.mts.map +0 -1
- package/dist/types/utils/get-output-kind.d.mts +0 -3
- package/dist/types/utils/get-output-kind.d.mts.map +0 -1
- package/dist/types/utils/git.d.mts +0 -29
- package/dist/types/utils/git.d.mts.map +0 -1
- package/dist/types/utils/glob.d.mts +0 -16
- package/dist/types/utils/glob.d.mts.map +0 -1
- package/dist/types/utils/lockfile.d.mts +0 -2
- package/dist/types/utils/lockfile.d.mts.map +0 -1
- package/dist/types/utils/map-to-object.d.mts +0 -10
- package/dist/types/utils/map-to-object.d.mts.map +0 -1
- package/dist/types/utils/markdown.d.mts +0 -10
- package/dist/types/utils/markdown.d.mts.map +0 -1
- package/dist/types/utils/meow-with-subcommands.d.mts +0 -47
- package/dist/types/utils/meow-with-subcommands.d.mts.map +0 -1
- package/dist/types/utils/ms-at-home.d.mts +0 -2
- package/dist/types/utils/ms-at-home.d.mts.map +0 -1
- package/dist/types/utils/npm-config.d.mts +0 -14
- package/dist/types/utils/npm-config.d.mts.map +0 -1
- package/dist/types/utils/npm-package-arg.d.mts +0 -4
- package/dist/types/utils/npm-package-arg.d.mts.map +0 -1
- package/dist/types/utils/npm-paths.d.mts +0 -7
- package/dist/types/utils/npm-paths.d.mts.map +0 -1
- package/dist/types/utils/objects.d.mts +0 -3
- package/dist/types/utils/objects.d.mts.map +0 -1
- package/dist/types/utils/output-formatting.d.mts +0 -16
- package/dist/types/utils/output-formatting.d.mts.map +0 -1
- package/dist/types/utils/package-environment.d.mts +0 -57
- package/dist/types/utils/package-environment.d.mts.map +0 -1
- package/dist/types/utils/path-resolve.d.mts +0 -14
- package/dist/types/utils/path-resolve.d.mts.map +0 -1
- package/dist/types/utils/pnpm.d.mts +0 -11
- package/dist/types/utils/pnpm.d.mts.map +0 -1
- package/dist/types/utils/purl.d.mts +0 -15
- package/dist/types/utils/purl.d.mts.map +0 -1
- package/dist/types/utils/sdk.d.mts +0 -13
- package/dist/types/utils/sdk.d.mts.map +0 -1
- package/dist/types/utils/semver.d.mts +0 -8
- package/dist/types/utils/semver.d.mts.map +0 -1
- package/dist/types/utils/serialize-result-json.d.mts +0 -5
- package/dist/types/utils/serialize-result-json.d.mts.map +0 -1
- package/dist/types/utils/socket-package-alert.d.mts +0 -77
- package/dist/types/utils/socket-package-alert.d.mts.map +0 -1
- package/dist/types/utils/socket-url.d.mts +0 -7
- package/dist/types/utils/socket-url.d.mts.map +0 -1
- package/dist/types/utils/socketjson.d.mts +0 -56
- package/dist/types/utils/socketjson.d.mts.map +0 -1
- package/dist/types/utils/spec.d.mts +0 -5
- package/dist/types/utils/spec.d.mts.map +0 -1
- package/dist/types/utils/strings.d.mts +0 -2
- package/dist/types/utils/strings.d.mts.map +0 -1
- package/dist/types/utils/tildify.d.mts +0 -4
- package/dist/types/utils/tildify.d.mts.map +0 -1
- package/dist/types/utils/translations.d.mts +0 -593
- package/dist/types/utils/translations.d.mts.map +0 -1
- package/dist/types/utils/walk-nested-map.d.mts +0 -7
- package/dist/types/utils/walk-nested-map.d.mts.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -25,6 +25,7 @@ var sorts = require('../external/@socketsecurity/registry/lib/sorts');
|
|
|
25
25
|
var regexps = require('../external/@socketsecurity/registry/lib/regexps');
|
|
26
26
|
var shadowNpmInject = require('./shadow-npm-inject.js');
|
|
27
27
|
var require$$7 = require('../external/@socketsecurity/registry/lib/objects');
|
|
28
|
+
var path$1 = require('../external/@socketsecurity/registry/lib/path');
|
|
28
29
|
var shadowNpmBin = require('./shadow-npm-bin.js');
|
|
29
30
|
var require$$8 = require('../external/@socketsecurity/registry/lib/promises');
|
|
30
31
|
var require$$1 = require('node:util');
|
|
@@ -322,7 +323,7 @@ const {
|
|
|
322
323
|
} = constants;
|
|
323
324
|
const config$M = {
|
|
324
325
|
commandName: 'analytics',
|
|
325
|
-
description:
|
|
326
|
+
description: 'Look up analytics data',
|
|
326
327
|
hidden: false,
|
|
327
328
|
flags: {
|
|
328
329
|
...flags.commonFlags,
|
|
@@ -2089,10 +2090,6 @@ async function handleCreateNewScan({
|
|
|
2089
2090
|
}
|
|
2090
2091
|
|
|
2091
2092
|
async function handleCi(autoManifest) {
|
|
2092
|
-
// ci: {
|
|
2093
|
-
// description: 'Alias for "report create --view --strict"',
|
|
2094
|
-
// argv: ['report', 'create', '--view', '--strict']
|
|
2095
|
-
// }
|
|
2096
2093
|
const orgSlugCResult = await utils.getDefaultOrgSlug();
|
|
2097
2094
|
if (!orgSlugCResult.ok) {
|
|
2098
2095
|
process.exitCode = orgSlugCResult.code ?? 1;
|
|
@@ -2134,14 +2131,14 @@ const {
|
|
|
2134
2131
|
} = constants;
|
|
2135
2132
|
const config$K = {
|
|
2136
2133
|
commandName: 'ci',
|
|
2137
|
-
description: '
|
|
2138
|
-
hidden:
|
|
2134
|
+
description: 'Shorthand for `socket scan create --report --no-interactive`',
|
|
2135
|
+
hidden: false,
|
|
2139
2136
|
flags: {
|
|
2140
2137
|
...flags.commonFlags,
|
|
2141
2138
|
autoManifest: {
|
|
2142
2139
|
type: 'boolean',
|
|
2140
|
+
// Dev tools in CI environments are not likely to be set up, so this is safer.
|
|
2143
2141
|
default: false,
|
|
2144
|
-
// dev tools is not likely to be set up so this is safer
|
|
2145
2142
|
description: 'Auto generate manifest files where detected? See autoManifest flag in `socket scan create`'
|
|
2146
2143
|
}
|
|
2147
2144
|
},
|
|
@@ -2153,10 +2150,9 @@ const config$K = {
|
|
|
2153
2150
|
${utils.getFlagListOutput(config$K.flags)}
|
|
2154
2151
|
|
|
2155
2152
|
This command is intended to use in CI runs to allow automated systems to
|
|
2156
|
-
accept or reject a current build.
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
It will use the default org for the Socket API token.
|
|
2153
|
+
accept or reject a current build. It will use the default org of the
|
|
2154
|
+
Socket API token. The exit code will be non-zero when the scan does not pass
|
|
2155
|
+
your security policy.
|
|
2160
2156
|
|
|
2161
2157
|
The --autoManifest flag does the same as the one from \`socket scan create\`
|
|
2162
2158
|
but is not enabled by default since the CI is less likely to be set up with
|
|
@@ -2982,7 +2978,7 @@ ${utils.getSupportedConfigEntries().map(([key, desc]) => ` - ${key} -- ${des
|
|
|
2982
2978
|
});
|
|
2983
2979
|
}
|
|
2984
2980
|
|
|
2985
|
-
const description$7 = '
|
|
2981
|
+
const description$7 = 'Manage Socket CLI configuration';
|
|
2986
2982
|
const cmdConfig = {
|
|
2987
2983
|
description: description$7,
|
|
2988
2984
|
hidden: false,
|
|
@@ -3648,7 +3644,7 @@ async function getActualTree(cwd = process.cwd()) {
|
|
|
3648
3644
|
|
|
3649
3645
|
const {
|
|
3650
3646
|
BUN: BUN$4,
|
|
3651
|
-
NPM: NPM$
|
|
3647
|
+
NPM: NPM$6,
|
|
3652
3648
|
OVERRIDES: OVERRIDES$2,
|
|
3653
3649
|
PNPM: PNPM$7,
|
|
3654
3650
|
RESOLUTIONS: RESOLUTIONS$1,
|
|
@@ -3669,7 +3665,7 @@ function getOverridesDataBun(pkgEnvDetails, pkgJson = pkgEnvDetails.editablePkgJ
|
|
|
3669
3665
|
function getOverridesDataNpm(pkgEnvDetails, pkgJson = pkgEnvDetails.editablePkgJson.content) {
|
|
3670
3666
|
const overrides = pkgJson?.[OVERRIDES$2] ?? {};
|
|
3671
3667
|
return {
|
|
3672
|
-
type: NPM$
|
|
3668
|
+
type: NPM$6,
|
|
3673
3669
|
overrides
|
|
3674
3670
|
};
|
|
3675
3671
|
}
|
|
@@ -3722,7 +3718,7 @@ function getOverridesData(pkgEnvDetails, pkgJson) {
|
|
|
3722
3718
|
return getOverridesDataYarn(pkgEnvDetails, pkgJson);
|
|
3723
3719
|
case YARN_CLASSIC$4:
|
|
3724
3720
|
return getOverridesDataYarnClassic(pkgEnvDetails, pkgJson);
|
|
3725
|
-
case NPM$
|
|
3721
|
+
case NPM$6:
|
|
3726
3722
|
default:
|
|
3727
3723
|
return getOverridesDataNpm(pkgEnvDetails, pkgJson);
|
|
3728
3724
|
}
|
|
@@ -4739,7 +4735,7 @@ const config$H = {
|
|
|
4739
4735
|
autoMerge: {
|
|
4740
4736
|
type: 'boolean',
|
|
4741
4737
|
default: false,
|
|
4742
|
-
description: `Enable auto-merge for pull requests that Socket opens.\
|
|
4738
|
+
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.`
|
|
4743
4739
|
},
|
|
4744
4740
|
autopilot: {
|
|
4745
4741
|
type: 'boolean',
|
|
@@ -4749,7 +4745,7 @@ const config$H = {
|
|
|
4749
4745
|
ghsa: {
|
|
4750
4746
|
type: 'string',
|
|
4751
4747
|
default: [],
|
|
4752
|
-
description: `Provide a list of ${vendor.terminalLinkExports('GHSA IDs', 'https://docs.github.com/en/code-security/security-advisories/working-with-global-security-advisories-from-the-github-advisory-database/about-the-github-advisory-database#about-ghsa-ids')} to compute fixes for, as either a comma separated value or as multiple flags.\
|
|
4748
|
+
description: `Provide a list of ${vendor.terminalLinkExports('GHSA IDs', 'https://docs.github.com/en/code-security/security-advisories/working-with-global-security-advisories-from-the-github-advisory-database/about-the-github-advisory-database#about-ghsa-ids')} to compute fixes for, as either a comma separated value or as multiple flags.\nUse '--ghsa all' to lookup all GHSA IDs and compute fixes for them.`,
|
|
4753
4749
|
isMultiple: true,
|
|
4754
4750
|
hidden: true
|
|
4755
4751
|
},
|
|
@@ -4778,7 +4774,7 @@ const config$H = {
|
|
|
4778
4774
|
purl: {
|
|
4779
4775
|
type: 'string',
|
|
4780
4776
|
default: [],
|
|
4781
|
-
description: `Provide a list of ${vendor.terminalLinkExports('PURLs', 'https://github.com/package-url/purl-spec?tab=readme-ov-file#purl')} to compute fixes for, as either a comma separated value or as\
|
|
4777
|
+
description: `Provide a list of ${vendor.terminalLinkExports('PURLs', 'https://github.com/package-url/purl-spec?tab=readme-ov-file#purl')} to compute fixes for, as either a comma separated value or as\nmultiple flags, instead of querying the Socket API`,
|
|
4782
4778
|
isMultiple: true,
|
|
4783
4779
|
shortFlag: 'p'
|
|
4784
4780
|
},
|
|
@@ -4786,16 +4782,16 @@ const config$H = {
|
|
|
4786
4782
|
type: 'string',
|
|
4787
4783
|
default: 'preserve',
|
|
4788
4784
|
description: `
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4785
|
+
Define how dependency version ranges are updated in package.json (default 'preserve').
|
|
4786
|
+
Available styles:
|
|
4787
|
+
* caret - Use ^ range for compatible updates (e.g. ^1.2.3)
|
|
4788
|
+
* gt - Use > to allow any newer version (e.g. >1.2.3)
|
|
4789
|
+
* gte - Use >= to allow any newer version (e.g. >=1.2.3)
|
|
4790
|
+
* lt - Use < to allow only lower versions (e.g. <1.2.3)
|
|
4791
|
+
* lte - Use <= to allow only lower versions (e.g. <=1.2.3)
|
|
4792
|
+
* pin - Use the exact version (e.g. 1.2.3)
|
|
4793
|
+
* preserve - Retain the existing version range style as-is
|
|
4794
|
+
* tilde - Use ~ range for patch/minor updates (e.g. ~1.2.3)
|
|
4799
4795
|
`.trim()
|
|
4800
4796
|
},
|
|
4801
4797
|
test: {
|
|
@@ -5099,7 +5095,7 @@ async function run$G(argv, importMeta, {
|
|
|
5099
5095
|
await handleInstallCompletion(String(targetName));
|
|
5100
5096
|
}
|
|
5101
5097
|
|
|
5102
|
-
const description$6 = '
|
|
5098
|
+
const description$6 = 'Install Socket CLI tab completion';
|
|
5103
5099
|
const cmdInstall = {
|
|
5104
5100
|
description: description$6,
|
|
5105
5101
|
hidden: false,
|
|
@@ -5194,7 +5190,7 @@ async function attemptLogin(apiBaseUrl, apiProxy) {
|
|
|
5194
5190
|
apiBaseUrl ??= utils.getConfigValueOrUndef('apiBaseUrl') ?? undefined;
|
|
5195
5191
|
apiProxy ??= utils.getConfigValueOrUndef('apiProxy') ?? undefined;
|
|
5196
5192
|
const apiTokenInput = await prompts.password({
|
|
5197
|
-
message: `Enter your ${vendor.terminalLinkExports('Socket.dev API token', 'https://docs.socket.dev/docs/api-keys')} (leave blank
|
|
5193
|
+
message: `Enter your ${vendor.terminalLinkExports('Socket.dev API token', 'https://docs.socket.dev/docs/api-keys')} (leave blank to use a limited public token)`
|
|
5198
5194
|
});
|
|
5199
5195
|
if (apiTokenInput === undefined) {
|
|
5200
5196
|
logger.logger.fail('Canceled by user');
|
|
@@ -5323,7 +5319,7 @@ const {
|
|
|
5323
5319
|
} = constants;
|
|
5324
5320
|
const config$E = {
|
|
5325
5321
|
commandName: 'login',
|
|
5326
|
-
description: 'Socket API
|
|
5322
|
+
description: 'Setup Socket CLI with an API token and defaults',
|
|
5327
5323
|
hidden: false,
|
|
5328
5324
|
flags: {
|
|
5329
5325
|
...flags.commonFlags,
|
|
@@ -5441,14 +5437,14 @@ async function run$D(argv, importMeta, {
|
|
|
5441
5437
|
}
|
|
5442
5438
|
|
|
5443
5439
|
const {
|
|
5444
|
-
NPM: NPM$
|
|
5445
|
-
NPX
|
|
5440
|
+
NPM: NPM$5,
|
|
5441
|
+
NPX,
|
|
5446
5442
|
PACKAGE_LOCK_JSON,
|
|
5447
5443
|
PNPM: PNPM$5,
|
|
5448
5444
|
YARN,
|
|
5449
5445
|
YARN_LOCK
|
|
5450
5446
|
} = constants;
|
|
5451
|
-
const nodejsPlatformTypes = new Set(['javascript', 'js', 'nodejs', NPM$
|
|
5447
|
+
const nodejsPlatformTypes = new Set(['javascript', 'js', 'nodejs', NPM$5, PNPM$5, 'ts', 'tsx', 'typescript']);
|
|
5452
5448
|
function argvToArray(argv) {
|
|
5453
5449
|
if (argv['help']) {
|
|
5454
5450
|
return ['--help'];
|
|
@@ -5473,8 +5469,13 @@ function argvToArray(argv) {
|
|
|
5473
5469
|
result.push(`--${key}`, ...value.map(String));
|
|
5474
5470
|
}
|
|
5475
5471
|
}
|
|
5476
|
-
|
|
5477
|
-
|
|
5472
|
+
const pathArgs = argv['_'];
|
|
5473
|
+
if (Array.isArray(pathArgs)) {
|
|
5474
|
+
result.push(...pathArgs);
|
|
5475
|
+
}
|
|
5476
|
+
const argsAfterDoubleHyphen = argv['--'];
|
|
5477
|
+
if (Array.isArray(argsAfterDoubleHyphen)) {
|
|
5478
|
+
result.push('--', ...argsAfterDoubleHyphen);
|
|
5478
5479
|
}
|
|
5479
5480
|
return result;
|
|
5480
5481
|
}
|
|
@@ -5490,20 +5491,20 @@ async function runCdxgen(yargvWithYes) {
|
|
|
5490
5491
|
const yesArgs = yes ? ['--yes'] : [];
|
|
5491
5492
|
if (yargv.type !== YARN && nodejsPlatformTypes.has(yargv.type) && fs$1.existsSync(`./${YARN_LOCK}`)) {
|
|
5492
5493
|
if (fs$1.existsSync(`./${PACKAGE_LOCK_JSON}`)) {
|
|
5493
|
-
yargv.type = NPM$
|
|
5494
|
+
yargv.type = NPM$5;
|
|
5494
5495
|
} else {
|
|
5495
5496
|
// Use synp to create a package-lock.json from the yarn.lock,
|
|
5496
5497
|
// based on the node_modules folder, for a more accurate SBOM.
|
|
5497
5498
|
try {
|
|
5498
|
-
await shadowNpmBin(NPX
|
|
5499
|
+
await shadowNpmBin(NPX, [...yesArgs,
|
|
5499
5500
|
// Lazily access constants.ENV.INLINED_SOCKET_CLI_SYNP_VERSION.
|
|
5500
5501
|
`synp@${constants.ENV.INLINED_SOCKET_CLI_SYNP_VERSION}`, '--source-file', `./${YARN_LOCK}`]);
|
|
5501
|
-
yargv.type = NPM$
|
|
5502
|
+
yargv.type = NPM$5;
|
|
5502
5503
|
cleanupPackageLock = true;
|
|
5503
5504
|
} catch {}
|
|
5504
5505
|
}
|
|
5505
5506
|
}
|
|
5506
|
-
await shadowNpmBin(NPX
|
|
5507
|
+
await shadowNpmBin(NPX, [...yesArgs,
|
|
5507
5508
|
// Lazily access constants.ENV.INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION.
|
|
5508
5509
|
`@cyclonedx/cdxgen@${constants.ENV.INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION}`, ...argvToArray(yargv)]);
|
|
5509
5510
|
if (cleanupPackageLock) {
|
|
@@ -5747,16 +5748,25 @@ async function run$C(argv, importMeta, {
|
|
|
5747
5748
|
const yargv = {
|
|
5748
5749
|
...vendor.yargsParser(argv, yargsConfig)
|
|
5749
5750
|
};
|
|
5750
|
-
const
|
|
5751
|
+
const pathArgs = [];
|
|
5752
|
+
const unknowns = [];
|
|
5753
|
+
for (const a of yargv._) {
|
|
5754
|
+
if (path$1.isPath(a)) {
|
|
5755
|
+
pathArgs.push(a);
|
|
5756
|
+
} else {
|
|
5757
|
+
unknowns.push(a);
|
|
5758
|
+
}
|
|
5759
|
+
}
|
|
5760
|
+
yargv._ = pathArgs;
|
|
5751
5761
|
const {
|
|
5752
|
-
length:
|
|
5753
|
-
} =
|
|
5754
|
-
if (
|
|
5762
|
+
length: unknownsCount
|
|
5763
|
+
} = unknowns;
|
|
5764
|
+
if (unknownsCount) {
|
|
5755
5765
|
// Use exit status of 2 to indicate incorrect usage, generally invalid
|
|
5756
5766
|
// options or missing arguments.
|
|
5757
5767
|
// https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html
|
|
5758
5768
|
process.exitCode = 2;
|
|
5759
|
-
logger.logger.fail(`Unknown ${words.pluralize('argument',
|
|
5769
|
+
logger.logger.fail(`Unknown ${words.pluralize('argument', unknownsCount)}: ${unknowns.join(', ')}`);
|
|
5760
5770
|
return;
|
|
5761
5771
|
}
|
|
5762
5772
|
if (cli.flags['dryRun']) {
|
|
@@ -7002,7 +7012,7 @@ async function run$w(argv, importMeta, {
|
|
|
7002
7012
|
|
|
7003
7013
|
const config$v = {
|
|
7004
7014
|
commandName: 'manifest',
|
|
7005
|
-
description: 'Generate a dependency manifest for
|
|
7015
|
+
description: 'Generate a dependency manifest for certain ecosystems',
|
|
7006
7016
|
hidden: false,
|
|
7007
7017
|
flags: {
|
|
7008
7018
|
...flags.commonFlags
|
|
@@ -7045,12 +7055,12 @@ const {
|
|
|
7045
7055
|
} = constants;
|
|
7046
7056
|
const config$u = {
|
|
7047
7057
|
commandName: 'npm',
|
|
7048
|
-
description:
|
|
7058
|
+
description: 'Run npm with the Socket wrapper',
|
|
7049
7059
|
hidden: false,
|
|
7050
7060
|
flags: {
|
|
7051
7061
|
...flags.commonFlags
|
|
7052
7062
|
},
|
|
7053
|
-
help:
|
|
7063
|
+
help: command => `
|
|
7054
7064
|
Usage
|
|
7055
7065
|
$ ${command} ...
|
|
7056
7066
|
|
|
@@ -7098,7 +7108,7 @@ const {
|
|
|
7098
7108
|
} = constants;
|
|
7099
7109
|
const config$t = {
|
|
7100
7110
|
commandName: 'npx',
|
|
7101
|
-
description:
|
|
7111
|
+
description: 'Run npx with the Socket wrapper',
|
|
7102
7112
|
hidden: false,
|
|
7103
7113
|
flags: {
|
|
7104
7114
|
...flags.commonFlags
|
|
@@ -7209,7 +7219,7 @@ async function run$s(argv, importMeta, {
|
|
|
7209
7219
|
|
|
7210
7220
|
const {
|
|
7211
7221
|
BUN: BUN$3,
|
|
7212
|
-
NPM: NPM$
|
|
7222
|
+
NPM: NPM$4,
|
|
7213
7223
|
PNPM: PNPM$4,
|
|
7214
7224
|
VLT: VLT$4,
|
|
7215
7225
|
YARN_BERRY: YARN_BERRY$3,
|
|
@@ -7229,7 +7239,7 @@ function lsStdoutIncludes(pkgEnvDetails, stdout, name) {
|
|
|
7229
7239
|
return matchLsCmdViewHumanStdout(stdout, name);
|
|
7230
7240
|
case PNPM$4:
|
|
7231
7241
|
case VLT$4:
|
|
7232
|
-
case NPM$
|
|
7242
|
+
case NPM$4:
|
|
7233
7243
|
default:
|
|
7234
7244
|
return matchQueryCmdStdout(stdout, name);
|
|
7235
7245
|
}
|
|
@@ -7262,7 +7272,7 @@ function getDependencyEntries(pkgEnvDetails) {
|
|
|
7262
7272
|
const {
|
|
7263
7273
|
BUN: BUN$2,
|
|
7264
7274
|
LOCK_EXT,
|
|
7265
|
-
NPM: NPM$
|
|
7275
|
+
NPM: NPM$3,
|
|
7266
7276
|
PNPM: PNPM$3,
|
|
7267
7277
|
VLT: VLT$3,
|
|
7268
7278
|
YARN_BERRY: YARN_BERRY$2,
|
|
@@ -7320,7 +7330,7 @@ function lockSrcIncludes(pkgEnvDetails, lockSrc, name, lockName) {
|
|
|
7320
7330
|
return yarnLockSrcIncludes(lockSrc, name);
|
|
7321
7331
|
case YARN_CLASSIC$2:
|
|
7322
7332
|
return yarnLockSrcIncludes(lockSrc, name);
|
|
7323
|
-
case NPM$
|
|
7333
|
+
case NPM$3:
|
|
7324
7334
|
default:
|
|
7325
7335
|
return npmLockSrcIncludes(lockSrc, name);
|
|
7326
7336
|
}
|
|
@@ -7328,7 +7338,7 @@ function lockSrcIncludes(pkgEnvDetails, lockSrc, name, lockName) {
|
|
|
7328
7338
|
|
|
7329
7339
|
const {
|
|
7330
7340
|
BUN: BUN$1,
|
|
7331
|
-
NPM: NPM$
|
|
7341
|
+
NPM: NPM$2,
|
|
7332
7342
|
PNPM: PNPM$2,
|
|
7333
7343
|
VLT: VLT$2,
|
|
7334
7344
|
YARN_BERRY: YARN_BERRY$1,
|
|
@@ -7420,7 +7430,7 @@ async function lsPnpm(pkgEnvDetails, options) {
|
|
|
7420
7430
|
__proto__: null,
|
|
7421
7431
|
...options
|
|
7422
7432
|
};
|
|
7423
|
-
if (npmExecPath && npmExecPath !== NPM$
|
|
7433
|
+
if (npmExecPath && npmExecPath !== NPM$2) {
|
|
7424
7434
|
const result = await npmQuery(npmExecPath, cwd);
|
|
7425
7435
|
if (result) {
|
|
7426
7436
|
return result;
|
|
@@ -7507,7 +7517,7 @@ async function listPackages(pkgEnvDetails, options) {
|
|
|
7507
7517
|
return await lsYarnBerry(pkgEnvDetails, options);
|
|
7508
7518
|
case YARN_CLASSIC$1:
|
|
7509
7519
|
return await lsYarnClassic(pkgEnvDetails, options);
|
|
7510
|
-
case NPM$
|
|
7520
|
+
case NPM$2:
|
|
7511
7521
|
default:
|
|
7512
7522
|
return await lsNpm(pkgEnvDetails, options);
|
|
7513
7523
|
}
|
|
@@ -7517,7 +7527,7 @@ const CMD_NAME = 'socket optimize';
|
|
|
7517
7527
|
|
|
7518
7528
|
const {
|
|
7519
7529
|
BUN,
|
|
7520
|
-
NPM: NPM$
|
|
7530
|
+
NPM: NPM$1,
|
|
7521
7531
|
OVERRIDES,
|
|
7522
7532
|
PNPM: PNPM$1,
|
|
7523
7533
|
RESOLUTIONS,
|
|
@@ -7642,7 +7652,7 @@ function updateManifest(agent, editablePkgJson, overrides) {
|
|
|
7642
7652
|
case YARN_CLASSIC:
|
|
7643
7653
|
updateResolutionsField(editablePkgJson, overrides);
|
|
7644
7654
|
return;
|
|
7645
|
-
case NPM$
|
|
7655
|
+
case NPM$1:
|
|
7646
7656
|
default:
|
|
7647
7657
|
updateOverridesField(editablePkgJson, overrides);
|
|
7648
7658
|
return;
|
|
@@ -7650,10 +7660,10 @@ function updateManifest(agent, editablePkgJson, overrides) {
|
|
|
7650
7660
|
}
|
|
7651
7661
|
|
|
7652
7662
|
const {
|
|
7653
|
-
NPM
|
|
7663
|
+
NPM,
|
|
7654
7664
|
PNPM
|
|
7655
7665
|
} = constants;
|
|
7656
|
-
const manifestNpmOverrides = registry.getManifestData(NPM
|
|
7666
|
+
const manifestNpmOverrides = registry.getManifestData(NPM);
|
|
7657
7667
|
async function addOverrides(pkgEnvDetails, pkgPath, options) {
|
|
7658
7668
|
const {
|
|
7659
7669
|
agent,
|
|
@@ -7685,7 +7695,7 @@ async function addOverrides(pkgEnvDetails, pkgPath, options) {
|
|
|
7685
7695
|
const workspace = isWorkspaceRoot ? 'root' : path.relative(rootPath, pkgPath);
|
|
7686
7696
|
if (isWorkspace && agent === PNPM &&
|
|
7687
7697
|
// npmExecPath will === the agent name IF it CANNOT be resolved.
|
|
7688
|
-
npmExecPath === NPM
|
|
7698
|
+
npmExecPath === NPM && !state.warnedPnpmWorkspaceRequiresNpm) {
|
|
7689
7699
|
state.warnedPnpmWorkspaceRequiresNpm = true;
|
|
7690
7700
|
spinner?.stop();
|
|
7691
7701
|
logger?.warn(utils.cmdPrefixMessage(CMD_NAME, `${agent} workspace support requires \`npm ls\`, falling back to \`${agent} list\``));
|
|
@@ -7718,7 +7728,7 @@ async function addOverrides(pkgEnvDetails, pkgPath, options) {
|
|
|
7718
7728
|
version
|
|
7719
7729
|
} = data;
|
|
7720
7730
|
const major = utils.getMajor(version);
|
|
7721
|
-
const sockOverridePrefix = `${NPM
|
|
7731
|
+
const sockOverridePrefix = `${NPM}:${sockRegPkgName}@`;
|
|
7722
7732
|
const sockOverrideSpec = `${sockOverridePrefix}${pin ? version : `^${major}`}`;
|
|
7723
7733
|
for (const {
|
|
7724
7734
|
1: depObj
|
|
@@ -7774,7 +7784,7 @@ async function addOverrides(pkgEnvDetails, pkgPath, options) {
|
|
|
7774
7784
|
const sockRegDepAlias = depAliasMap.get(sockRegPkgName);
|
|
7775
7785
|
const depAlias = sockRegDepAlias ?? origDepAlias;
|
|
7776
7786
|
let newSpec = sockOverrideSpec;
|
|
7777
|
-
if (type === NPM
|
|
7787
|
+
if (type === NPM && depAlias) {
|
|
7778
7788
|
// With npm one may not set an override for a package that one directly
|
|
7779
7789
|
// depends on unless both the dependency and the override itself share
|
|
7780
7790
|
// the exact same spec. To make this limitation easier to deal with,
|
|
@@ -8468,8 +8478,6 @@ async function handleSecurityPolicy(orgSlug, outputKind) {
|
|
|
8468
8478
|
const {
|
|
8469
8479
|
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$o
|
|
8470
8480
|
} = constants;
|
|
8471
|
-
|
|
8472
|
-
// TODO: secret toplevel alias `socket security policy`?
|
|
8473
8481
|
const config$o = {
|
|
8474
8482
|
commandName: 'security',
|
|
8475
8483
|
description: 'Retrieve the security policy of an organization',
|
|
@@ -8698,7 +8706,7 @@ const cmdOrganizationPolicy = {
|
|
|
8698
8706
|
defaultSub: 'list',
|
|
8699
8707
|
// Backwards compat
|
|
8700
8708
|
importMeta,
|
|
8701
|
-
name: parentName
|
|
8709
|
+
name: `${parentName} policy`
|
|
8702
8710
|
});
|
|
8703
8711
|
}
|
|
8704
8712
|
};
|
|
@@ -8812,7 +8820,7 @@ async function run$m(argv, importMeta, {
|
|
|
8812
8820
|
await handleQuota(outputKind);
|
|
8813
8821
|
}
|
|
8814
8822
|
|
|
8815
|
-
const description$4 = '
|
|
8823
|
+
const description$4 = 'Manage Socket organization account details';
|
|
8816
8824
|
const cmdOrganization = {
|
|
8817
8825
|
description: description$4,
|
|
8818
8826
|
hidden: false,
|
|
@@ -8845,7 +8853,7 @@ const cmdOrganization = {
|
|
|
8845
8853
|
argv,
|
|
8846
8854
|
description: description$4,
|
|
8847
8855
|
importMeta,
|
|
8848
|
-
name: parentName
|
|
8856
|
+
name: `${parentName} organization`
|
|
8849
8857
|
});
|
|
8850
8858
|
}
|
|
8851
8859
|
};
|
|
@@ -8894,125 +8902,123 @@ function createMarkdownReport(data) {
|
|
|
8894
8902
|
score
|
|
8895
8903
|
}
|
|
8896
8904
|
} = data;
|
|
8897
|
-
const
|
|
8898
|
-
arr.push('# Complete Package Score');
|
|
8899
|
-
arr.push('');
|
|
8905
|
+
const o = ['# Complete Package Score', ''];
|
|
8900
8906
|
if (dependencyCount) {
|
|
8901
|
-
|
|
8907
|
+
o.push(`This is a Socket report for the package *"${purl}"* and its *${dependencyCount}* direct/transitive dependencies.`);
|
|
8902
8908
|
} else {
|
|
8903
|
-
|
|
8909
|
+
o.push(`This is a Socket report for the package *"${purl}"*. It has *no dependencies*.`);
|
|
8904
8910
|
}
|
|
8905
|
-
|
|
8911
|
+
o.push('');
|
|
8906
8912
|
if (dependencyCount) {
|
|
8907
|
-
|
|
8913
|
+
o.push(`It will show you the shallow score for just the package itself and a deep score for all the transitives combined. Additionally you can see which capabilities were found and the top alerts as well as a package that was responsible for it.`);
|
|
8908
8914
|
} else {
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8915
|
+
o.push(`It will show you the shallow score for the package itself, which capabilities were found, and its top alerts.`);
|
|
8916
|
+
o.push('');
|
|
8917
|
+
o.push('Since it has no dependencies, the shallow score is also the deep score.');
|
|
8912
8918
|
}
|
|
8913
|
-
|
|
8919
|
+
o.push('');
|
|
8914
8920
|
if (dependencyCount) {
|
|
8915
8921
|
// This doesn't make much sense if there are no dependencies. Better to omit it.
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8922
|
+
o.push('The report should give you a good insight into the status of this package.');
|
|
8923
|
+
o.push('');
|
|
8924
|
+
o.push('## Package itself');
|
|
8925
|
+
o.push('');
|
|
8926
|
+
o.push('Here are results for the package itself (excluding data from dependencies).');
|
|
8921
8927
|
} else {
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
}
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8928
|
+
o.push('## Report');
|
|
8929
|
+
o.push('');
|
|
8930
|
+
o.push('The report should give you a good insight into the status of this package.');
|
|
8931
|
+
}
|
|
8932
|
+
o.push('');
|
|
8933
|
+
o.push('### Shallow Score');
|
|
8934
|
+
o.push('');
|
|
8935
|
+
o.push('This score is just for the package itself:');
|
|
8936
|
+
o.push('');
|
|
8937
|
+
o.push(`- Overall: ${selfScore.overall}`);
|
|
8938
|
+
o.push(`- Maintenance: ${selfScore.maintenance}`);
|
|
8939
|
+
o.push(`- Quality: ${selfScore.quality}`);
|
|
8940
|
+
o.push(`- Supply Chain: ${selfScore.supplyChain}`);
|
|
8941
|
+
o.push(`- Vulnerability: ${selfScore.vulnerability}`);
|
|
8942
|
+
o.push(`- License: ${selfScore.license}`);
|
|
8943
|
+
o.push('');
|
|
8944
|
+
o.push('### Capabilities');
|
|
8945
|
+
o.push('');
|
|
8940
8946
|
if (selfCaps.length) {
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
}
|
|
8947
|
+
o.push('These are the capabilities detected in the package itself:');
|
|
8948
|
+
o.push('');
|
|
8949
|
+
for (const cap of selfCaps) {
|
|
8950
|
+
o.push(`- ${cap}`);
|
|
8951
|
+
}
|
|
8946
8952
|
} else {
|
|
8947
|
-
|
|
8953
|
+
o.push('No capabilities were found in the package.');
|
|
8948
8954
|
}
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8955
|
+
o.push('');
|
|
8956
|
+
o.push('### Alerts for this package');
|
|
8957
|
+
o.push('');
|
|
8952
8958
|
if (selfAlerts.length) {
|
|
8953
8959
|
if (dependencyCount) {
|
|
8954
|
-
|
|
8960
|
+
o.push('These are the alerts found for the package itself:');
|
|
8955
8961
|
} else {
|
|
8956
|
-
|
|
8962
|
+
o.push('These are the alerts found for this package:');
|
|
8957
8963
|
}
|
|
8958
|
-
|
|
8959
|
-
|
|
8964
|
+
o.push('');
|
|
8965
|
+
o.push(utils.mdTable(selfAlerts, ['severity', 'name'], ['Severity', 'Alert Name']));
|
|
8960
8966
|
} else {
|
|
8961
|
-
|
|
8967
|
+
o.push('There are currently no alerts for this package.');
|
|
8962
8968
|
}
|
|
8963
|
-
|
|
8969
|
+
o.push('');
|
|
8964
8970
|
if (dependencyCount) {
|
|
8965
|
-
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8971
|
+
o.push('## Transitive Package Results');
|
|
8972
|
+
o.push('');
|
|
8973
|
+
o.push('Here are results for the package and its direct/transitive dependencies.');
|
|
8974
|
+
o.push('');
|
|
8975
|
+
o.push('### Deep Score');
|
|
8976
|
+
o.push('');
|
|
8977
|
+
o.push('This score represents the package and and its direct/transitive dependencies:');
|
|
8978
|
+
o.push(`The function used to calculate the values in aggregate is: *"${func}"*`);
|
|
8979
|
+
o.push('');
|
|
8980
|
+
o.push(`- Overall: ${score.overall}`);
|
|
8981
|
+
o.push(`- Maintenance: ${score.maintenance}`);
|
|
8982
|
+
o.push(`- Quality: ${score.quality}`);
|
|
8983
|
+
o.push(`- Supply Chain: ${score.supplyChain}`);
|
|
8984
|
+
o.push(`- Vulnerability: ${score.vulnerability}`);
|
|
8985
|
+
o.push(`- License: ${score.license}`);
|
|
8986
|
+
o.push('');
|
|
8987
|
+
o.push('### Capabilities');
|
|
8988
|
+
o.push('');
|
|
8989
|
+
o.push('These are the packages with the lowest recorded score. If there is more than one with the lowest score, just one is shown here. This may help you figure out the source of low scores.');
|
|
8990
|
+
o.push('');
|
|
8991
|
+
o.push(`- Overall: ${lowest.overall}`);
|
|
8992
|
+
o.push(`- Maintenance: ${lowest.maintenance}`);
|
|
8993
|
+
o.push(`- Quality: ${lowest.quality}`);
|
|
8994
|
+
o.push(`- Supply Chain: ${lowest.supplyChain}`);
|
|
8995
|
+
o.push(`- Vulnerability: ${lowest.vulnerability}`);
|
|
8996
|
+
o.push(`- License: ${lowest.license}`);
|
|
8997
|
+
o.push('');
|
|
8998
|
+
o.push('### Capabilities');
|
|
8999
|
+
o.push('');
|
|
8994
9000
|
if (capabilities.length) {
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
}
|
|
9001
|
+
o.push('These are the capabilities detected in at least one package:');
|
|
9002
|
+
o.push('');
|
|
9003
|
+
for (const cap of capabilities) {
|
|
9004
|
+
o.push(`- ${cap}`);
|
|
9005
|
+
}
|
|
9000
9006
|
} else {
|
|
9001
|
-
|
|
9007
|
+
o.push('This package had no capabilities and neither did any of its direct/transitive dependencies.');
|
|
9002
9008
|
}
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9009
|
+
o.push('');
|
|
9010
|
+
o.push('### Alerts');
|
|
9011
|
+
o.push('');
|
|
9006
9012
|
if (alerts.length) {
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9013
|
+
o.push('These are the alerts found:');
|
|
9014
|
+
o.push('');
|
|
9015
|
+
o.push(utils.mdTable(alerts, ['severity', 'name', 'example'], ['Severity', 'Alert Name', 'Example package reporting it']));
|
|
9010
9016
|
} else {
|
|
9011
|
-
|
|
9017
|
+
o.push('This package had no alerts and neither did any of its direct/transitive dependencies');
|
|
9012
9018
|
}
|
|
9013
|
-
|
|
9014
|
-
return arr.join('\n');
|
|
9019
|
+
o.push('');
|
|
9015
9020
|
}
|
|
9021
|
+
return o.join('\n');
|
|
9016
9022
|
}
|
|
9017
9023
|
|
|
9018
9024
|
async function handlePurlDeepScore(purl, outputKind) {
|
|
@@ -9046,12 +9052,12 @@ function parsePackageSpecifiers(ecosystem, pkgs) {
|
|
|
9046
9052
|
valid = false;
|
|
9047
9053
|
}
|
|
9048
9054
|
} else {
|
|
9049
|
-
// Assume ecosystem is a purl, too
|
|
9055
|
+
// Assume ecosystem is a purl, too.
|
|
9050
9056
|
pkgs.unshift(ecosystem);
|
|
9051
9057
|
for (let i = 0; i < pkgs.length; ++i) {
|
|
9052
9058
|
const pkg = pkgs[i] ?? '';
|
|
9053
9059
|
if (!/^(?:pkg:)?[a-zA-Z]+\/./.test(pkg)) {
|
|
9054
|
-
// At least one purl did not start with `pkg:eco/x` or `eco/x
|
|
9060
|
+
// At least one purl did not start with `pkg:eco/x` or `eco/x`.
|
|
9055
9061
|
valid = false;
|
|
9056
9062
|
break;
|
|
9057
9063
|
} else if (pkg.startsWith('pkg:')) {
|
|
@@ -9267,10 +9273,10 @@ function getAlertString(alerts, noColor = false) {
|
|
|
9267
9273
|
if (!alerts.size) {
|
|
9268
9274
|
return noColor ? `- Alerts: none!` : `- Alerts: ${vendor.yoctocolorsCjsExports.green('none')}!`;
|
|
9269
9275
|
}
|
|
9270
|
-
const
|
|
9271
|
-
const bad =
|
|
9272
|
-
const mid =
|
|
9273
|
-
const low =
|
|
9276
|
+
const o = Array.from(alerts.values());
|
|
9277
|
+
const bad = o.filter(alert => alert.severity !== 'low' && alert.severity !== 'middle').sort((a, b) => a.type < b.type ? -1 : a.type > b.type ? 1 : 0);
|
|
9278
|
+
const mid = o.filter(alert => alert.severity === 'middle').sort((a, b) => a.type < b.type ? -1 : a.type > b.type ? 1 : 0);
|
|
9279
|
+
const low = o.filter(alert => alert.severity === 'low').sort((a, b) => a.type < b.type ? -1 : a.type > b.type ? 1 : 0);
|
|
9274
9280
|
|
|
9275
9281
|
// We need to create the no-color string regardless because the actual string
|
|
9276
9282
|
// contains a bunch of invisible ANSI chars which would screw up length checks.
|
|
@@ -9290,12 +9296,12 @@ function preProcess(artifacts, requestedPurls) {
|
|
|
9290
9296
|
// API does not tell us which purls were not found.
|
|
9291
9297
|
// Generate all purls to try so we can try to match search request.
|
|
9292
9298
|
const purls = new Set();
|
|
9293
|
-
|
|
9299
|
+
for (const data of artifacts) {
|
|
9294
9300
|
purls.add(`pkg:${data.type}/${data.namespace ? `${data.namespace}/` : ''}${data.name}@${data.version}`);
|
|
9295
9301
|
purls.add(`pkg:${data.type}/${data.name}@${data.version}`);
|
|
9296
9302
|
purls.add(`pkg:${data.type}/${data.name}`);
|
|
9297
9303
|
purls.add(`pkg:${data.type}/${data.namespace ? `${data.namespace}/` : ''}${data.name}`);
|
|
9298
|
-
}
|
|
9304
|
+
}
|
|
9299
9305
|
// Try to match the searched purls against this list
|
|
9300
9306
|
const missing = requestedPurls.filter(purl => {
|
|
9301
9307
|
if (purls.has(purl)) {
|
|
@@ -9304,7 +9310,8 @@ function preProcess(artifacts, requestedPurls) {
|
|
|
9304
9310
|
if (purl.endsWith('@latest') && purls.has(purl.slice(0, -'@latest'.length))) {
|
|
9305
9311
|
return false;
|
|
9306
9312
|
}
|
|
9307
|
-
|
|
9313
|
+
// Not found.
|
|
9314
|
+
return true;
|
|
9308
9315
|
});
|
|
9309
9316
|
|
|
9310
9317
|
// Create a unique set of rows which represents each artifact that is returned
|
|
@@ -9312,13 +9319,13 @@ function preProcess(artifacts, requestedPurls) {
|
|
|
9312
9319
|
// .release field (observed with python, at least).
|
|
9313
9320
|
// Merge the alerts for duped packages. Use lowest score between all of them.
|
|
9314
9321
|
const rows = new Map();
|
|
9315
|
-
|
|
9322
|
+
for (const artifact of artifacts) {
|
|
9316
9323
|
const purl = `pkg:${artifact.type}/${artifact.namespace ? `${artifact.namespace}/` : ''}${artifact.name}${artifact.version ? `@${artifact.version}` : ''}`;
|
|
9317
9324
|
if (rows.has(purl)) {
|
|
9318
9325
|
const row = rows.get(purl);
|
|
9319
9326
|
if (!row) {
|
|
9320
|
-
//
|
|
9321
|
-
|
|
9327
|
+
// Unreachable; Satisfy TS.
|
|
9328
|
+
continue;
|
|
9322
9329
|
}
|
|
9323
9330
|
if ((artifact.score?.supplyChain || 100) < row.score.supplyChain) {
|
|
9324
9331
|
row.score.supplyChain = artifact.score?.supplyChain || 100;
|
|
@@ -9370,7 +9377,7 @@ function preProcess(artifacts, requestedPurls) {
|
|
|
9370
9377
|
alerts
|
|
9371
9378
|
});
|
|
9372
9379
|
}
|
|
9373
|
-
}
|
|
9380
|
+
}
|
|
9374
9381
|
return {
|
|
9375
9382
|
rows,
|
|
9376
9383
|
missing
|
|
@@ -9379,14 +9386,15 @@ function preProcess(artifacts, requestedPurls) {
|
|
|
9379
9386
|
function generateMarkdownReport(artifacts, missing) {
|
|
9380
9387
|
const blocks = [];
|
|
9381
9388
|
const dupes = new Set();
|
|
9382
|
-
artifacts.
|
|
9383
|
-
const block =
|
|
9389
|
+
for (const artifact of artifacts.values()) {
|
|
9390
|
+
const block = `## ${formatReportCard(artifact, false)}`;
|
|
9384
9391
|
if (dupes.has(block)) {
|
|
9385
|
-
|
|
9392
|
+
// Omit duplicate blocks.
|
|
9393
|
+
continue;
|
|
9386
9394
|
}
|
|
9387
9395
|
dupes.add(block);
|
|
9388
9396
|
blocks.push(block);
|
|
9389
|
-
}
|
|
9397
|
+
}
|
|
9390
9398
|
return `
|
|
9391
9399
|
# Shallow Package Report
|
|
9392
9400
|
|
|
@@ -9395,30 +9403,31 @@ This report contains the response for requesting data on some package url(s).
|
|
|
9395
9403
|
Please note: The listed scores are ONLY for the package itself. It does NOT
|
|
9396
9404
|
reflect the scores of any dependencies, transitive or otherwise.
|
|
9397
9405
|
|
|
9398
|
-
${missing.length ? `\n## Missing response\n\nAt least one package had no response or the purl was not canonical:\n\n${missing.map(purl =>
|
|
9406
|
+
${missing.length ? `\n## Missing response\n\nAt least one package had no response or the purl was not canonical:\n\n${missing.map(purl => `- ${purl}\n`).join('')}` : ''}
|
|
9399
9407
|
|
|
9400
9408
|
${blocks.join('\n\n\n')}
|
|
9401
9409
|
`.trim();
|
|
9402
9410
|
}
|
|
9403
9411
|
function generateTextReport(artifacts, missing) {
|
|
9404
|
-
const
|
|
9405
|
-
|
|
9406
|
-
|
|
9412
|
+
const o = [];
|
|
9413
|
+
o.push(`\n${vendor.yoctocolorsCjsExports.bold('Shallow Package Score')}\n`);
|
|
9414
|
+
o.push('Please note: The listed scores are ONLY for the package itself. It does NOT\n' + ' reflect the scores of any dependencies, transitive or otherwise.');
|
|
9407
9415
|
if (missing.length) {
|
|
9408
|
-
|
|
9416
|
+
o.push(`\nAt least one package had no response or the purl was not canonical:\n${missing.map(purl => `\n- ${vendor.yoctocolorsCjsExports.bold(purl)}`).join('')}`);
|
|
9409
9417
|
}
|
|
9410
|
-
const dupes = new Set();
|
|
9411
|
-
artifacts.
|
|
9418
|
+
const dupes = new Set();
|
|
9419
|
+
for (const artifact of artifacts.values()) {
|
|
9412
9420
|
const block = formatReportCard(artifact, true);
|
|
9413
9421
|
if (dupes.has(block)) {
|
|
9414
|
-
|
|
9422
|
+
// Omit duplicate blocks.
|
|
9423
|
+
continue;
|
|
9415
9424
|
}
|
|
9416
9425
|
dupes.add(block);
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
}
|
|
9420
|
-
|
|
9421
|
-
return
|
|
9426
|
+
o.push('\n');
|
|
9427
|
+
o.push(block);
|
|
9428
|
+
}
|
|
9429
|
+
o.push('');
|
|
9430
|
+
return o.join('\n');
|
|
9422
9431
|
}
|
|
9423
9432
|
|
|
9424
9433
|
async function handlePurlsShallowScore({
|
|
@@ -9537,7 +9546,7 @@ async function run$k(argv, importMeta, {
|
|
|
9537
9546
|
});
|
|
9538
9547
|
}
|
|
9539
9548
|
|
|
9540
|
-
const description$3 = '
|
|
9549
|
+
const description$3 = 'Look up published package details';
|
|
9541
9550
|
const cmdPackage = {
|
|
9542
9551
|
description: description$3,
|
|
9543
9552
|
hidden: false,
|
|
@@ -9558,7 +9567,7 @@ const cmdPackage = {
|
|
|
9558
9567
|
argv,
|
|
9559
9568
|
description: description$3,
|
|
9560
9569
|
importMeta,
|
|
9561
|
-
name: parentName
|
|
9570
|
+
name: `${parentName} package`
|
|
9562
9571
|
});
|
|
9563
9572
|
}
|
|
9564
9573
|
};
|
|
@@ -9582,12 +9591,11 @@ async function runRawNpm(argv) {
|
|
|
9582
9591
|
}
|
|
9583
9592
|
|
|
9584
9593
|
const {
|
|
9585
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$j
|
|
9586
|
-
NPM
|
|
9594
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$j
|
|
9587
9595
|
} = constants;
|
|
9588
9596
|
const config$j = {
|
|
9589
9597
|
commandName: 'raw-npm',
|
|
9590
|
-
description:
|
|
9598
|
+
description: 'Run npm without the Socket wrapper',
|
|
9591
9599
|
hidden: false,
|
|
9592
9600
|
flags: {
|
|
9593
9601
|
...flags.commonFlags
|
|
@@ -9647,12 +9655,11 @@ async function runRawNpx(argv) {
|
|
|
9647
9655
|
}
|
|
9648
9656
|
|
|
9649
9657
|
const {
|
|
9650
|
-
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$i
|
|
9651
|
-
NPX
|
|
9658
|
+
DRY_RUN_BAILING_NOW: DRY_RUN_BAILING_NOW$i
|
|
9652
9659
|
} = constants;
|
|
9653
9660
|
const config$i = {
|
|
9654
9661
|
commandName: 'raw-npx',
|
|
9655
|
-
description:
|
|
9662
|
+
description: 'Run npx without the Socket wrapper',
|
|
9656
9663
|
hidden: false,
|
|
9657
9664
|
flags: {
|
|
9658
9665
|
...flags.commonFlags
|
|
@@ -10686,7 +10693,7 @@ async function run$d(argv, importMeta, {
|
|
|
10686
10693
|
await handleViewRepo(orgSlug, String(repoName), outputKind);
|
|
10687
10694
|
}
|
|
10688
10695
|
|
|
10689
|
-
const description$2 = '
|
|
10696
|
+
const description$2 = 'Manage registered repositories';
|
|
10690
10697
|
const cmdRepository = {
|
|
10691
10698
|
description: description$2,
|
|
10692
10699
|
async run(argv, importMeta, {
|
|
@@ -10732,14 +10739,14 @@ const {
|
|
|
10732
10739
|
} = constants;
|
|
10733
10740
|
const config$c = {
|
|
10734
10741
|
commandName: 'create',
|
|
10735
|
-
description: 'Create a scan',
|
|
10742
|
+
description: 'Create a new Socket scan and report',
|
|
10736
10743
|
hidden: false,
|
|
10737
10744
|
flags: {
|
|
10738
10745
|
...flags.commonFlags,
|
|
10739
10746
|
...flags.outputFlags,
|
|
10740
10747
|
autoManifest: {
|
|
10741
10748
|
type: 'boolean',
|
|
10742
|
-
description: 'Run `socket manifest auto` before collecting manifest files
|
|
10749
|
+
description: 'Run `socket manifest auto` before collecting manifest files. This is necessary for languages like Scala, Gradle, and Kotlin, See `socket manifest auto --help`.'
|
|
10743
10750
|
},
|
|
10744
10751
|
branch: {
|
|
10745
10752
|
type: 'string',
|
|
@@ -13643,7 +13650,7 @@ async function run$3(argv, importMeta, {
|
|
|
13643
13650
|
}
|
|
13644
13651
|
}
|
|
13645
13652
|
|
|
13646
|
-
const description$1 = '
|
|
13653
|
+
const description$1 = 'Manage Socket scans';
|
|
13647
13654
|
const cmdScan = {
|
|
13648
13655
|
description: description$1,
|
|
13649
13656
|
async run(argv, importMeta, {
|
|
@@ -13676,7 +13683,7 @@ const cmdScan = {
|
|
|
13676
13683
|
argv,
|
|
13677
13684
|
description: description$1,
|
|
13678
13685
|
importMeta,
|
|
13679
|
-
name: parentName
|
|
13686
|
+
name: `${parentName} scan`
|
|
13680
13687
|
});
|
|
13681
13688
|
}
|
|
13682
13689
|
};
|
|
@@ -13864,7 +13871,7 @@ const ECOSYSTEMS = new Set(['gem', 'golang', 'maven', 'npm', 'nuget', 'pypi']);
|
|
|
13864
13871
|
const TYPE_FILTERS = new Set(['anom', 'c', 'fp', 'joke', 'mal', 'secret', 'spy', 'tp', 'typo', 'u', 'vuln']);
|
|
13865
13872
|
const config$2 = {
|
|
13866
13873
|
commandName: 'threat-feed',
|
|
13867
|
-
description: '[
|
|
13874
|
+
description: '[Beta] View the threat feed',
|
|
13868
13875
|
hidden: false,
|
|
13869
13876
|
flags: {
|
|
13870
13877
|
...flags.commonFlags,
|
|
@@ -14219,7 +14226,7 @@ async function run$1(argv, importMeta, {
|
|
|
14219
14226
|
await handleUninstallCompletion(String(targetName));
|
|
14220
14227
|
}
|
|
14221
14228
|
|
|
14222
|
-
const description = '
|
|
14229
|
+
const description = 'Uninstall Socket CLI tab completion';
|
|
14223
14230
|
const cmdUninstall = {
|
|
14224
14231
|
description,
|
|
14225
14232
|
hidden: false,
|
|
@@ -14477,6 +14484,108 @@ async function run(argv, importMeta, {
|
|
|
14477
14484
|
}
|
|
14478
14485
|
}
|
|
14479
14486
|
|
|
14487
|
+
const rootCommands = {
|
|
14488
|
+
analytics: cmdAnalytics,
|
|
14489
|
+
'audit-log': cmdAuditLog,
|
|
14490
|
+
ci: cmdCI,
|
|
14491
|
+
cdxgen: cmdManifestCdxgen,
|
|
14492
|
+
config: cmdConfig,
|
|
14493
|
+
deps: cmdOrganizationDependencies,
|
|
14494
|
+
fix: cmdFix,
|
|
14495
|
+
install: cmdInstall,
|
|
14496
|
+
json: cmdJson,
|
|
14497
|
+
license: cmdOrganizationPolicyLicense,
|
|
14498
|
+
login: cmdLogin,
|
|
14499
|
+
logout: cmdLogout,
|
|
14500
|
+
manifest: cmdManifest,
|
|
14501
|
+
npm: cmdNpm,
|
|
14502
|
+
npx: cmdNpx,
|
|
14503
|
+
oops: cmdOops,
|
|
14504
|
+
optimize: cmdOptimize,
|
|
14505
|
+
organization: cmdOrganization,
|
|
14506
|
+
package: cmdPackage,
|
|
14507
|
+
'raw-npm': cmdRawNpm,
|
|
14508
|
+
'raw-npx': cmdRawNpx,
|
|
14509
|
+
repository: cmdRepository,
|
|
14510
|
+
scan: cmdScan,
|
|
14511
|
+
security: cmdOrganizationPolicySecurity,
|
|
14512
|
+
'threat-feed': cmdThreatFeed,
|
|
14513
|
+
uninstall: cmdUninstall,
|
|
14514
|
+
wrapper: cmdWrapper
|
|
14515
|
+
};
|
|
14516
|
+
const rootAliases = {
|
|
14517
|
+
audit: {
|
|
14518
|
+
description: cmdAuditLog.description,
|
|
14519
|
+
hidden: true,
|
|
14520
|
+
argv: ['audit-log']
|
|
14521
|
+
},
|
|
14522
|
+
auditLog: {
|
|
14523
|
+
description: cmdAuditLog.description,
|
|
14524
|
+
hidden: true,
|
|
14525
|
+
argv: ['audit-log']
|
|
14526
|
+
},
|
|
14527
|
+
auditLogs: {
|
|
14528
|
+
description: cmdAuditLog.description,
|
|
14529
|
+
hidden: true,
|
|
14530
|
+
argv: ['audit-log']
|
|
14531
|
+
},
|
|
14532
|
+
['audit-logs']: {
|
|
14533
|
+
description: cmdAuditLog.description,
|
|
14534
|
+
hidden: true,
|
|
14535
|
+
argv: ['audit-log']
|
|
14536
|
+
},
|
|
14537
|
+
feed: {
|
|
14538
|
+
description: cmdThreatFeed.description,
|
|
14539
|
+
hidden: true,
|
|
14540
|
+
argv: ['threat-feed']
|
|
14541
|
+
},
|
|
14542
|
+
org: {
|
|
14543
|
+
description: cmdOrganization.description,
|
|
14544
|
+
hidden: true,
|
|
14545
|
+
argv: ['organization']
|
|
14546
|
+
},
|
|
14547
|
+
orgs: {
|
|
14548
|
+
description: cmdOrganization.description,
|
|
14549
|
+
hidden: true,
|
|
14550
|
+
argv: ['organization']
|
|
14551
|
+
},
|
|
14552
|
+
organizations: {
|
|
14553
|
+
description: cmdOrganization.description,
|
|
14554
|
+
hidden: true,
|
|
14555
|
+
argv: ['organization']
|
|
14556
|
+
},
|
|
14557
|
+
organisation: {
|
|
14558
|
+
description: cmdOrganization.description,
|
|
14559
|
+
hidden: true,
|
|
14560
|
+
argv: ['organization']
|
|
14561
|
+
},
|
|
14562
|
+
organisations: {
|
|
14563
|
+
description: cmdOrganization.description,
|
|
14564
|
+
hidden: true,
|
|
14565
|
+
argv: ['organization']
|
|
14566
|
+
},
|
|
14567
|
+
pkg: {
|
|
14568
|
+
description: cmdPackage.description,
|
|
14569
|
+
hidden: true,
|
|
14570
|
+
argv: ['package']
|
|
14571
|
+
},
|
|
14572
|
+
repo: {
|
|
14573
|
+
description: cmdRepository.description,
|
|
14574
|
+
hidden: true,
|
|
14575
|
+
argv: ['repos']
|
|
14576
|
+
},
|
|
14577
|
+
repos: {
|
|
14578
|
+
description: cmdRepository.description,
|
|
14579
|
+
hidden: true,
|
|
14580
|
+
argv: ['repos']
|
|
14581
|
+
},
|
|
14582
|
+
repositories: {
|
|
14583
|
+
description: cmdRepository.description,
|
|
14584
|
+
hidden: true,
|
|
14585
|
+
argv: ['repos']
|
|
14586
|
+
}
|
|
14587
|
+
};
|
|
14588
|
+
|
|
14480
14589
|
const __filename$1 = require$$0.fileURLToPath(require('node:url').pathToFileURL(__filename).href);
|
|
14481
14590
|
void (async () => {
|
|
14482
14591
|
const registryUrl = vendor.registryUrl();
|
|
@@ -14493,123 +14602,8 @@ void (async () => {
|
|
|
14493
14602
|
version: constants.ENV.INLINED_SOCKET_CLI_VERSION
|
|
14494
14603
|
});
|
|
14495
14604
|
try {
|
|
14496
|
-
await utils.meowWithSubcommands({
|
|
14497
|
-
|
|
14498
|
-
'audit-log': cmdAuditLog,
|
|
14499
|
-
ci: cmdCI,
|
|
14500
|
-
config: cmdConfig,
|
|
14501
|
-
fix: cmdFix,
|
|
14502
|
-
install: cmdInstall,
|
|
14503
|
-
json: cmdJson,
|
|
14504
|
-
login: cmdLogin,
|
|
14505
|
-
logout: cmdLogout,
|
|
14506
|
-
npm: cmdNpm,
|
|
14507
|
-
npx: cmdNpx,
|
|
14508
|
-
oops: cmdOops,
|
|
14509
|
-
optimize: cmdOptimize,
|
|
14510
|
-
organization: cmdOrganization,
|
|
14511
|
-
package: cmdPackage,
|
|
14512
|
-
manifest: cmdManifest,
|
|
14513
|
-
scan: cmdScan,
|
|
14514
|
-
'raw-npm': cmdRawNpm,
|
|
14515
|
-
'raw-npx': cmdRawNpx,
|
|
14516
|
-
repos: cmdRepository,
|
|
14517
|
-
'threat-feed': cmdThreatFeed,
|
|
14518
|
-
uninstall: cmdUninstall,
|
|
14519
|
-
wrapper: cmdWrapper
|
|
14520
|
-
}, {
|
|
14521
|
-
aliases: {
|
|
14522
|
-
audit: {
|
|
14523
|
-
description: cmdAuditLog.description,
|
|
14524
|
-
hidden: true,
|
|
14525
|
-
argv: ['audit-log']
|
|
14526
|
-
},
|
|
14527
|
-
auditLog: {
|
|
14528
|
-
description: cmdAuditLog.description,
|
|
14529
|
-
hidden: true,
|
|
14530
|
-
argv: ['audit-log']
|
|
14531
|
-
},
|
|
14532
|
-
auditLogs: {
|
|
14533
|
-
description: cmdAuditLog.description,
|
|
14534
|
-
hidden: true,
|
|
14535
|
-
argv: ['audit-log']
|
|
14536
|
-
},
|
|
14537
|
-
['audit-logs']: {
|
|
14538
|
-
description: cmdAuditLog.description,
|
|
14539
|
-
hidden: true,
|
|
14540
|
-
argv: ['audit-log']
|
|
14541
|
-
},
|
|
14542
|
-
cdxgen: {
|
|
14543
|
-
description: cmdManifestCdxgen.description,
|
|
14544
|
-
hidden: true,
|
|
14545
|
-
argv: ['manifest', 'cdxgen']
|
|
14546
|
-
},
|
|
14547
|
-
deps: {
|
|
14548
|
-
description: cmdOrganizationDependencies.description,
|
|
14549
|
-
hidden: true,
|
|
14550
|
-
argv: ['dependencies']
|
|
14551
|
-
},
|
|
14552
|
-
feed: {
|
|
14553
|
-
description: cmdThreatFeed.description,
|
|
14554
|
-
hidden: true,
|
|
14555
|
-
argv: ['threat-feed']
|
|
14556
|
-
},
|
|
14557
|
-
license: {
|
|
14558
|
-
description: cmdOrganizationPolicyLicense.description,
|
|
14559
|
-
hidden: true,
|
|
14560
|
-
argv: ['organization', 'policy', 'license']
|
|
14561
|
-
},
|
|
14562
|
-
org: {
|
|
14563
|
-
description: cmdOrganization.description,
|
|
14564
|
-
hidden: true,
|
|
14565
|
-
argv: ['organization']
|
|
14566
|
-
},
|
|
14567
|
-
orgs: {
|
|
14568
|
-
description: cmdOrganization.description,
|
|
14569
|
-
hidden: true,
|
|
14570
|
-
argv: ['organization']
|
|
14571
|
-
},
|
|
14572
|
-
organizations: {
|
|
14573
|
-
description: cmdOrganization.description,
|
|
14574
|
-
hidden: true,
|
|
14575
|
-
argv: ['organization']
|
|
14576
|
-
},
|
|
14577
|
-
organisation: {
|
|
14578
|
-
description: cmdOrganization.description,
|
|
14579
|
-
hidden: true,
|
|
14580
|
-
argv: ['organization']
|
|
14581
|
-
},
|
|
14582
|
-
organisations: {
|
|
14583
|
-
description: cmdOrganization.description,
|
|
14584
|
-
hidden: true,
|
|
14585
|
-
argv: ['organization']
|
|
14586
|
-
},
|
|
14587
|
-
pkg: {
|
|
14588
|
-
description: cmdPackage.description,
|
|
14589
|
-
hidden: true,
|
|
14590
|
-
argv: ['package']
|
|
14591
|
-
},
|
|
14592
|
-
repo: {
|
|
14593
|
-
description: cmdRepository.description,
|
|
14594
|
-
hidden: true,
|
|
14595
|
-
argv: ['repos']
|
|
14596
|
-
},
|
|
14597
|
-
repository: {
|
|
14598
|
-
description: cmdRepository.description,
|
|
14599
|
-
hidden: true,
|
|
14600
|
-
argv: ['repos']
|
|
14601
|
-
},
|
|
14602
|
-
repositories: {
|
|
14603
|
-
description: cmdRepository.description,
|
|
14604
|
-
hidden: true,
|
|
14605
|
-
argv: ['repos']
|
|
14606
|
-
},
|
|
14607
|
-
security: {
|
|
14608
|
-
description: cmdOrganizationPolicySecurity.description,
|
|
14609
|
-
hidden: true,
|
|
14610
|
-
argv: ['organization', 'policy', 'security']
|
|
14611
|
-
}
|
|
14612
|
-
},
|
|
14605
|
+
await utils.meowWithSubcommands(rootCommands, {
|
|
14606
|
+
aliases: rootAliases,
|
|
14613
14607
|
argv: process.argv.slice(2),
|
|
14614
14608
|
// Lazily access constants.SOCKET_CLI_BIN_NAME.
|
|
14615
14609
|
name: constants.SOCKET_CLI_BIN_NAME,
|
|
@@ -14643,8 +14637,9 @@ void (async () => {
|
|
|
14643
14637
|
|
|
14644
14638
|
// Try to parse the flags, find out if --json is set.
|
|
14645
14639
|
const isJson = (() => {
|
|
14646
|
-
const cli = vendor.meow(
|
|
14640
|
+
const cli = vendor.meow({
|
|
14647
14641
|
argv: process.argv.slice(2),
|
|
14642
|
+
// Prevent meow from potentially exiting early.
|
|
14648
14643
|
autoHelp: false,
|
|
14649
14644
|
autoVersion: false,
|
|
14650
14645
|
flags: {},
|
|
@@ -14661,7 +14656,8 @@ void (async () => {
|
|
|
14661
14656
|
cause: errorMessage
|
|
14662
14657
|
}));
|
|
14663
14658
|
} else {
|
|
14664
|
-
|
|
14659
|
+
// Add 2 newlines in stderr to bump below any spinner.
|
|
14660
|
+
logger.logger.error('\n');
|
|
14665
14661
|
logger.logger.fail(utils.failMsgWithBadge(errorTitle, errorMessage));
|
|
14666
14662
|
if (errorBody) {
|
|
14667
14663
|
require$$6.debugDir('inspect', {
|
|
@@ -14672,5 +14668,5 @@ void (async () => {
|
|
|
14672
14668
|
await utils.captureException(e);
|
|
14673
14669
|
}
|
|
14674
14670
|
})();
|
|
14675
|
-
//# debugId=
|
|
14671
|
+
//# debugId=75f08195-c836-4616-95b6-9e8b367baf91
|
|
14676
14672
|
//# sourceMappingURL=cli.js.map
|