socketsecurity 2.12.2__tar.gz → 2.13.1__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 (190) hide show
  1. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/CHANGELOG.md +59 -0
  2. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/PKG-INFO +43 -16
  3. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/README.md +38 -11
  4. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/docs/ci-cd.md +48 -1
  5. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/docs/cli-reference.md +47 -8
  6. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/docs/development.md +6 -0
  7. socketsecurity-2.13.1/docs/troubleshooting.md +306 -0
  8. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/pyproject.toml +5 -5
  9. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/pytest.ini +1 -1
  10. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/__init__.py +1 -1
  11. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/config.py +95 -54
  12. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/__init__.py +153 -42
  13. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/alert_selection.py +14 -2
  14. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/classes.py +39 -1
  15. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/messages.py +240 -103
  16. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/scm/github.py +3 -4
  17. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/scm/gitlab.py +2 -2
  18. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/scm_comments.py +8 -3
  19. socketsecurity-2.13.1/socketsecurity/exit_codes.py +42 -0
  20. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/socketcli.py +63 -74
  21. socketsecurity-2.13.1/tests/core/test_alert_consolidation.py +214 -0
  22. socketsecurity-2.13.1/tests/core/test_cli_exit_contract.py +288 -0
  23. socketsecurity-2.13.1/tests/core/test_existing_alerts.py +380 -0
  24. socketsecurity-2.13.1/tests/core/test_exit_codes.py +175 -0
  25. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/core/test_sdk_methods.py +23 -41
  26. socketsecurity-2.13.1/tests/core/test_strict_blocking_duplicates.py +213 -0
  27. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_config.py +5 -5
  28. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_disable_ignore.py +75 -0
  29. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_exclude_paths.py +3 -3
  30. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_gitlab_auth.py +4 -3
  31. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_socketcli.py +3 -3
  32. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/uv.lock +54 -54
  33. socketsecurity-2.12.2/docs/troubleshooting.md +0 -116
  34. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.dockerignore +0 -0
  35. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/CODEOWNERS +0 -0
  36. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
  37. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
  38. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
  39. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  40. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/actions/setup-docker/action.yml +0 -0
  41. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/actions/setup-hatch/action.yml +0 -0
  42. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/actions/setup-sfw/action.yml +0 -0
  43. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/dependabot.yml +0 -0
  44. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/workflows/dependency-audit.yml +0 -0
  45. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/workflows/dependency-review.yml +0 -0
  46. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/workflows/docker-stable.yml +0 -0
  47. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/workflows/e2e-image.yml +0 -0
  48. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/workflows/e2e-test.yml +0 -0
  49. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/workflows/package-check.yml +0 -0
  50. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/workflows/pr-preview.yml +0 -0
  51. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/workflows/python-tests.yml +0 -0
  52. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/workflows/release.yml +0 -0
  53. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/workflows/version-check.yml +0 -0
  54. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.github/zizmor.yml +0 -0
  55. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.gitignore +0 -0
  56. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.hooks/sync_version.py +0 -0
  57. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.pre-commit-config.yaml +0 -0
  58. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/.python-version +0 -0
  59. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/CONTRIBUTING.md +0 -0
  60. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/Dockerfile +0 -0
  61. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/Dockerfile.preview +0 -0
  62. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/LICENSE +0 -0
  63. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/Makefile +0 -0
  64. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/benchmarks/manifest_discovery.py +0 -0
  65. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/examples/config/sarif-dashboard-parity.json +0 -0
  66. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/examples/config/sarif-dashboard-parity.toml +0 -0
  67. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/examples/config/sarif-diff-ci-cd.json +0 -0
  68. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/examples/config/sarif-diff-ci-cd.toml +0 -0
  69. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/examples/config/sarif-instance-detail.json +0 -0
  70. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/examples/config/sarif-instance-detail.toml +0 -0
  71. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/instructions/gitlab-commit-status/uat.md +0 -0
  72. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/scripts/build_container.sh +0 -0
  73. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/scripts/build_container_flexible.sh +0 -0
  74. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/scripts/deploy-test-docker.sh +0 -0
  75. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/scripts/deploy-test-pypi.sh +0 -0
  76. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/scripts/docker-entrypoint.sh +0 -0
  77. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/scripts/run.sh +0 -0
  78. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/session.md +0 -0
  79. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socket.yml +0 -0
  80. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/cli_client.py +0 -0
  81. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/cli_run.py +0 -0
  82. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/exceptions.py +0 -0
  83. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/git_interface.py +0 -0
  84. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/git_remote.py +0 -0
  85. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/helper/__init__.py +0 -0
  86. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/helper/socket_facts_loader.py +0 -0
  87. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/lazy_file_loader.py +0 -0
  88. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/log_uploader.py +0 -0
  89. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/logging.py +0 -0
  90. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/pull_request.py +0 -0
  91. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/resource_utils.py +0 -0
  92. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/scm/__init__.py +0 -0
  93. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/scm/base.py +0 -0
  94. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/scm/client.py +0 -0
  95. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/socket_config.py +0 -0
  96. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/streaming.py +0 -0
  97. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/tools/coana-cache.mjs +0 -0
  98. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/tools/reachability.py +0 -0
  99. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/core/utils.py +0 -0
  100. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/fossa_compat.py +0 -0
  101. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/output.py +0 -0
  102. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/plugins/__init__.py +0 -0
  103. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/plugins/base.py +0 -0
  104. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/plugins/formatters/__init__.py +0 -0
  105. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/plugins/formatters/slack.py +0 -0
  106. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/plugins/jira.py +0 -0
  107. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/plugins/manager.py +0 -0
  108. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/plugins/slack.py +0 -0
  109. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/plugins/teams.py +0 -0
  110. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/socketsecurity/plugins/webhook.py +0 -0
  111. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/__init__.py +0 -0
  112. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/core/conftest.py +0 -0
  113. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/core/create_diff_input.json +0 -0
  114. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/core/test_diff_alerts.py +0 -0
  115. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/core/test_diff_generation.py +0 -0
  116. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/core/test_diff_scan_polling.py +0 -0
  117. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/core/test_facts_compression.py +0 -0
  118. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/core/test_full_scan_outputs.py +0 -0
  119. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/core/test_has_manifest_files.py +0 -0
  120. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/core/test_invalid_facts_marker.py +0 -0
  121. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/core/test_package_and_alerts.py +0 -0
  122. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/core/test_supporting_methods.py +0 -0
  123. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/data/fullscans/create_response.json +0 -0
  124. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/data/fullscans/diff/stream_diff.json +0 -0
  125. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
  126. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/data/fullscans/head_scan/metadata.json +0 -0
  127. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
  128. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
  129. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/data/fullscans/new_scan/metadata.json +0 -0
  130. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
  131. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/data/repos/repo_info_error.json +0 -0
  132. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/data/repos/repo_info_no_head.json +0 -0
  133. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/data/repos/repo_info_success.json +0 -0
  134. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/data/settings/security-policy.json +0 -0
  135. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/fixtures/simple-cargo/Cargo.lock +0 -0
  136. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/fixtures/simple-cargo/Cargo.toml +0 -0
  137. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/fixtures/simple-cargo/src/main.rs +0 -0
  138. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/fixtures/simple-npm/index.js +0 -0
  139. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/fixtures/simple-npm/package.json +0 -0
  140. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/fixtures/simple-pypi/requirements.txt +0 -0
  141. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/reach_facts.py +0 -0
  142. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/run-with-retries.sh +0 -0
  143. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/validate-gitlab.sh +0 -0
  144. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/validate-json.sh +0 -0
  145. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/validate-reachability.sh +0 -0
  146. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/validate-sarif.sh +0 -0
  147. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/e2e/validate-scan.sh +0 -0
  148. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/fixtures/fossa/README.md +0 -0
  149. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/fixtures/fossa/fossa-analyze-empty.json +0 -0
  150. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/fixtures/fossa/fossa-analyze-populated.json +0 -0
  151. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/fixtures/fossa/fossa-sbom-empty-deep.json +0 -0
  152. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/fixtures/fossa/fossa-sbom-populated.json +0 -0
  153. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/__init__.py +0 -0
  154. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_alert_selection.py +0 -0
  155. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_cli_config.py +0 -0
  156. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_cli_run.py +0 -0
  157. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_client.py +0 -0
  158. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_commit_message_truncation.py +0 -0
  159. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_dependency_overview.py +0 -0
  160. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_dockerfile.py +0 -0
  161. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_fossa_compat.py +0 -0
  162. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_fossa_parity.py +0 -0
  163. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_full_scan_retry.py +0 -0
  164. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_git_interface.py +0 -0
  165. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_git_remote.py +0 -0
  166. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_github_buildkite_config.py +0 -0
  167. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_gitlab_auth_fallback.py +0 -0
  168. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_gitlab_commit_status.py +0 -0
  169. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_gitlab_format.py +0 -0
  170. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_ignore_authorization.py +0 -0
  171. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_ignore_telemetry_filtering.py +0 -0
  172. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_include_dirs.py +0 -0
  173. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_log_uploader.py +0 -0
  174. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_manifest_discovery.py +0 -0
  175. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_messages.py +0 -0
  176. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_output.py +0 -0
  177. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_pr_comment_rendering.py +0 -0
  178. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_pull_request_context.py +0 -0
  179. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_reachability.py +0 -0
  180. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_scan_scope.py +0 -0
  181. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_slack_plugin.py +0 -0
  182. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_slack_severity_normalization.py +0 -0
  183. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_streaming.py +0 -0
  184. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_summary_text.py +0 -0
  185. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_tier1_finalize.py +0 -0
  186. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/tests/unit/test_user_agent.py +0 -0
  187. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/workflows/bitbucket-pipelines.yml +0 -0
  188. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/workflows/buildkite.yml +0 -0
  189. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/workflows/github-actions.yml +0 -0
  190. {socketsecurity-2.12.2 → socketsecurity-2.13.1}/workflows/gitlab-ci.yml +0 -0
