socketsecurity 2.8.1__tar.gz → 2.9.0__tar.gz

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 (172) hide show
  1. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/CHANGELOG.md +155 -0
  2. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/PKG-INFO +10 -9
  3. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/README.md +9 -8
  4. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/docs/ci-cd.md +152 -17
  5. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/docs/cli-reference.md +43 -13
  6. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/pyproject.toml +1 -1
  7. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/__init__.py +1 -1
  8. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/config.py +46 -10
  9. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/__init__.py +405 -77
  10. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/alert_selection.py +2 -0
  11. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/classes.py +75 -9
  12. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/cli_client.py +6 -1
  13. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/exceptions.py +11 -3
  14. socketsecurity-2.9.0/socketsecurity/core/git_remote.py +43 -0
  15. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/messages.py +207 -110
  16. socketsecurity-2.9.0/socketsecurity/core/pull_request.py +144 -0
  17. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/scm/github.py +91 -21
  18. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/scm/gitlab.py +124 -25
  19. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/scm_comments.py +100 -23
  20. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/tools/reachability.py +3 -3
  21. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/output.py +12 -0
  22. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/socketcli.py +159 -32
  23. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/core/test_diff_generation.py +48 -1
  24. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/core/test_diff_scan_polling.py +56 -1
  25. socketsecurity-2.9.0/tests/core/test_full_scan_outputs.py +128 -0
  26. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/core/test_package_and_alerts.py +89 -2
  27. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/core/test_sdk_methods.py +297 -11
  28. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_cli_config.py +54 -0
  29. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_client.py +53 -0
  30. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_dependency_overview.py +23 -0
  31. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_disable_ignore.py +37 -0
  32. socketsecurity-2.9.0/tests/unit/test_git_remote.py +41 -0
  33. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_gitlab_auth_fallback.py +26 -29
  34. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_gitlab_format.py +123 -5
  35. socketsecurity-2.9.0/tests/unit/test_ignore_authorization.py +267 -0
  36. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_ignore_telemetry_filtering.py +18 -0
  37. socketsecurity-2.9.0/tests/unit/test_messages.py +81 -0
  38. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_pr_comment_rendering.py +201 -0
  39. socketsecurity-2.9.0/tests/unit/test_pull_request_context.py +293 -0
  40. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_socketcli.py +96 -0
  41. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/uv.lock +1 -1
  42. socketsecurity-2.9.0/workflows/buildkite.yml +22 -0
  43. socketsecurity-2.8.1/workflows/buildkite.yml +0 -13
  44. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/CODEOWNERS +0 -0
  45. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
  46. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
  47. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
  48. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  49. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/actions/setup-docker/action.yml +0 -0
  50. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/actions/setup-hatch/action.yml +0 -0
  51. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/actions/setup-sfw/action.yml +0 -0
  52. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/dependabot.yml +0 -0
  53. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/workflows/dependency-review.yml +0 -0
  54. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/workflows/docker-stable.yml +0 -0
  55. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/workflows/e2e-test.yml +0 -0
  56. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/workflows/package-check.yml +0 -0
  57. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/workflows/pr-preview.yml +0 -0
  58. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/workflows/python-tests.yml +0 -0
  59. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/workflows/release.yml +0 -0
  60. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/workflows/version-check.yml +0 -0
  61. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.github/zizmor.yml +0 -0
  62. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.gitignore +0 -0
  63. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.hooks/sync_version.py +0 -0
  64. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.pre-commit-config.yaml +0 -0
  65. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/.python-version +0 -0
  66. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/CONTRIBUTING.md +0 -0
  67. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/Dockerfile +0 -0
  68. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/Dockerfile.preview +0 -0
  69. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/LICENSE +0 -0
  70. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/Makefile +0 -0
  71. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/benchmarks/manifest_discovery.py +0 -0
  72. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/docs/development.md +0 -0
  73. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/docs/troubleshooting.md +0 -0
  74. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/examples/config/sarif-dashboard-parity.json +0 -0
  75. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/examples/config/sarif-dashboard-parity.toml +0 -0
  76. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/examples/config/sarif-diff-ci-cd.json +0 -0
  77. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/examples/config/sarif-diff-ci-cd.toml +0 -0
  78. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/examples/config/sarif-instance-detail.json +0 -0
  79. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/examples/config/sarif-instance-detail.toml +0 -0
  80. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/instructions/gitlab-commit-status/uat.md +0 -0
  81. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/pytest.ini +0 -0
  82. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/scripts/build_container.sh +0 -0
  83. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/scripts/build_container_flexible.sh +0 -0
  84. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/scripts/deploy-test-docker.sh +0 -0
  85. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/scripts/deploy-test-pypi.sh +0 -0
  86. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/scripts/docker-entrypoint.sh +0 -0
  87. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/scripts/run.sh +0 -0
  88. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/session.md +0 -0
  89. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socket.yml +0 -0
  90. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/cli_run.py +0 -0
  91. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/git_interface.py +0 -0
  92. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/helper/__init__.py +0 -0
  93. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/helper/socket_facts_loader.py +0 -0
  94. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/lazy_file_loader.py +0 -0
  95. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/log_uploader.py +0 -0
  96. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/logging.py +0 -0
  97. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/resource_utils.py +0 -0
  98. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/scm/__init__.py +0 -0
  99. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/scm/base.py +0 -0
  100. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/scm/client.py +0 -0
  101. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/socket_config.py +0 -0
  102. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/streaming.py +0 -0
  103. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/core/utils.py +0 -0
  104. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/fossa_compat.py +0 -0
  105. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/plugins/__init__.py +0 -0
  106. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/plugins/base.py +0 -0
  107. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/plugins/formatters/__init__.py +0 -0
  108. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/plugins/formatters/slack.py +0 -0
  109. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/plugins/jira.py +0 -0
  110. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/plugins/manager.py +0 -0
  111. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/plugins/slack.py +0 -0
  112. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/plugins/teams.py +0 -0
  113. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/socketsecurity/plugins/webhook.py +0 -0
  114. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/__init__.py +0 -0
  115. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/core/conftest.py +0 -0
  116. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/core/create_diff_input.json +0 -0
  117. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/core/test_diff_alerts.py +0 -0
  118. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/core/test_facts_compression.py +0 -0
  119. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/core/test_has_manifest_files.py +0 -0
  120. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/core/test_invalid_facts_marker.py +0 -0
  121. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/core/test_supporting_methods.py +0 -0
  122. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/data/fullscans/create_response.json +0 -0
  123. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/data/fullscans/diff/stream_diff.json +0 -0
  124. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
  125. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/data/fullscans/head_scan/metadata.json +0 -0
  126. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
  127. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
  128. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/data/fullscans/new_scan/metadata.json +0 -0
  129. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
  130. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/data/repos/repo_info_error.json +0 -0
  131. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/data/repos/repo_info_no_head.json +0 -0
  132. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/data/repos/repo_info_success.json +0 -0
  133. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/data/settings/security-policy.json +0 -0
  134. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/e2e/fixtures/simple-npm/index.js +0 -0
  135. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/e2e/fixtures/simple-npm/package.json +0 -0
  136. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/e2e/fixtures/simple-pypi/requirements.txt +0 -0
  137. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/e2e/reach-facts-probe.sh +0 -0
  138. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/e2e/validate-gitlab.sh +0 -0
  139. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/e2e/validate-json.sh +0 -0
  140. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/e2e/validate-reachability.sh +0 -0
  141. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/e2e/validate-sarif.sh +0 -0
  142. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/e2e/validate-scan.sh +0 -0
  143. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/fixtures/fossa/README.md +0 -0
  144. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/fixtures/fossa/fossa-analyze-empty.json +0 -0
  145. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/fixtures/fossa/fossa-analyze-populated.json +0 -0
  146. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/fixtures/fossa/fossa-sbom-empty-deep.json +0 -0
  147. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/fixtures/fossa/fossa-sbom-populated.json +0 -0
  148. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/__init__.py +0 -0
  149. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_alert_selection.py +0 -0
  150. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_cli_run.py +0 -0
  151. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_config.py +0 -0
  152. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_exclude_paths.py +0 -0
  153. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_fossa_compat.py +0 -0
  154. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_fossa_parity.py +0 -0
  155. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_full_scan_retry.py +0 -0
  156. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_git_interface.py +0 -0
  157. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_github_buildkite_config.py +0 -0
  158. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_gitlab_auth.py +0 -0
  159. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_gitlab_commit_status.py +0 -0
  160. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_include_dirs.py +0 -0
  161. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_log_uploader.py +0 -0
  162. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_manifest_discovery.py +0 -0
  163. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_output.py +0 -0
  164. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_reachability.py +0 -0
  165. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_scan_scope.py +0 -0
  166. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_slack_plugin.py +0 -0
  167. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_slack_severity_normalization.py +0 -0
  168. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_streaming.py +0 -0
  169. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/tests/unit/test_tier1_finalize.py +0 -0
  170. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/workflows/bitbucket-pipelines.yml +0 -0
  171. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/workflows/github-actions.yml +0 -0
  172. {socketsecurity-2.8.1 → socketsecurity-2.9.0}/workflows/gitlab-ci.yml +0 -0