@@ -1,5 +1,64 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.13.1
4
+
5
+ ### Documentation
6
+
7
+ - New [API token permissions](docs/troubleshooting.md#api-token-permissions) guide:
8
+ the scopes `socketcli` needs, what happens without each one, and the API calls
9
+ behind them.
10
+ - Add `diff-scans:create` and `diff-scans:list` to CI tokens. Without them, scan
11
+ comparisons fall back to a less resilient path with only a warning.
12
+ - Documented how the baseline scan for a comparison is chosen.
13
+ - Listed all four accepted token environment variables in priority order.
14
+
15
+ ### Changed: bump the Socket Python SDK to 3.6.3
16
+
17
+ - Bumped the pinned Socket Python SDK (`socketdev`) from `3.6.2` to `3.6.3`.
18
+ The release fixes `settings.integration_events()`, which the CLI does not
19
+ call, so CLI behavior is unchanged.
20
+
21
+ ## 2.13.0
22
+
23
+ ### Upgrade notes
24
+
25
+ Exit codes change in this release. Check any CI step that matches on a specific
26
+ code; see [Exit codes](README.md#exit-codes).
27
+
28
+ - Invalid flags exit `2` instead of `1`. `--disable-blocking` doesn't apply to
29
+ them.
30
+ - Ctrl+C exits `130` instead of `2`.
31
+ - Missing tokens and other setup failures now honor `--disable-blocking` and
32
+ `--exit-code-on-api-error`.
33
+ - `--strict-blocking` now fails on existing blocking alerts.
34
+ - Config-file booleans, integers and choices are validated before scan setup.
35
+
36
+ ### Added
37
+
38
+ - Under `--strict-blocking`, PR/MR comments list existing alerts in their own
39
+ table.
40
+
41
+ ### Changed
42
+
43
+ - Incomplete scan comparisons or existing-alert results fail the run with the
44
+ infrastructure-error code.
45
+ - GitLab security report IDs include the ecosystem, full package coordinate and
46
+ advisory ID, so existing findings get new IDs once.
47
+
48
+ ### Fixed
49
+
50
+ - `--strict-blocking`, the GitLab security report and FOSSA output include
51
+ alerts on unchanged packages.
52
+ - `--strict-blocking` no longer lists findings on added packages twice.
53
+ - Every CVE on a package is reported, not one per severity.
54
+ - GitLab reports keep findings from different ecosystems and namespaces separate.
55
+ - PR/MR comments group existing license violations and retain warnings about
56
+ omitted findings after individual ignores.
57
+ - Invalid file lists and unreadable config files exit with the usage-error code.
58
+ - Exit-code flags retain their startup values if the config file changes during a run.
59
+ - A token without `repo:list` is reported as a missing scope, not a missing
60
+ repository. Only a missing repository triggers a create request.
61
+
3
62
  ## 2.12.2
4
63
 
5
64
  ### Changed: bump pinned Coana CLI to 15.15.2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: socketsecurity
3
- Version: 2.12.2
3
+ Version: 2.13.1
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>
@@ -44,15 +44,15 @@ Requires-Dist: packaging==26.3
44
44
  Requires-Dist: prettytable==3.18.0
45
45
  Requires-Dist: python-dotenv==1.2.4
46
46
  Requires-Dist: requests==2.34.2
47
- Requires-Dist: socketdev==3.6.2
47
+ Requires-Dist: socketdev==3.6.3
48
48
  Provides-Extra: dev
49
49
  Requires-Dist: hatch==1.18.2; extra == 'dev'
50
50
  Requires-Dist: pre-commit==4.7.0; extra == 'dev'
51
- Requires-Dist: ruff==0.17.4; extra == 'dev'
51
+ Requires-Dist: ruff==0.17.5; extra == 'dev'
52
52
  Requires-Dist: twine==7.0.0; extra == 'dev'
53
- Requires-Dist: uv==0.13.7; extra == 'dev'
53
+ Requires-Dist: uv==0.13.8; extra == 'dev'
54
54
  Provides-Extra: test
55
- Requires-Dist: pytest-asyncio==1.4.1.post1; extra == 'test'
55
+ Requires-Dist: pytest-asyncio==1.5.0; extra == 'test'
56
56
  Requires-Dist: pytest-cov==7.1.0; extra == 'test'
57
57
  Requires-Dist: pytest-mock==3.17.0; extra == 'test'
58
58
  Requires-Dist: pytest-watch==4.2.0; extra == 'test'
@@ -79,6 +79,10 @@ pip install socketsecurity
79
79
  export SOCKET_SECURITY_API_TOKEN="<token>"
80
80
  ```
81
81
 
82
+ The token needs more than scan-creation access. Most missing scopes fail the run, and
83
+ a token without the `diff-scans` scopes falls back with only a warning. See
84
+ [`docs/troubleshooting.md#api-token-permissions`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/troubleshooting.md#api-token-permissions).
85
+
82
86
  ### 3) Run a basic scan
83
87
 
84
88
  ```bash
@@ -278,12 +282,13 @@ Minimal pattern:
278
282
 
279
283
  ## Exit codes
280
284
 
281
- | Code | Meaning |
282
- |------|---------|
283
- | `0` | Clean scan — no blocking issues (or `--disable-blocking` set) |
284
- | `1` | Blocking security finding(s) detected |
285
- | `2` | Scan interrupted (SIGINT / Ctrl+C) |
286
- | `3` | Infrastructure or API error (timeout, network failure, unexpected error) |
285
+ | Code | Meaning |
286
+ |-------|---------|
287
+ | `0` | Successful report, skipped SCM event, or `--disable-blocking` set; findings gate only evaluated diffs |
288
+ | `1` | Blocking security finding(s) detected |
289
+ | `2` | Invalid flags or configuration (usage error), including argparse's own errors |
290
+ | `3` | Infrastructure or API error: missing API or SCM token, permission or plan problem, timeout, network failure, incomplete scan comparison, unexpected error |
291
+ | `130` | Scan interrupted (SIGINT / Ctrl+C) |
287
292
 
288
293
  `--exit-code-on-api-error <N>` remaps the infrastructure-error code (`3`) to any
289
294
  value — e.g. a Buildkite
@@ -300,12 +305,12 @@ error, so the supervisor's exit status (commonly 124 or 137) takes precedence.
300
305
  The two flags that affect exit codes can cancel each other out, so the order of
301
306
  precedence matters:
302
307
 
303
- - **`--disable-blocking` wins over everything.** It forces exit `0` for *all*
304
- outcomes — security findings *and* infrastructure errors. If you set it,
305
- `--exit-code-on-api-error` has no effect (you'll always get `0`).
308
+ - **`--disable-blocking` forces exit `0` for findings, infrastructure errors and
309
+ interrupts.** It takes precedence over `--exit-code-on-api-error` and
310
+ `--strict-blocking`. Usage errors still exit `2`.
306
311
  - **`--exit-code-on-api-error` only applies when `--disable-blocking` is *not*
307
- set.** It changes the infra-error code (and the generic-error code); it never
308
- touches the security-finding code (`1`).
312
+ set.** It changes the infrastructure-error code, including unexpected runtime
313
+ failures. Findings (`1`), usage errors (`2`) and Ctrl+C (`130`) keep their codes.
309
314
 
310
315
  So for the common "don't let Socket outages block my pipeline, but still fail on
311
316
  real findings" goal, use `--exit-code-on-api-error` **without** `--disable-blocking`:
@@ -324,6 +329,28 @@ scan exit `0` on *both* findings and outages — the `soft_fail: 100` rule would
324
329
  never match, and real findings would stop blocking. That's usually not what you
325
330
  want.
326
331
 
332
+ ### Upgrading to 2.13.0
333
+
334
+ Update pipeline rules and wrapper scripts that match specific exit codes:
335
+
336
+ | Outcome | Before 2.13.0 | From 2.13.0 |
337
+ |---------|---------------|-------------|
338
+ | Invalid flags or configuration | CLI validation: `1`; argparse: `2` | `2` for both; never suppressed by `--disable-blocking` |
339
+ | Ctrl+C | `2` | `130`, or `0` with `--disable-blocking` |
340
+ | Missing token or other setup failure | Fixed `2` or `3`, depending on the failure | Infrastructure-error code (`3` by default); both exit-code flags now apply |
341
+
342
+ Blocking findings still exit `1`. With `--strict-blocking`, existing blocking
343
+ alerts can now fail jobs that previously passed. GitLab report findings also get
344
+ new IDs once; see the [release notes](CHANGELOG.md#2130).
345
+
346
+ Configuration is validated before credentials or network setup. Use native
347
+ JSON/TOML booleans such as `false`, a positive integer `timeout`, and an array of
348
+ file paths for `files`. Invalid or unreadable configuration exits `2` even when
349
+ credentials are missing or blocking is disabled.
350
+
351
+ For a compact comparison of failure-handling policies, see
352
+ [Exit codes in CI](docs/ci-cd.md#exit-codes-in-ci).
353
+
327
354
  ## Common gotchas
328
355
 
329
356
  See [`docs/troubleshooting.md`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/troubleshooting.md#common-gotchas).
@@ -18,6 +18,10 @@ pip install socketsecurity
18
18
  export SOCKET_SECURITY_API_TOKEN="<token>"
19
19
  ```
20
20
 
21
+ The token needs more than scan-creation access. Most missing scopes fail the run, and
22
+ a token without the `diff-scans` scopes falls back with only a warning. See
23
+ [`docs/troubleshooting.md#api-token-permissions`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/troubleshooting.md#api-token-permissions).
24
+
21
25
  ### 3) Run a basic scan
22
26
 
23
27
  ```bash
@@ -217,12 +221,13 @@ Minimal pattern:
217
221
 
218
222
  ## Exit codes
219
223
 
220
- | Code | Meaning |
221
- |------|---------|
222
- | `0` | Clean scan — no blocking issues (or `--disable-blocking` set) |
223
- | `1` | Blocking security finding(s) detected |
224
- | `2` | Scan interrupted (SIGINT / Ctrl+C) |
225
- | `3` | Infrastructure or API error (timeout, network failure, unexpected error) |
224
+ | Code | Meaning |
225
+ |-------|---------|
226
+ | `0` | Successful report, skipped SCM event, or `--disable-blocking` set; findings gate only evaluated diffs |
227
+ | `1` | Blocking security finding(s) detected |
228
+ | `2` | Invalid flags or configuration (usage error), including argparse's own errors |
229
+ | `3` | Infrastructure or API error: missing API or SCM token, permission or plan problem, timeout, network failure, incomplete scan comparison, unexpected error |
230
+ | `130` | Scan interrupted (SIGINT / Ctrl+C) |
226
231
 
227
232
  `--exit-code-on-api-error <N>` remaps the infrastructure-error code (`3`) to any
228
233
  value — e.g. a Buildkite
@@ -239,12 +244,12 @@ error, so the supervisor's exit status (commonly 124 or 137) takes precedence.
239
244
  The two flags that affect exit codes can cancel each other out, so the order of
240
245
  precedence matters:
241
246
 
242
- - **`--disable-blocking` wins over everything.** It forces exit `0` for *all*
243
- outcomes — security findings *and* infrastructure errors. If you set it,
244
- `--exit-code-on-api-error` has no effect (you'll always get `0`).
247
+ - **`--disable-blocking` forces exit `0` for findings, infrastructure errors and
248
+ interrupts.** It takes precedence over `--exit-code-on-api-error` and
249
+ `--strict-blocking`. Usage errors still exit `2`.
245
250
  - **`--exit-code-on-api-error` only applies when `--disable-blocking` is *not*
246
- set.** It changes the infra-error code (and the generic-error code); it never
247
- touches the security-finding code (`1`).
251
+ set.** It changes the infrastructure-error code, including unexpected runtime
252
+ failures. Findings (`1`), usage errors (`2`) and Ctrl+C (`130`) keep their codes.
248
253
 
249
254
  So for the common "don't let Socket outages block my pipeline, but still fail on
250
255
  real findings" goal, use `--exit-code-on-api-error` **without** `--disable-blocking`:
@@ -263,6 +268,28 @@ scan exit `0` on *both* findings and outages — the `soft_fail: 100` rule would
263
268
  never match, and real findings would stop blocking. That's usually not what you
264
269
  want.
265
270
 
271
+ ### Upgrading to 2.13.0
272
+
273
+ Update pipeline rules and wrapper scripts that match specific exit codes:
274
+
275
+ | Outcome | Before 2.13.0 | From 2.13.0 |
276
+ |---------|---------------|-------------|
277
+ | Invalid flags or configuration | CLI validation: `1`; argparse: `2` | `2` for both; never suppressed by `--disable-blocking` |
278
+ | Ctrl+C | `2` | `130`, or `0` with `--disable-blocking` |
279
+ | Missing token or other setup failure | Fixed `2` or `3`, depending on the failure | Infrastructure-error code (`3` by default); both exit-code flags now apply |
280
+
281
+ Blocking findings still exit `1`. With `--strict-blocking`, existing blocking
282
+ alerts can now fail jobs that previously passed. GitLab report findings also get
283
+ new IDs once; see the [release notes](CHANGELOG.md#2130).
284
+
285
+ Configuration is validated before credentials or network setup. Use native
286
+ JSON/TOML booleans such as `false`, a positive integer `timeout`, and an array of
287
+ file paths for `files`. Invalid or unreadable configuration exits `2` even when
288
+ credentials are missing or blocking is disabled.
289
+
290
+ For a compact comparison of failure-handling policies, see
291
+ [Exit codes in CI](docs/ci-cd.md#exit-codes-in-ci).
292
+
266
293
  ## Common gotchas
267
294
 
268
295
  See [`docs/troubleshooting.md`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/troubleshooting.md#common-gotchas).
@@ -52,6 +52,44 @@ steps:
52
52
  - "results.sarif"
53
53
  ```
54
54
 
55
+ ## Exit codes in CI
56
+
57
+ Choose which outcomes may leave your scan step green. The values below are the
58
+ CLI's exit status; CI cancellation and external timeouts can have their own status.
59
+
60
+ | Outcome | Default | `--exit-code-on-api-error 100` | `--disable-blocking` |
61
+ |---------|---------|--------------------------------|----------------------|
62
+ | No blocking findings | `0` | `0` | `0` |
63
+ | Blocking findings | `1` | `1` | `0` |
64
+ | Invalid flags or configuration | `2` | `2` | `2` |
65
+ | Setup, API or runtime failure | `3` | `100` | `0` |
66
+ | Ctrl+C handled by the CLI | `130` | `130` | `0` |
67
+
68
+ Use a custom infrastructure code with your CI provider's exit-code allowlist; the
69
+ [Buildkite example](../README.md#how-these-options-interact) shows this pattern.
70
+ For providers without that feature, remap infrastructure errors to `0`:
71
+
72
+ ```bash
73
+ # Keep findings blocking; allow setup/API failures to pass.
74
+ socketcli --config .socketcli.toml --exit-code-on-api-error 0
75
+
76
+ # Report-only mode: findings, infrastructure failures and Ctrl+C exit 0.
77
+ # Invalid flags/configuration still exit 2.
78
+ socketcli --config .socketcli.toml --disable-blocking
79
+ ```
80
+
81
+ Combining the flags gives `--disable-blocking` precedence. Avoid blanket shell
82
+ `|| true` or job-wide `continue-on-error` when only API failures should be allowed:
83
+ they also hide findings and usage errors. Even with exit `0`, a setup/API failure
84
+ does not mean a clean scan; check the logs for a completed report.
85
+
86
+ Findings block only when a [diff comparison runs](#scan-type-by-pipeline).
87
+ SCM event filters can also skip unsupported events with exit `0`; confirm a report
88
+ was created when validating a new workflow.
89
+ `--strict-blocking` also checks existing blocking alerts; an incomplete comparison
90
+ or incomplete existing-alert data is an infrastructure failure. See the
91
+ [2.13.0 migration table](../README.md#upgrading-to-2130) when updating existing CI rules.
92
+
55
93
  ## Config file usage in CI
56
94
 
57
95
  Use `--config .socketcli.toml` or `--config .socketcli.json` to keep pipeline commands small.
@@ -465,7 +503,7 @@ With `--scm github` or `--scm gitlab`, the detected event decides the scan type:
465
503
 
466
504
  | Event | Scan | Blocks the build |
467
505
  |:------|:-----|:-----------------|
468
- | Pull request / merge request | Diff scan against the repository's baseline | Yes, on newly introduced alerts |
506
+ | Pull request / merge request | Diff scan against the repository's baseline | Yes, on new blocking alerts; also existing blockers with `--strict-blocking` |
469
507
  | Any other pipeline, including default-branch pushes | Full scan | No |
470
508
 
471
509
  A full scan has no baseline, so it cannot tell a newly introduced alert from one
@@ -623,3 +661,12 @@ Prebuilt examples in this repo:
623
661
  the console table, including native Buildkite job logs, and in GitHub/GitLab
624
662
  security comments when that SCM adapter is configured. Findings without a known
625
663
  patched release leave the console cell blank and omit the comment field.
664
+ - A token missing the `diff-scans:create` and `diff-scans:list` scopes does not fail
665
+ the build. It logs
666
+ `Diff scan comparison failed with APIAccessDenied(Insufficient permissions)` and falls
667
+ back to a less resilient comparison path. This affects every run that compares
668
+ scans: PR/MR events, and runs without an SCM integration. An SCM-integrated branch
669
+ push creates a full scan and never compares. Tokens created from the nine-scope
670
+ list in the CI/CD token setup guide lack both scopes; see
671
+ [`troubleshooting.md#api-token-permissions`](troubleshooting.md#api-token-permissions)
672
+ for the full scope list and what each missing scope does.
@@ -232,6 +232,22 @@ If you don't want to provide the Socket API Token every time then you can use th
232
232
  |:------------|:---------|:--------|:----------------------------------------------------------------------------------|
233
233
  | `--api-token` | False | | Socket Security API token (can also be set via SOCKET_SECURITY_API_TOKEN env var) |
234
234
 
235
+ The token is read from the first of these that is set, then from `--api-token`:
236
+
237
+ 1. `SOCKET_SECURITY_API_KEY`
238
+ 2. `SOCKET_SECURITY_API_TOKEN`
239
+ 3. `SOCKET_API_KEY`
240
+ 4. `SOCKET_API_TOKEN`
241
+
242
+ This repository's examples use `SOCKET_SECURITY_API_TOKEN`, and the CI/CD guides on
243
+ docs.socket.dev use `SOCKET_SECURITY_API_KEY`. Either works. If both are set,
244
+ `SOCKET_SECURITY_API_KEY` wins.
245
+
246
+ > **Token permissions:** the CLI needs more than scan-creation access. Most missing
247
+ > scopes fail the run, and a token without the `diff-scans` scopes falls back with only
248
+ > a warning. See [`troubleshooting.md#api-token-permissions`](troubleshooting.md#api-token-permissions)
249
+ > for the scopes to grant, the API calls a run makes, and which flags add to them.
250
+
235
251
  #### Repository
236
252
  | Parameter | Required | Default | Description |
237
253
  |:-----------------|:---------|:--------|:------------------------------------------------------------------------------------------------------------------|
@@ -358,7 +374,7 @@ If you don't want to provide the Socket API Token every time then you can use th
358
374
 
359
375
  **Reachability Analysis Requirements:**
360
376
 
361
- The Python CLI verifies the following **up front** (before invoking the analysis engine) and exits with code **3** if any are unmet:
377
+ The Python CLI verifies the following **up front** (before invoking the analysis engine). Missing requirements use the infrastructure-error code (`3` by default), subject to `--exit-code-on-api-error` and `--disable-blocking`:
362
378
  - `node` - Required to run the analysis engine (the Coana CLI). The engine needs Node.js 22.13 or later.
363
379
  - `uv` - Required by the analysis engine
364
380
  - An **Enterprise** Socket organization plan (any `enterprise*` plan, including Enterprise trials)
@@ -372,7 +388,7 @@ Separately, the analysis engine (coana) needs the **per-ecosystem build toolchai
372
388
  | Host | Used for | If blocked |
373
389
  |---|---|---|
374
390
  | `api.socket.dev` | Socket API calls, and a signed URL for the engine download | The CLI fails |
375
- | `storage.googleapis.com` | Downloading the engine and its analyzers (about 120 MB) | The CLI exits with code **3**: `Failed to run reachability analysis: HTTPSConnectionPool(host='storage.googleapis.com', ...)` |
391
+ | `storage.googleapis.com` | Downloading the engine and its analyzers (about 120 MB) | The CLI reports an infrastructure error (`3` by default, subject to the exit-code flags): `Failed to run reachability analysis: HTTPSConnectionPool(host='storage.googleapis.com', ...)` |
376
392
  | The package registry of each scanned ecosystem, for example `registry.npmjs.org` | Installing your project's dependencies for analysis | The scan still completes, but the affected vulnerabilities are reported as `INSTALL ERROR` with no reachability result |
377
393
 
378
394
  The engine comes from Socket, not npm, so an npm mirror or registry proxy does not cover the engine download. The registry row does not apply when your dependencies are already installed in the target path, for example a `node_modules` directory from an earlier `npm ci`. The engine is cached as described below; with a warm cache, `storage.googleapis.com` is not contacted.
@@ -389,6 +405,13 @@ Socket's reachability analysis comes in three forms, referred to by their full n
389
405
 
390
406
  ## Config file support
391
407
 
408
+ Values are validated after CLI overrides and before scan setup. Boolean options
409
+ use native JSON/TOML booleans; integer options use integers, with `timeout` greater
410
+ than zero. `files` accepts an array of nonempty file paths, or its JSON string
411
+ representation. Invalid values and unreadable config files exit `2`, including
412
+ with `--disable-blocking`. Runtime exit policy uses the configuration loaded at
413
+ startup; changing or removing the file during a run does not change its exit code.
414
+
392
415
  Use `--config <path>` to load defaults from a `.toml` or `.json` file.
393
416
  CLI arguments always take precedence over config file values.
394
417
 
@@ -430,6 +453,8 @@ Sample config files:
430
453
  ### CI/CD usage tips
431
454
 
432
455
  For CI-specific examples and guidance, see [`ci-cd.md`](ci-cd.md).
456
+ Exit statuses and flag precedence are listed in [Exit codes](../README.md#exit-codes),
457
+ with pipeline examples in [Exit codes in CI](ci-cd.md#exit-codes-in-ci).
433
458
 
434
459
  The CLI runs a pinned version of the Coana CLI, the analysis engine; it does **not** auto-update the engine. It downloads the engine from the Socket API on first use and keeps it in `$XDG_CACHE_HOME/socket/coana/v1` (`~/.cache/socket/coana/v1` when `XDG_CACHE_HOME` is unset). Pass `--reach-version latest` to opt into the newest published version. Use `--reach` to enable reachability analysis during a full scan, or add `--only-facts-file` (with `--reach`) to submit only the reachability facts file (`.socket.facts.json`) when creating the full scan.
435
460
 
@@ -437,13 +462,14 @@ The CLI runs a pinned version of the Coana CLI, the analysis engine; it does **n
437
462
  | Parameter | Required | Default | Description |
438
463
  |:-------------------------|:---------|:--------|:----------------------------------------------------------------------|
439
464
  | `--ignore-commit-files` | False | False | Compare regardless of which files changed, scanning every manifest |
440
- | `--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`. |
465
+ | `--exit-code-on-api-error` | False | 3 | Remap infrastructure failures, including missing tokens, setup failures, incomplete scan data and unexpected runtime errors. Findings (`1`), usage errors (`2`) and Ctrl+C (`130`) are unaffected. `--disable-blocking` takes precedence. |
466
+ | `--disable-blocking` | False | False | Non-blocking CI mode: the CLI exits **0** even when blocking alerts are present (including with `--strict-blocking`). Also exits 0 on infrastructure errors (missing API or SCM token, Socket API failures, uncaught runtime errors) and interrupts, so the job is treated as successful while findings and errors are still logged. Invalid flags still exit **2**. Takes precedence over `--strict-blocking`. |
441
467
  | `--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). |
442
468
  | `--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). |
443
469
  | `--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. |
444
470
  | `--enable-diff` | False | False | Enable diff mode even when using `--integration api` (forces diff mode without SCM integration) |
445
471
  | `--scm` | False | api | Source control management type |
446
- | `--timeout` | False | 1200 | Timeout in seconds for each API request. This is not a total CLI runtime limit and does not limit local discovery, Git, or reachability analysis. |
472
+ | `--timeout` | False | 1200 | Positive integer timeout in seconds for each API request. This is not a total CLI runtime limit and does not limit local discovery, Git, or reachability analysis. |
447
473
 
448
474
  #### Plugins
449
475
 
@@ -641,8 +667,10 @@ Security issues detected by Socket Security:
641
667
 
642
668
  ### Important Notes
643
669
 
644
- - **Diff Mode Only**: The flag only works in diff mode (with SCM integration). In API mode, a warning is logged.
670
+ - **Diff Mode Only**: The flag applies when a scan comparison runs, with or without SCM integration. A full scan logs a warning and does not evaluate existing violations; see [Scan type by pipeline](ci-cd.md#scan-type-by-pipeline).
645
671
  - **Error-Level Only**: Only fails on `error=True` alerts (blocking severity), not warnings.
672
+ - **Existing alerts come from the full scan**: The scan comparison doesn't carry alerts on unchanged packages, so the CLI reads them from the new full scan, at the cost of one more API request per run. If that request fails or omits an unchanged package, the run fails with the infrastructure-error code rather than passing without them.
673
+ - **PR/MR comments**: Existing alerts are listed in their own table after the new ones, blocking first, with license violations grouped per package. `@SocketSecurity ignore` applies to them too. Very large sets are cut off before the comment reaches GitHub's size limit, with a link to the full report. Ignoring every displayed alert preserves the warning about omitted findings; `ignore-all` also clears omitted findings.
646
674
  - **Priority**: `--disable-blocking` takes precedence - if both flags are set, the build will always pass.
647
675
  - **First Scan**: On the very first scan of a repository, there are no "existing" violations, so behavior is identical to standard mode.
648
676
 
@@ -881,9 +909,16 @@ The GitLab Security Dashboard report and the JSON/SARIF diff outputs use differe
881
909
 
882
910
  ### Alert Ignoring via PR/MR Comments
883
911
 
884
- When using the CLI with SCM integration (`--scm github` or `--scm gitlab`), users can ignore specific alerts by reacting to Socket's PR/MR comments. Ignored alerts are removed from `--enable-json`, `--enable-sarif`, and console output.
912
+ In SCM diff mode (`--scm github` or `--scm gitlab`), an authorized
913
+ `@SocketSecurity ignore <ecosystem>/<package>@<version>` or
914
+ `@SocketSecurity ignore-all` comment removes matching new alerts from the CLI's
915
+ reports, including the GitLab report. With `--strict-blocking`, it also removes
916
+ matching existing alerts from blocking checks and reports. Without strict blocking,
917
+ the GitLab report still includes existing findings.
885
918
 
886
- However, the GitLab Security Dashboard report includes **all** alerts matching your security policy (new and existing), regardless of comment-based ignores. This ensures the Security Dashboard always reflects the full set of known issues. To suppress a vulnerability from the GitLab report, adjust the alert's policy in Socket's dashboard rather than ignoring it via a PR comment.
919
+ `--disable-ignore` disables these commands. See [Who can ignore an alert](#who-can-ignore-an-alert)
920
+ for authorization rules. To suppress a finding across future PRs, update its policy
921
+ or triage state in Socket's dashboard.
887
922
 
888
923
  ### Report Schema
889
924
 
@@ -900,6 +935,10 @@ Socket CLI generates reports compliant with [GitLab Dependency Scanning schema v
900
935
 
901
936
  **Schema compatibility:** The v15.0.0 schema is supported across all GitLab versions 12.0+ (both self-hosted and cloud). The report includes the `dependency_files` field, which is required by v15.0.0 and accepted as an optional extra by newer schema versions, ensuring maximum compatibility across GitLab instances.
902
937
 
938
+ Finding IDs distinguish the ecosystem, full package coordinate and advisory, so
939
+ different namespaces or CVEs remain separate findings. Upgrading to 2.13.0 changes
940
+ existing finding IDs once; GitLab may show them as newly detected on the first report.
941
+
903
942
  ### Performance Notes
904
943
 
905
944
  When `--enable-gitlab-security` (or `--enable-json` / `--enable-sarif`) is used with a full scan (non-diff mode), the CLI fetches package and alert data from the scan results to populate the report. This adds time proportional to the number of packages in the scan. Without these output flags, no additional data is fetched and scan performance is unchanged.
@@ -907,7 +946,7 @@ When `--enable-gitlab-security` (or `--enable-json` / `--enable-sarif`) is used
907
946
  ### Requirements
908
947
 
909
948
  - **GitLab Version**: GitLab 12.0 or later (for Security Dashboard support)
910
- - **Socket API Token**: Set via `$SOCKET_API_TOKEN` environment variable or `--api-token` parameter
949
+ - **Socket API Token**: Set via `SOCKET_SECURITY_API_TOKEN` environment variable or `--api-token` parameter (see [Authentication](#authentication) for the other accepted variable names)
911
950
  - **CI/CD Artifacts**: Reports must be uploaded as `dependency_scanning` artifacts
912
951
 
913
952
  ### Troubleshooting
@@ -40,6 +40,12 @@ Run tests:
40
40
  make test
41
41
  ```
42
42
 
43
+ This runs both the unit and core suites. To focus on the CLI exit-code contract:
44
+
45
+ ```bash
46
+ uv run pytest tests/core/test_cli_exit_contract.py tests/core/test_exit_codes.py
47
+ ```
48
+
43
49
  Run lint/format checks:
44
50
 
45
51
  ```bash