@@ -1,5 +1,160 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.9.0
4
+
5
+ ### Added: patched versions in human-readable security output
6
+
7
+ - The native console alert table now includes a `Patched Version` column,
8
+ populated from `props.firstPatchedVersionIdentifier` when the API provides it.
9
+ - GitHub pull request and GitLab merge request security comments now show the
10
+ patched version in each applicable alert's details.
11
+
12
+ ### Fixed: CLI scans retain pull request context in the Socket Dashboard
13
+
14
+ - Pull request numbers are detected from standard GitHub Actions, GitLab CI,
15
+ and Azure Pipelines environments when `--pr-number` is not supplied. An
16
+ explicitly supplied value, including `0`, remains authoritative.
17
+ - The Buildkite workflow and CI/CD guide now forward `BUILDKITE_PULL_REQUEST`
18
+ explicitly and document provider selection for Dashboard PR association. With
19
+ `--integration github` or `--integration gitlab`, the repository slug and host
20
+ for the link are read from `BUILDKITE_REPO`, covering self-hosted installations.
21
+ - `--scm github` and `--scm gitlab` now imply the matching scan integration
22
+ unless `--integration` is explicitly supplied.
23
+ - Diff scans include the detected pull request or merge request URL as their
24
+ external link, allowing Dashboard reports to retain their CI change context.
25
+ Re-running a comparison over an already-compared scan pair now applies the
26
+ link to the existing diff scan instead of leaving that report unassociated.
27
+ - A `--pr-number` value that is not a positive integer is now normalized to `0`
28
+ before the GitHub adapter reads it, so Buildkite's `false` on a branch build no
29
+ longer makes that build look like a pull request event.
30
+
31
+ ### Changed: GitHub and GitLab branch pipelines create full scans
32
+
33
+ - With `--scm github` or `--scm gitlab`, only pull request and merge request
34
+ events create diff scans. Every other pipeline, including default-branch
35
+ pushes, creates a full scan. The detected event type is authoritative:
36
+ `--enable-diff` and `--ignore-commit-files` no longer opt an SCM branch run
37
+ into comparison mode.
38
+ - Those runs no longer set a blocking exit code. A full scan has no baseline, so
39
+ it cannot distinguish newly introduced alerts from pre-existing ones; the CLI
40
+ now behaves as if `--disable-blocking` was supplied, matching how it already
41
+ treats a run with no supported manifest files. Pull request and merge request
42
+ pipelines are unaffected and still block.
43
+ - `--generate-license` and `--legal-format fossa` fetch the package list on this
44
+ path, so attribution files generated from a branch pipeline are complete rather
45
+ than empty.
46
+ - Console-only full scans link to the Socket report and state that findings were
47
+ not fetched for console output instead of presenting an empty local alert list
48
+ as "No issues found."
49
+ - License enrichment keeps the package namespace in PURL requests and response
50
+ matching, so scoped npm packages and namespaced Maven packages receive their
51
+ license details.
52
+
53
+ ### Changed: `@SocketSecurity ignore` requires write access
54
+
55
+ - An ignore command suppresses a security alert, but the CLI honored one from any
56
+ commenter, including a drive-by comment from someone with no access to the
57
+ repository. Commands are now accepted only from an author with write access.
58
+ - On GitHub this is read from the effective repository permission and cached per
59
+ commenter for the run. Write, maintain, or admin access is required; relationship
60
+ labels such as `MEMBER` and `COLLABORATOR` are not treated as permissions.
61
+ - A 404 from GitHub's collaborator-permission endpoint is treated as a definitive
62
+ denial rather than an unreadable permission, so the default `enforce` policy does
63
+ not honor ignore commands from users outside the repository.
64
+ - GitLab notes carry no equivalent field, so project membership is read once per
65
+ run (only when an ignore command is present) and Developer or above is required.
66
+ If that lookup cannot be answered — a `CI_JOB_TOKEN` generally cannot read the
67
+ members API — the command is still honored and a warning names the author, so
68
+ enabling this does not silently break pipelines that relied on ignore commands.
69
+ Use a `GITLAB_TOKEN` with API read access to get enforcement.
70
+ - A rejected command is logged and is also absent from the ignore telemetry, which
71
+ records what was acted on. No acknowledgement reaction is added to a comment that
72
+ was not honored.
73
+ - `--ignore-authorization` selects the policy: `enforce` (default) requires write
74
+ access and honors the command with a warning where the provider cannot report it,
75
+ `strict` rejects it in that case instead, and `off` performs no check.
76
+
77
+ ### Fixed: GitLab authentication fallback never ran
78
+
79
+ - When a GitLab token's type cannot be inferred from its shape, the CLI guesses
80
+ between Bearer and PRIVATE-TOKEN and retries once under the other scheme on a
81
+ 401. That retry never happened: the retry caught `requests.exceptions.HTTPError`,
82
+ but the HTTP client translates every request error into `APIFailure` first, so a
83
+ misclassified token failed the run instead of falling back.
84
+ - API failures raised by the CLI's HTTP client now carry their HTTP status code.
85
+ Without it a 401 was indistinguishable from any other failure, and
86
+ `is_transient_error` could not classify one either.
87
+ - The CLI's `APIFailure` now subclasses the SDK exception of the same name. They
88
+ were independent types, so an `except APIFailure` importing the SDK's — which is
89
+ what every handler in `socketsecurity.core` does — did not catch a failure raised
90
+ by the HTTP client.
91
+
92
+ ### Fixed: pull request and merge request comment accuracy
93
+
94
+ - Per-alert ignore instructions now use ecosystem-qualified package names and
95
+ accept scoped packages while remaining compatible with older bare-name replies.
96
+ A leading npm scope is no longer mistaken for an ecosystem, so
97
+ `ignore @types/node@*` no longer also ignores the package named `node`.
98
+ - Ignore telemetry uses the same package matcher as alert suppression, so legacy
99
+ bare-name commands generate an event for the alert they suppress.
100
+ - Dependency overviews preserve added, updated, removed, and replaced package
101
+ classifications instead of presenting updates as new dependencies. Added and
102
+ updated rows keep their diff badge; removed and replaced, which have no
103
+ published badge, use a text label.
104
+ - Shared security comment copy no longer describes GitLab merge request output
105
+ as Socket for GitHub.
106
+ - Updating a security comment in the legacy table format no longer raises on a
107
+ malformed row. Each row was unpacked through four consecutive splits with no
108
+ bounds checks, so a cell carrying an extra `|`, a package cell that is not a
109
+ markdown link, or a name with no version ended the run before it reported
110
+ status — and a scoped package name in Socket's own table was enough to trigger
111
+ it. Rows are now parsed defensively, and a row that cannot be read keeps its
112
+ alert reported. Ignore commands for a scoped package are accepted there in both
113
+ the ecosystem-qualified and bare forms.
114
+ - Server URLs read from `GITHUB_SERVER_URL` and `CI_SERVER_URL` are validated as
115
+ http(s) URLs before being composed into a diff scan's external link, matching
116
+ the check already applied to the other repository URLs read from CI.
117
+ - Repository-derived values are escaped before they are rendered into a pull
118
+ request or merge request comment. Manifest paths and sources are file paths from
119
+ the scanned repository, and alert text comes from the API; neither is markup the
120
+ CLI authored, so both are now escaped at the point they are interpolated. The
121
+ alert markers can no longer be terminated early by a package name. Slack, Jira
122
+ and console output are unchanged, since none of them render HTML.
123
+ ## 2.8.3
124
+
125
+ ### Fixed: GitLab report serialization and workspace baselines
126
+
127
+ - Full-scan package identities and Socket links now preserve namespaced packages
128
+ when the SDK returns enum-backed ecosystem values.
129
+ - Namespaced package links separate the namespace from the name instead of
130
+ concatenating them, so Maven links no longer fuse groupId and artifactId into a
131
+ single unresolvable path segment. A namespaced package whose namespace is
132
+ missing now logs a warning rather than emitting a broken link silently.
133
+ - GitLab dependency-scanning reports emit CVE and GHSA identifiers from current
134
+ API fields while remaining compatible with legacy CVE data.
135
+ - GitLab report findings record the manifest they came from when the package's
136
+ introducing chain is unavailable, instead of reporting the location as
137
+ `unknown`, and report whether a dependency is direct from the package record
138
+ rather than inferring it from a dependency-path string that is never produced.
139
+ - `--base-commit-sha` degrades to the nearest scanned ancestor of the requested
140
+ commit instead of failing the run, and logs which commit was used and how far
141
+ back it is. Squash merges, rebases, and multi-commit pushes all leave a merge
142
+ base unscanned even when default-branch scanning is configured correctly. The
143
+ lookup follows paginated scan history and the run still fails when no scanned
144
+ ancestor is reachable or the exact-commit lookup itself fails.
145
+ - Implicit diff baselines are selected from the same workspace, scan type,
146
+ repository, and default branch, including when no workspace is supplied. A
147
+ baseline lookup that fails is reported as an API error instead of resolving to
148
+ an empty baseline, and temporary scans are skipped when selecting one.
149
+ ## 2.8.2
150
+
151
+ ### Changed: bump pinned @coana-tech/cli to 15.10.41
152
+
153
+ - Bumped the pinned reachability engine (`@coana-tech/cli`) from `15.10.40` to
154
+ `15.10.41`. See the
155
+ [reachability analysis changelog](https://docs.socket.dev/docs/reachability-analysis-changelog)
156
+ for engine changes.
157
+
3
158
  ## 2.8.1
4
159
 
5
160
  ### Changed: bump pinned @coana-tech/cli to 15.10.40
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: socketsecurity
3
- Version: 2.8.1
3
+ Version: 2.9.0
4
4
  Summary: Socket Security CLI for CI/CD
5
5
  Project-URL: Homepage, https://socket.dev
6
6
  Author-email: Douglas Coburn <douglas@socket.dev>
@@ -104,21 +104,22 @@ socketcli --enable-gitlab-security --gitlab-security-file gl-dependency-scanning
104
104
 
105
105
  ### PR scan diffed against the merge base
106
106
 
107
- By default, PR scans are diffed against the repository's latest head scan. To diff against
108
- the exact commit your PR branched from instead, pass the merge base as the baseline:
107
+ By default, PR scans are diffed against the repository's latest matching head scan. To
108
+ prefer the commit your PR branched from as the baseline, pass the merge base:
109
109
 
110
110
  ```bash
111
111
  BASE_SHA=$(git merge-base origin/main HEAD)
112
112
  socketcli --pr-number 123 --base-commit-sha "$BASE_SHA"
113
113
  ```
114
114
 
115
- > **Requirement:** `--base-commit-sha` only works if Socket already has a full scan for that
116
- > exact commit. In practice this means your CI must run `socketcli` on **every commit that
117
- > lands on your default branch** not just some of them. If merges can land without a scan
118
- > (skipped/canceled builds, `[skip ci]`, path-filtered pipelines), the PR scan will fail with
119
- > exit code 3 rather than silently diff against the wrong baseline. See
115
+ > The CLI uses the exact commit's newest matching full scan when one exists. Otherwise, it
116
+ > searches up to 100 first-parent commits in the local checkout and uses the nearest scanned
117
+ > ancestor, with a warning that the diff is wider than the merge base. Run `socketcli`
118
+ > regularly on your default branch and ensure PR checkouts contain enough history for that
119
+ > walk. The run fails with the configured API-error exit code only when no scanned ancestor
120
+ > is reachable (or when the scan lookup itself fails). See
120
121
  > [`docs/cli-reference.md`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/cli-reference.md)
121
- > for the full requirements and a backfill pattern that makes PR jobs self-sufficient.
122
+ > for the full behavior and an optional exact-baseline backfill pattern.
122
123
 
123
124
  A specific full scan ID also works: `--base-scan-id <id>`.
124
125
 
@@ -44,21 +44,22 @@ socketcli --enable-gitlab-security --gitlab-security-file gl-dependency-scanning
44
44
 
45
45
  ### PR scan diffed against the merge base
46
46
 
47
- By default, PR scans are diffed against the repository's latest head scan. To diff against
48
- the exact commit your PR branched from instead, pass the merge base as the baseline:
47
+ By default, PR scans are diffed against the repository's latest matching head scan. To
48
+ prefer the commit your PR branched from as the baseline, pass the merge base:
49
49
 
50
50
  ```bash
51
51
  BASE_SHA=$(git merge-base origin/main HEAD)
52
52
  socketcli --pr-number 123 --base-commit-sha "$BASE_SHA"
53
53
  ```
54
54
 
55
- > **Requirement:** `--base-commit-sha` only works if Socket already has a full scan for that
56
- > exact commit. In practice this means your CI must run `socketcli` on **every commit that
57
- > lands on your default branch** not just some of them. If merges can land without a scan
58
- > (skipped/canceled builds, `[skip ci]`, path-filtered pipelines), the PR scan will fail with
59
- > exit code 3 rather than silently diff against the wrong baseline. See
55
+ > The CLI uses the exact commit's newest matching full scan when one exists. Otherwise, it
56
+ > searches up to 100 first-parent commits in the local checkout and uses the nearest scanned
57
+ > ancestor, with a warning that the diff is wider than the merge base. Run `socketcli`
58
+ > regularly on your default branch and ensure PR checkouts contain enough history for that
59
+ > walk. The run fails with the configured API-error exit code only when no scanned ancestor
60
+ > is reachable (or when the scan lookup itself fails). See
60
61
  > [`docs/cli-reference.md`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/cli-reference.md)
61
- > for the full requirements and a backfill pattern that makes PR jobs self-sufficient.
62
+ > for the full behavior and an optional exact-baseline backfill pattern.
62
63
 
63
64
  A specific full scan ID also works: `--base-scan-id <id>`.
64
65
 
@@ -2,6 +2,10 @@
2
2
 
3
3
  Use this guide for pipeline-focused CLI usage across platforms.
4
4
 
5
+ The shell commands in the recommended patterns are CI-provider neutral. Buildkite
6
+ pipeline equivalents and provider-specific considerations are called out alongside
7
+ the relevant guidance below.
8
+
5
9
  ## Recommended patterns
6
10
 
7
11
  ### Dashboard-style reachable SARIF
@@ -27,6 +31,27 @@ socketcli \
27
31
  --strict-blocking
28
32
  ```
29
33
 
34
+ ### Buildkite: retain SARIF as a build artifact
35
+
36
+ Either recommended pattern can run directly in a Buildkite command step. When the
37
+ scan writes SARIF, add
38
+ [`artifact_paths`](https://buildkite.com/docs/pipelines/configure/artifacts#upload-artifacts-with-a-command-step)
39
+ so developers can download the report from the build after the command finishes:
40
+
41
+ ```yaml
42
+ steps:
43
+ - label: ":socket: Socket reachable diff"
44
+ command: |
45
+ socketcli \
46
+ --reach \
47
+ --sarif-file results.sarif \
48
+ --sarif-scope diff \
49
+ --sarif-reachability reachable \
50
+ --strict-blocking
51
+ artifact_paths:
52
+ - "results.sarif"
53
+ ```
54
+
30
55
  ## Config file usage in CI
31
56
 
32
57
  Use `--config .socketcli.toml` or `--config .socketcli.json` to keep pipeline commands small.
@@ -60,6 +85,9 @@ Equivalent JSON:
60
85
  }
61
86
  ```
62
87
 
88
+ The Buildkite examples below use the same checked-in `.socketcli.toml` file; no
89
+ Buildkite-specific config-file format is required.
90
+
63
91
  ## Platform examples
64
92
 
65
93
  ### GitHub Actions
@@ -306,14 +334,33 @@ initial timeout signal or 137 if `SIGKILL` is involved.
306
334
 
307
335
  ### Buildkite
308
336
 
337
+ This example assumes a GitHub-hosted repository. Change
338
+ `SOCKET_SCM_INTEGRATION` to `gitlab` for a GitLab-hosted repository, or `api`
339
+ when provider association is not wanted. The doubled dollar signs defer
340
+ Buildkite variable expansion until the command runs on an agent.
341
+
309
342
  ```yaml
343
+ env:
344
+ SOCKET_SCM_INTEGRATION: "github"
345
+
310
346
  steps:
311
347
  - label: "Socket scan"
312
- command: "socketcli --config .socketcli.toml --target-path ."
313
- env:
314
- SOCKET_SECURITY_API_TOKEN: "${SOCKET_SECURITY_API_TOKEN}"
348
+ command: |
349
+ socketcli \
350
+ --config .socketcli.toml \
351
+ --target-path . \
352
+ --integration "$${SOCKET_SCM_INTEGRATION:-api}" \
353
+ --pr-number "$${BUILDKITE_PULL_REQUEST:-0}"
354
+ secrets:
355
+ - SOCKET_SECURITY_API_TOKEN
315
356
  ```
316
357
 
358
+ The `secrets` block expects a
359
+ [Buildkite secret](https://buildkite.com/docs/pipelines/security/secrets/buildkite-secrets)
360
+ named `SOCKET_SECURITY_API_TOKEN`. If your organization uses an external secrets
361
+ plugin or an agent hook instead, remove that block and inject the same environment
362
+ variable through your existing mechanism. Do not store the token in pipeline YAML.
363
+
317
364
  The CLI reads Buildkite's native `BUILDKITE_COMMIT`, `BUILDKITE_BRANCH`,
318
365
  `BUILDKITE_PULL_REQUEST`, and `BUILDKITE_PULL_REQUEST_BASE_BRANCH` variables.
319
366
  For pull-request builds, ensure the checkout contains the base branch and the
@@ -321,11 +368,12 @@ checked-out head commit. The CLI uses those local refs first and performs a
321
368
  targeted fetch only when a required ref or its comparison history is missing;
322
369
  it does not fetch every remote ref and tag during startup.
323
370
 
324
- When `--scm github` is used from Buildkite, the CLI also derives GitHub comment
325
- context from `BUILDKITE_REPO`, `BUILDKITE_BUILD_CHECKOUT_PATH`, and the variables
326
- above. Set `GH_API_TOKEN` to a GitHub token with the required repository access.
327
- GitHub Enterprise users should also set `GITHUB_API_URL`; GitHub.com defaults to
328
- `https://api.github.com`.
371
+ When `--scm github` is used from Buildkite, the CLI also posts GitHub PR comments.
372
+ It identifies the repository from `BUILDKITE_REPO` and takes the rest of the build
373
+ context from `BUILDKITE_BUILD_CHECKOUT_PATH` and the variables above see
374
+ [Buildkite PR context](#buildkite-pr-context). Set `GH_API_TOKEN` to a GitHub token
375
+ with the required repository access. GitHub Enterprise users should also set
376
+ `GITHUB_API_URL`; GitHub.com defaults to `https://api.github.com`.
329
377
 
330
378
  #### Merge-base baselines in Buildkite (dynamic pipelines)
331
379
 
@@ -347,11 +395,14 @@ generator rather than a static YAML file:
347
395
  BASE_SHA=$(git merge-base "origin/${TARGET}" HEAD)
348
396
  ```
349
397
 
350
- - **Emit the backfill step conditionally from the generator.** The generator is the
351
- natural place for the "does a baseline scan exist?" check
398
+ - **If an exact baseline is required, emit a backfill step conditionally from the
399
+ generator.** The generator is the natural place for the "does an exact baseline
400
+ scan exist?" check
352
401
  (`GET /orgs/{org}/full-scans?repo=<repo>&commit_hash=$BASE_SHA&per_page=1`): only
353
402
  emit the baseline-scan step when it returns nothing. The emitted pipeline then shows
354
- in the UI whether a backfill will run.
403
+ in the UI whether a backfill will run. Without a backfill, the CLI automatically
404
+ uses the nearest scanned first-parent ancestor within 100 commits and warns that
405
+ the diff is wider.
355
406
 
356
407
  - **Keep the backfill inside one command step.** The checkout-base → scan →
357
408
  checkout-PR sequence must not be split across steps — steps can land on different
@@ -360,17 +411,18 @@ generator rather than a static YAML file:
360
411
  checkout: `git worktree add /tmp/socket-base "$BASE_SHA"` then
361
412
  `socketcli --target-path /tmp/socket-base --branch "$TARGET" --disable-blocking`.
362
413
 
363
- - **Soft-fail infra errors, not findings.** A missing baseline (or any API error)
364
- exits with code 3 (`--exit-code-on-api-error` to change it); real findings exit 1.
414
+ - **Soft-fail infra errors, not findings.** No reachable scanned ancestor (or any API
415
+ error) exits with code 3 (`--exit-code-on-api-error` to change it); real findings exit 1.
365
416
  [`soft_fail: [{exit_status: 3}]`](https://buildkite.com/docs/pipelines/configure/step-types/command-step)
366
417
  on the PR scan step keeps infra errors from blocking merges while security findings
367
418
  still do.
368
419
 
369
420
  - **["Cancel intermediate builds"](https://buildkite.com/docs/pipelines/configure/canceling-builds#cancel-running-intermediate-builds)
370
- on the default branch is the main source of baseline gaps.** Canceled builds never
371
- scan their commit, so merge-base lookups for PRs based on those commits fail. The
372
- conditional backfill step above is the remedy; there is no per-step exemption from
373
- build cancellation in Buildkite. If you need strict scan-once semantics for
421
+ on the default branch is a common source of exact-baseline gaps.** Canceled builds
422
+ never scan their commit, so these PRs fall back to an older scanned ancestor. Use
423
+ the conditional backfill step above when an exact merge-base comparison is required;
424
+ there is no per-step exemption from build cancellation in Buildkite. If you need
425
+ strict scan-once semantics for
374
426
  concurrent backfills of the same merge base, serialize the backfill step with a
375
427
  [concurrency group](https://buildkite.com/docs/pipelines/configure/workflows/controlling-concurrency)
376
428
  keyed on the merge-base SHA.
@@ -385,6 +437,18 @@ socket_scan:
385
437
  SOCKET_SECURITY_API_TOKEN: $SOCKET_SECURITY_API_TOKEN
386
438
  ```
387
439
 
440
+ ### Azure Pipelines
441
+
442
+ ```yaml
443
+ - script: |
444
+ socketcli \
445
+ --integration azure \
446
+ --enable-diff \
447
+ --target-path "$(Build.SourcesDirectory)"
448
+ env:
449
+ SOCKET_SECURITY_API_TOKEN: $(SOCKET_SECURITY_API_TOKEN)
450
+ ```
451
+
388
452
  ### Bitbucket Pipelines
389
453
 
390
454
  ```yaml
@@ -395,6 +459,69 @@ pipelines:
395
459
  - socketcli --config .socketcli.toml --target-path .
396
460
  ```
397
461
 
462
+ ## Scan type by pipeline
463
+
464
+ With `--scm github` or `--scm gitlab`, the detected event decides the scan type:
465
+
466
+ | Event | Scan | Blocks the build |
467
+ |:------|:-----|:-----------------|
468
+ | Pull request / merge request | Diff scan against the repository's baseline | Yes, on newly introduced alerts |
469
+ | Any other pipeline, including default-branch pushes | Full scan | No |
470
+
471
+ A full scan has no baseline, so it cannot tell a newly introduced alert from one
472
+ that was already there. Rather than block on a number that would mean something
473
+ different depending on which output format was enabled, those runs behave as if
474
+ `--disable-blocking` was supplied and report through the Dashboard instead. This
475
+ matches how the CLI already treats a run with no supported manifest files.
476
+
477
+ The event type is authoritative once `--scm` is set: `--enable-diff` and
478
+ `--ignore-commit-files` do not turn a branch pipeline into a comparison. To diff
479
+ a branch build, drop `--scm` and use `--enable-diff` with `--integration`, which
480
+ runs the comparison without the PR comment adapter.
481
+
482
+ `--generate-license` and `--legal-format fossa` work on both paths; a full scan
483
+ fetches the package list for them.
484
+
485
+ ## Pull request and Dashboard association
486
+
487
+ The CLI sends the resolved pull request number with each full scan and attaches
488
+ the pull request URL to diff scans so the Socket Dashboard can associate the
489
+ report with its originating change. If `--pr-number` is supplied, it wins;
490
+ passing `--pr-number 0` explicitly disables automatic association. Any value that
491
+ is not a positive integer, including Buildkite's `false`, means no pull request.
492
+
493
+ Without an explicit value, the CLI recognizes:
494
+
495
+ - GitHub Actions: `PR_NUMBER`, then the PR number in `GITHUB_REF`.
496
+ - GitLab CI: `CI_MERGE_REQUEST_IID`.
497
+ - Azure Pipelines: `SYSTEM_PULLREQUEST_PULLREQUESTNUMBER` for GitHub-hosted
498
+ repositories, otherwise `SYSTEM_PULLREQUEST_PULLREQUESTID` for Azure Repos.
499
+
500
+ ### Buildkite PR context
501
+
502
+ Buildkite is SCM-provider neutral, so the CLI does not infer a provider or consume
503
+ its PR variable automatically. Pass Buildkite's
504
+ [`BUILDKITE_PULL_REQUEST`](https://buildkite.com/docs/pipelines/configure/environment-variables#BUILDKITE_PULL_REQUEST)
505
+ value to
506
+ `--pr-number` and identify the repository host with `--integration`, as shown in
507
+ the Buildkite platform example above. Buildkite sets `BUILDKITE_PULL_REQUEST` to
508
+ `false` outside PR builds; the CLI treats that value as no PR.
509
+
510
+ Use `--integration github` for GitHub-hosted repositories and `--integration gitlab`
511
+ for GitLab-hosted ones. The CLI identifies the repository from
512
+ [`BUILDKITE_REPO`](https://buildkite.com/docs/pipelines/configure/environment-variables#BUILDKITE_REPO),
513
+ taking both the slug and the host from it, so github.com, GitLab.com, and self-hosted
514
+ installations all build a correct pull request or merge request link without extra
515
+ configuration. That same value identifies the repository for GitHub PR comments when
516
+ `--scm github` is set. `CI_PROJECT_URL` still overrides the derived GitLab project URL.
517
+ Keep `--scm api` unless you also intend to configure an existing GitHub or GitLab
518
+ comment adapter and its provider token.
519
+
520
+ `--scm github` and `--scm gitlab` also imply the matching scan integration for
521
+ Dashboard metadata unless `--integration` was explicitly supplied. PR comments
522
+ remain limited to the existing GitHub and GitLab SCM adapters; Azure receives
523
+ console output and Dashboard association but does not post a PR comment.
524
+
398
525
  ## Workflow templates
399
526
 
400
527
  Prebuilt examples in this repo:
@@ -411,3 +538,11 @@ Prebuilt examples in this repo:
411
538
  - `--sarif-grouping alert` currently applies to `--sarif-scope full`.
412
539
  - Diff-based SARIF can validly be empty when there are no matching net-new alerts.
413
540
  - Keep API tokens in secret stores (`SOCKET_SECURITY_API_TOKEN`), not in config files.
541
+ - In Buildkite pipeline YAML, follow its
542
+ [runtime interpolation](https://buildkite.com/docs/pipelines/configure/environment-variables#runtime-variable-interpolation)
543
+ guidance and use `$$` for variables that must expand when the command runs rather
544
+ than when the pipeline is uploaded.
545
+ - Security findings with `props.firstPatchedVersionIdentifier` show that value in
546
+ the console table, including native Buildkite job logs, and in GitHub/GitLab
547
+ security comments when that SCM adapter is configured. Findings without a known
548
+ patched release leave the console cell blank and omit the comment field.
@@ -238,7 +238,7 @@ If you don't want to provide the Socket API Token every time then you can use th
238
238
  | `--repo` | False | *auto* | Repository name in owner/repo format (auto-detected from git remote) |
239
239
  | `--workspace` | False | | The Socket workspace to associate the scan with (e.g. `my-org` in `my-org/my-repo`). See note below. |
240
240
  | `--repo-is-public` | False | False | If set, flags a new repository creation as public. Defaults to false. |
241
- | `--integration` | False | api | Integration type (api, github, gitlab, azure, bitbucket) |
241
+ | `--integration` | False | api | Integration type (api, github, gitlab, azure, bitbucket). When omitted, `--scm github` or `--scm gitlab` implies the matching integration. |
242
242
  | `--owner` | False | | Name of the integration owner, defaults to the socket organization slug |
243
243
  | `--branch` | False | *auto* | Branch name (auto-detected from git) |
244
244
  | `--committers` | False | *auto* | Committer(s) to filter by (auto-detected from git commit) |
@@ -252,28 +252,26 @@ If you don't want to provide the Socket API Token every time then you can use th
252
252
  #### Pull Request and Commit
253
253
  | Parameter | Required | Default | Description |
254
254
  |:-----------------|:---------|:--------|:-----------------------------------------------|
255
- | `--pr-number` | False | "0" | Pull request number |
255
+ | `--pr-number` | False | *auto* | Pull request number. Auto-detected in GitHub Actions, GitLab CI, and Azure Pipelines; explicitly passing `0` disables detection. |
256
256
  | `--commit-message` | False | *auto* | Commit message (auto-detected from git) |
257
257
  | `--commit-sha` | False | *auto* | Commit SHA (auto-detected from git) |
258
258
  | `--base-scan-id` | False | | Full scan ID to diff against, overriding the repository's head scan as the baseline. Mutually exclusive with `--base-commit-sha` |
259
- | `--base-commit-sha`| False | | Commit SHA to diff against, overriding the repository's head scan as the baseline. The most recent full scan for that commit is used; the CLI errors (exit code 3, or `--exit-code-on-api-error`) if no scan exists for it. Mutually exclusive with `--base-scan-id` |
259
+ | `--base-commit-sha`| False | | Commit SHA to prefer as the diff baseline, overriding the repository's head scan. The CLI uses its most recent matching full scan or the nearest scanned first-parent ancestor within 100 local commits. It errors (exit code 3, or `--exit-code-on-api-error`) if no scanned ancestor is reachable. Mutually exclusive with `--base-scan-id` |
260
260
 
261
- > **Diffing against the merge base** — by default, PR scans are diffed against the repository's *latest* head scan, which may include newer default-branch commits than your PR branched from. To diff against the exact commit your PR is based on, compute the merge base and pass it as the baseline:
261
+ > **Diffing against the merge base** — by default, PR scans are diffed against the repository's latest matching head scan, which may include newer default-branch commits than your PR branched from. To prefer the commit your PR is based on, compute the merge base and pass it as the baseline:
262
262
  >
263
263
  > ```shell
264
264
  > BASE_SHA=$(git merge-base origin/main HEAD)
265
265
  > socketcli --pr-number 123 --base-commit-sha "$BASE_SHA"
266
266
  > ```
267
267
  >
268
- > **Requirement: a full scan must already exist for the merge-base commit.** `--base-commit-sha` does not create a scan of that commit; it looks up an existing one. That lookup only succeeds if your CI runs `socketcli` on **every commit that lands on your default branch** every merge and direct push, not just periodic or latest-only scans. Common ways commits slip through without a scan:
268
+ > `--base-commit-sha` does not create a scan of that commit. The CLI first looks for the newest non-temporary scan matching the repository, workspace, scan type, and exact commit. If the exact commit was not scanned, it walks up to 100 first-parent commits from that SHA in the local checkout and uses the nearest matching scanned ancestor. It logs a warning with the selected commit and distance because this produces a wider diff than the merge base.
269
269
  >
270
- > - CI settings that cancel or skip intermediate builds when newer commits land (e.g. Buildkite's ["cancel intermediate builds"](https://buildkite.com/docs/pipelines/configure/canceling-builds#cancel-running-intermediate-builds))
271
- > - `[skip ci]` commits, path-filtered pipelines, or failed/canceled scan steps
272
- > - merge-base commits that predate your Socket rollout
270
+ > Run `socketcli` regularly on the default branch so recent ancestors have scans. PR checkouts must also retain the merge base and enough first-parent history; shallow clones can shorten the search. Gaps are expected when CI cancels intermediate builds, commits use `[skip ci]`, pipelines are path-filtered, or the merge base predates your Socket rollout.
273
271
  >
274
- > If no scan exists for the commit, the CLI **fails** (exit code 3, or your `--exit-code-on-api-error` value; exit 0 with `--disable-blocking`) instead of silently falling back to the head scan a wrong baseline would misreport which alerts the PR introduces. Don't adopt this flag without default-branch scan coverage in place; you'll fail PR builds on lookup misses.
272
+ > If no scanned ancestor is reachable within the local 100-commit walk, the CLI **fails** (exit code 3, or your `--exit-code-on-api-error` value; exit 0 with `--disable-blocking`) instead of silently falling back to the repository head. API or permission failures also fail rather than being treated as a missing exact scan.
275
273
  >
276
- > **Backfill pattern** — if your default-branch coverage has gaps, the PR job can create the missing baseline itself before scanning:
274
+ > **Optional exact-baseline backfill** — if the wider ancestor fallback is not acceptable, the PR job can create the missing exact baseline before scanning:
277
275
  >
278
276
  > ```shell
279
277
  > BASE_SHA=$(git merge-base origin/main HEAD)
@@ -285,7 +283,7 @@ If you don't want to provide the Socket API Token every time then you can use th
285
283
  > socketcli --pr-number 123 --base-commit-sha "$BASE_SHA"
286
284
  > ```
287
285
  >
288
- > Run the baseline step with `--disable-blocking` (findings on the default branch must not fail the PR job) and an explicit `--branch`, since branch auto-detection is unreliable at a detached HEAD.
286
+ > Run the baseline step with `--disable-blocking` (findings on the default branch must not fail the PR job) and an explicit `--branch`, since branch auto-detection is unreliable at a detached HEAD. Without this step, the CLI automatically uses the nearest scanned ancestor.
289
287
  >
290
288
  > Buildkite users with dynamically generated pipelines: see [Merge-base baselines in Buildkite](ci-cd.md#merge-base-baselines-in-buildkite-dynamic-pipelines) for generation-time vs. step-time guidance.
291
289
 
@@ -338,7 +336,7 @@ If you don't want to provide the Socket API Token every time then you can use th
338
336
  | Parameter | Required | Default | Description |
339
337
  |:---------------------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------------------------------|
340
338
  | `--reach` | False | False | Enable reachability analysis to identify which vulnerable functions are actually called by your code. Creates a full application reachability scan (`scan_type=socket_tier1`). |
341
- | `--reach-version` | False | 15.10.40 | Version of @coana-tech/cli to use. Defaults to the pinned version that ships with this CLI release, so the engine only changes when you upgrade the Socket CLI. Pass `latest` to always use the newest published version (opt-in auto-update), or an explicit version (e.g. `1.2.3`) to pin it. |
339
+ | `--reach-version` | False | 15.10.41 | Version of @coana-tech/cli to use. Defaults to the pinned version that ships with this CLI release, so the engine only changes when you upgrade the Socket CLI. Pass `latest` to always use the newest published version (opt-in auto-update), or an explicit version (e.g. `1.2.3`) to pin it. |
342
340
  | `--reach-analysis-timeout` | False | 10m | Timeout for each reachability analysis run, e.g. `90s`, `10m` or `1h`. Omitted by default, so coana applies its own default (`10m`). Alias: `--reach-timeout` |
343
341
  | `--reach-analysis-memory-limit` | False | 8GB | Memory limit for each reachability analysis run, e.g. `512MB` or `8GB`. Omitted by default, so coana applies its own default (`8GB`). Alias: `--reach-memory-limit` |
344
342
  | `--reach-concurrency` | False | 1 | Control parallel analysis execution (must be >= 1). Omitted by default, so coana applies its own default. |
@@ -431,7 +429,8 @@ The launcher can be tuned via the `SOCKET_CLI_COANA_LAUNCHER` environment variab
431
429
  |:-------------------------|:---------|:--------|:----------------------------------------------------------------------|
432
430
  | `--ignore-commit-files` | False | False | Ignore commit files |
433
431
  | `--disable-blocking` | False | False | Non-blocking CI mode: the CLI always exits **0**, even when blocking alerts are present (including with `--strict-blocking`). Also exits 0 on uncaught runtime errors and Socket API failures, so the job is treated as successful while findings and errors are still logged. Takes precedence over `--strict-blocking`. |
434
- | `--disable-ignore` | False | False | Disable support for `@SocketSecurity ignore` commands in PR comments. When set, alerts cannot be suppressed via comments and ignore instructions are hidden from comment output. |
432
+ | `--disable-ignore` | False | False | Disable support for `@SocketSecurity ignore` commands in PR comments. When set, alerts cannot be suppressed via comments and ignore instructions are hidden from comment output. See [Who can ignore an alert](#who-can-ignore-an-alert). |
433
+ | `--ignore-authorization` | False | enforce | Who may suppress alerts with `@SocketSecurity ignore`. `enforce` requires write access and honors the command with a warning when the provider cannot report it; `strict` rejects it in that case; `off` honors any commenter. See [Who can ignore an alert](#who-can-ignore-an-alert). |
435
434
  | `--strict-blocking` | False | False | Fail on ANY security policy violations (blocking severity), not just new ones. Only works in diff mode. See [Strict Blocking Mode](#strict-blocking-mode) for details. |
436
435
  | `--enable-diff` | False | False | Enable diff mode even when using `--integration api` (forces diff mode without SCM integration) |
437
436
  | `--scm` | False | api | Source control management type |
@@ -690,6 +689,37 @@ The CLI uses intelligent default branch detection with the following priority:
690
689
 
691
690
  Both `--default-branch` and `--pending-head` parameters are automatically synchronized to ensure consistent behavior.
692
691
 
692
+ ## Who can ignore an alert
693
+
694
+ `@SocketSecurity ignore <ecosystem>/<package>@<version>` and
695
+ `@SocketSecurity ignore-all` suppress security findings, so the CLI honors them
696
+ only from a commenter with write access to the repository. A command from anyone
697
+ else is skipped, logged with the author's name, and the alerts it named stay
698
+ reported. `--disable-ignore` turns the feature off entirely.
699
+
700
+ | Provider | How access is determined | If it cannot be determined |
701
+ |:---------|:-------------------------|:---------------------------|
702
+ | GitHub | Effective repository permission, read once per commenter per run. Write, maintain, or admin access is honored. | The command is honored and a warning is logged. |
703
+ | GitLab | Project membership, read once per run when an ignore command is present. Developer (30) or above is honored. | The command is honored and a warning is logged. |
704
+
705
+ The GitHub check needs a token that can read repository metadata. GitLab notes
706
+ carry no permission field, so that check needs a `GITLAB_TOKEN` that can read
707
+ `GET /projects/:id/members/all`. A `CI_JOB_TOKEN` generally cannot.
708
+
709
+ `--ignore-authorization` decides what happens when access cannot be determined:
710
+
711
+ | Value | Verified write access | Access cannot be determined |
712
+ |:------|:----------------------|:----------------------------|
713
+ | `enforce` (default) | Honored | Honored, with a warning naming the author |
714
+ | `strict` | Honored | Rejected |
715
+ | `off` | Honored | Honored, no check performed |
716
+
717
+ `enforce` closes the hole wherever the provider can answer, without breaking a
718
+ pipeline whose token cannot read membership. `strict` closes it everywhere, at the
719
+ cost of failing those pipelines. `off` restores the prior behavior and should be
720
+ paired with `--disable-ignore` unless you specifically need comment-driven ignores
721
+ from unverified authors.
722
+
693
723
  ## GitLab Token Configuration
694
724
 
695
725
  GitLab token/auth behavior and CI examples are documented in [`ci-cd.md`](ci-cd.md).
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
 
7
7
  [project]
8
8
  name = "socketsecurity"
9
- version = "2.8.1"
9
+ version = "2.9.0"
10
10
  requires-python = ">= 3.11"
11
11
  license = {"file" = "LICENSE"}
12
12
  dependencies = [
@@ -1,3 +1,3 @@
1
1
  __author__ = 'socket.dev'
2
- __version__ = '2.8.1'
2
+ __version__ = '2.9.0'
3
3
  USER_AGENT = f'SocketPythonCLI/{__version__}'