socketsecurity 2.12.1__tar.gz → 2.13.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 (189) hide show
  1. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/CHANGELOG.md +50 -0
  2. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/PKG-INFO +35 -12
  3. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/README.md +34 -11
  4. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/docs/ci-cd.md +39 -1
  5. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/docs/cli-reference.md +31 -8
  6. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/docs/development.md +6 -0
  7. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/docs/troubleshooting.md +32 -0
  8. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/pyproject.toml +1 -1
  9. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/pytest.ini +1 -1
  10. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/__init__.py +1 -1
  11. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/config.py +95 -54
  12. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/__init__.py +153 -42
  13. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/alert_selection.py +14 -2
  14. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/classes.py +39 -1
  15. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/messages.py +240 -103
  16. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/scm/github.py +3 -4
  17. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/scm/gitlab.py +2 -2
  18. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/scm_comments.py +8 -3
  19. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/tools/reachability.py +1 -1
  20. socketsecurity-2.13.0/socketsecurity/exit_codes.py +42 -0
  21. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/socketcli.py +63 -74
  22. socketsecurity-2.13.0/tests/core/test_alert_consolidation.py +214 -0
  23. socketsecurity-2.13.0/tests/core/test_cli_exit_contract.py +288 -0
  24. socketsecurity-2.13.0/tests/core/test_existing_alerts.py +380 -0
  25. socketsecurity-2.13.0/tests/core/test_exit_codes.py +175 -0
  26. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/core/test_sdk_methods.py +23 -41
  27. socketsecurity-2.13.0/tests/core/test_strict_blocking_duplicates.py +213 -0
  28. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_config.py +5 -5
  29. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_disable_ignore.py +75 -0
  30. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_exclude_paths.py +3 -3
  31. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_gitlab_auth.py +4 -3
  32. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_socketcli.py +3 -3
  33. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/uv.lock +1 -1
  34. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.dockerignore +0 -0
  35. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/CODEOWNERS +0 -0
  36. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
  37. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
  38. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
  39. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  40. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/actions/setup-docker/action.yml +0 -0
  41. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/actions/setup-hatch/action.yml +0 -0
  42. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/actions/setup-sfw/action.yml +0 -0
  43. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/dependabot.yml +0 -0
  44. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/workflows/dependency-audit.yml +0 -0
  45. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/workflows/dependency-review.yml +0 -0
  46. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/workflows/docker-stable.yml +0 -0
  47. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/workflows/e2e-image.yml +0 -0
  48. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/workflows/e2e-test.yml +0 -0
  49. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/workflows/package-check.yml +0 -0
  50. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/workflows/pr-preview.yml +0 -0
  51. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/workflows/python-tests.yml +0 -0
  52. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/workflows/release.yml +0 -0
  53. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/workflows/version-check.yml +0 -0
  54. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.github/zizmor.yml +0 -0
  55. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.gitignore +0 -0
  56. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.hooks/sync_version.py +0 -0
  57. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.pre-commit-config.yaml +0 -0
  58. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/.python-version +0 -0
  59. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/CONTRIBUTING.md +0 -0
  60. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/Dockerfile +0 -0
  61. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/Dockerfile.preview +0 -0
  62. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/LICENSE +0 -0
  63. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/Makefile +0 -0
  64. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/benchmarks/manifest_discovery.py +0 -0
  65. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/examples/config/sarif-dashboard-parity.json +0 -0
  66. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/examples/config/sarif-dashboard-parity.toml +0 -0
  67. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/examples/config/sarif-diff-ci-cd.json +0 -0
  68. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/examples/config/sarif-diff-ci-cd.toml +0 -0
  69. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/examples/config/sarif-instance-detail.json +0 -0
  70. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/examples/config/sarif-instance-detail.toml +0 -0
  71. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/instructions/gitlab-commit-status/uat.md +0 -0
  72. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/scripts/build_container.sh +0 -0
  73. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/scripts/build_container_flexible.sh +0 -0
  74. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/scripts/deploy-test-docker.sh +0 -0
  75. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/scripts/deploy-test-pypi.sh +0 -0
  76. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/scripts/docker-entrypoint.sh +0 -0
  77. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/scripts/run.sh +0 -0
  78. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/session.md +0 -0
  79. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socket.yml +0 -0
  80. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/cli_client.py +0 -0
  81. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/cli_run.py +0 -0
  82. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/exceptions.py +0 -0
  83. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/git_interface.py +0 -0
  84. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/git_remote.py +0 -0
  85. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/helper/__init__.py +0 -0
  86. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/helper/socket_facts_loader.py +0 -0
  87. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/lazy_file_loader.py +0 -0
  88. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/log_uploader.py +0 -0
  89. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/logging.py +0 -0
  90. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/pull_request.py +0 -0
  91. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/resource_utils.py +0 -0
  92. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/scm/__init__.py +0 -0
  93. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/scm/base.py +0 -0
  94. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/scm/client.py +0 -0
  95. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/socket_config.py +0 -0
  96. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/streaming.py +0 -0
  97. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/tools/coana-cache.mjs +0 -0
  98. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/core/utils.py +0 -0
  99. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/fossa_compat.py +0 -0
  100. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/output.py +0 -0
  101. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/plugins/__init__.py +0 -0
  102. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/plugins/base.py +0 -0
  103. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/plugins/formatters/__init__.py +0 -0
  104. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/plugins/formatters/slack.py +0 -0
  105. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/plugins/jira.py +0 -0
  106. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/plugins/manager.py +0 -0
  107. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/plugins/slack.py +0 -0
  108. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/plugins/teams.py +0 -0
  109. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/socketsecurity/plugins/webhook.py +0 -0
  110. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/__init__.py +0 -0
  111. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/core/conftest.py +0 -0
  112. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/core/create_diff_input.json +0 -0
  113. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/core/test_diff_alerts.py +0 -0
  114. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/core/test_diff_generation.py +0 -0
  115. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/core/test_diff_scan_polling.py +0 -0
  116. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/core/test_facts_compression.py +0 -0
  117. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/core/test_full_scan_outputs.py +0 -0
  118. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/core/test_has_manifest_files.py +0 -0
  119. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/core/test_invalid_facts_marker.py +0 -0
  120. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/core/test_package_and_alerts.py +0 -0
  121. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/core/test_supporting_methods.py +0 -0
  122. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/data/fullscans/create_response.json +0 -0
  123. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/data/fullscans/diff/stream_diff.json +0 -0
  124. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
  125. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/data/fullscans/head_scan/metadata.json +0 -0
  126. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
  127. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
  128. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/data/fullscans/new_scan/metadata.json +0 -0
  129. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
  130. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/data/repos/repo_info_error.json +0 -0
  131. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/data/repos/repo_info_no_head.json +0 -0
  132. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/data/repos/repo_info_success.json +0 -0
  133. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/data/settings/security-policy.json +0 -0
  134. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/fixtures/simple-cargo/Cargo.lock +0 -0
  135. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/fixtures/simple-cargo/Cargo.toml +0 -0
  136. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/fixtures/simple-cargo/src/main.rs +0 -0
  137. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/fixtures/simple-npm/index.js +0 -0
  138. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/fixtures/simple-npm/package.json +0 -0
  139. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/fixtures/simple-pypi/requirements.txt +0 -0
  140. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/reach_facts.py +0 -0
  141. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/run-with-retries.sh +0 -0
  142. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/validate-gitlab.sh +0 -0
  143. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/validate-json.sh +0 -0
  144. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/validate-reachability.sh +0 -0
  145. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/validate-sarif.sh +0 -0
  146. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/e2e/validate-scan.sh +0 -0
  147. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/fixtures/fossa/README.md +0 -0
  148. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/fixtures/fossa/fossa-analyze-empty.json +0 -0
  149. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/fixtures/fossa/fossa-analyze-populated.json +0 -0
  150. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/fixtures/fossa/fossa-sbom-empty-deep.json +0 -0
  151. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/fixtures/fossa/fossa-sbom-populated.json +0 -0
  152. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/__init__.py +0 -0
  153. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_alert_selection.py +0 -0
  154. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_cli_config.py +0 -0
  155. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_cli_run.py +0 -0
  156. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_client.py +0 -0
  157. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_commit_message_truncation.py +0 -0
  158. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_dependency_overview.py +0 -0
  159. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_dockerfile.py +0 -0
  160. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_fossa_compat.py +0 -0
  161. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_fossa_parity.py +0 -0
  162. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_full_scan_retry.py +0 -0
  163. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_git_interface.py +0 -0
  164. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_git_remote.py +0 -0
  165. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_github_buildkite_config.py +0 -0
  166. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_gitlab_auth_fallback.py +0 -0
  167. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_gitlab_commit_status.py +0 -0
  168. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_gitlab_format.py +0 -0
  169. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_ignore_authorization.py +0 -0
  170. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_ignore_telemetry_filtering.py +0 -0
  171. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_include_dirs.py +0 -0
  172. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_log_uploader.py +0 -0
  173. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_manifest_discovery.py +0 -0
  174. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_messages.py +0 -0
  175. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_output.py +0 -0
  176. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_pr_comment_rendering.py +0 -0
  177. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_pull_request_context.py +0 -0
  178. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_reachability.py +0 -0
  179. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_scan_scope.py +0 -0
  180. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_slack_plugin.py +0 -0
  181. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_slack_severity_normalization.py +0 -0
  182. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_streaming.py +0 -0
  183. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_summary_text.py +0 -0
  184. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_tier1_finalize.py +0 -0
  185. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/tests/unit/test_user_agent.py +0 -0
  186. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/workflows/bitbucket-pipelines.yml +0 -0
  187. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/workflows/buildkite.yml +0 -0
  188. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/workflows/github-actions.yml +0 -0
  189. {socketsecurity-2.12.1 → socketsecurity-2.13.0}/workflows/gitlab-ci.yml +0 -0
@@ -1,5 +1,55 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.13.0
4
+
5
+ ### Upgrade notes
6
+
7
+ Exit codes change in this release. Check any CI step that matches on a specific
8
+ code; see [Exit codes](README.md#exit-codes).
9
+
10
+ - Invalid flags exit `2` instead of `1`. `--disable-blocking` doesn't apply to
11
+ them.
12
+ - Ctrl+C exits `130` instead of `2`.
13
+ - Missing tokens and other setup failures now honor `--disable-blocking` and
14
+ `--exit-code-on-api-error`.
15
+ - `--strict-blocking` now fails on existing blocking alerts.
16
+ - Config-file booleans, integers and choices are validated before scan setup.
17
+
18
+ ### Added
19
+
20
+ - Under `--strict-blocking`, PR/MR comments list existing alerts in their own
21
+ table.
22
+
23
+ ### Changed
24
+
25
+ - Incomplete scan comparisons or existing-alert results fail the run with the
26
+ infrastructure-error code.
27
+ - GitLab security report IDs include the ecosystem, full package coordinate and
28
+ advisory ID, so existing findings get new IDs once.
29
+
30
+ ### Fixed
31
+
32
+ - `--strict-blocking`, the GitLab security report and FOSSA output include
33
+ alerts on unchanged packages.
34
+ - `--strict-blocking` no longer lists findings on added packages twice.
35
+ - Every CVE on a package is reported, not one per severity.
36
+ - GitLab reports keep findings from different ecosystems and namespaces separate.
37
+ - PR/MR comments group existing license violations and retain warnings about
38
+ omitted findings after individual ignores.
39
+ - Invalid file lists and unreadable config files exit with the usage-error code.
40
+ - Exit-code flags retain their startup values if the config file changes during a run.
41
+ - A token without `repo:list` is reported as a missing scope, not a missing
42
+ repository. Only a missing repository triggers a create request.
43
+
44
+ ## 2.12.2
45
+
46
+ ### Changed: bump pinned Coana CLI to 15.15.2
47
+
48
+ - Bumped the pinned reachability engine (the Coana CLI) from `15.15.1` to
49
+ `15.15.2`. See the
50
+ [reachability analysis changelog](https://docs.socket.dev/docs/reachability-analysis-changelog)
51
+ for engine changes.
52
+
3
53
  ## 2.12.1
4
54
 
5
55
  ### Changed: bump pinned Coana CLI to 15.15.1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: socketsecurity
3
- Version: 2.12.1
3
+ Version: 2.13.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>
@@ -278,12 +278,13 @@ Minimal pattern:
278
278
 
279
279
  ## Exit codes
280
280
 
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) |
281
+ | Code | Meaning |
282
+ |-------|---------|
283
+ | `0` | Successful report, skipped SCM event, or `--disable-blocking` set; findings gate only evaluated diffs |
284
+ | `1` | Blocking security finding(s) detected |
285
+ | `2` | Invalid flags or configuration (usage error), including argparse's own errors |
286
+ | `3` | Infrastructure or API error: missing API or SCM token, permission or plan problem, timeout, network failure, incomplete scan comparison, unexpected error |
287
+ | `130` | Scan interrupted (SIGINT / Ctrl+C) |
287
288
 
288
289
  `--exit-code-on-api-error <N>` remaps the infrastructure-error code (`3`) to any
289
290
  value — e.g. a Buildkite
@@ -300,12 +301,12 @@ error, so the supervisor's exit status (commonly 124 or 137) takes precedence.
300
301
  The two flags that affect exit codes can cancel each other out, so the order of
301
302
  precedence matters:
302
303
 
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`).
304
+ - **`--disable-blocking` forces exit `0` for findings, infrastructure errors and
305
+ interrupts.** It takes precedence over `--exit-code-on-api-error` and
306
+ `--strict-blocking`. Usage errors still exit `2`.
306
307
  - **`--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`).
308
+ set.** It changes the infrastructure-error code, including unexpected runtime
309
+ failures. Findings (`1`), usage errors (`2`) and Ctrl+C (`130`) keep their codes.
309
310
 
310
311
  So for the common "don't let Socket outages block my pipeline, but still fail on
311
312
  real findings" goal, use `--exit-code-on-api-error` **without** `--disable-blocking`:
@@ -324,6 +325,28 @@ scan exit `0` on *both* findings and outages — the `soft_fail: 100` rule would
324
325
  never match, and real findings would stop blocking. That's usually not what you
325
326
  want.
326
327
 
328
+ ### Upgrading to 2.13.0
329
+
330
+ Update pipeline rules and wrapper scripts that match specific exit codes:
331
+
332
+ | Outcome | Before 2.13.0 | From 2.13.0 |
333
+ |---------|---------------|-------------|
334
+ | Invalid flags or configuration | CLI validation: `1`; argparse: `2` | `2` for both; never suppressed by `--disable-blocking` |
335
+ | Ctrl+C | `2` | `130`, or `0` with `--disable-blocking` |
336
+ | 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 |
337
+
338
+ Blocking findings still exit `1`. With `--strict-blocking`, existing blocking
339
+ alerts can now fail jobs that previously passed. GitLab report findings also get
340
+ new IDs once; see the [release notes](CHANGELOG.md#2130).
341
+
342
+ Configuration is validated before credentials or network setup. Use native
343
+ JSON/TOML booleans such as `false`, a positive integer `timeout`, and an array of
344
+ file paths for `files`. Invalid or unreadable configuration exits `2` even when
345
+ credentials are missing or blocking is disabled.
346
+
347
+ For a compact comparison of failure-handling policies, see
348
+ [Exit codes in CI](docs/ci-cd.md#exit-codes-in-ci).
349
+
327
350
  ## Common gotchas
328
351
 
329
352
  See [`docs/troubleshooting.md`](https://github.com/SocketDev/socket-python-cli/blob/main/docs/troubleshooting.md#common-gotchas).
@@ -217,12 +217,13 @@ Minimal pattern:
217
217
 
218
218
  ## Exit codes
219
219
 
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) |
220
+ | Code | Meaning |
221
+ |-------|---------|
222
+ | `0` | Successful report, skipped SCM event, or `--disable-blocking` set; findings gate only evaluated diffs |
223
+ | `1` | Blocking security finding(s) detected |
224
+ | `2` | Invalid flags or configuration (usage error), including argparse's own errors |
225
+ | `3` | Infrastructure or API error: missing API or SCM token, permission or plan problem, timeout, network failure, incomplete scan comparison, unexpected error |
226
+ | `130` | Scan interrupted (SIGINT / Ctrl+C) |
226
227
 
227
228
  `--exit-code-on-api-error <N>` remaps the infrastructure-error code (`3`) to any
228
229
  value — e.g. a Buildkite
@@ -239,12 +240,12 @@ error, so the supervisor's exit status (commonly 124 or 137) takes precedence.
239
240
  The two flags that affect exit codes can cancel each other out, so the order of
240
241
  precedence matters:
241
242
 
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`).
243
+ - **`--disable-blocking` forces exit `0` for findings, infrastructure errors and
244
+ interrupts.** It takes precedence over `--exit-code-on-api-error` and
245
+ `--strict-blocking`. Usage errors still exit `2`.
245
246
  - **`--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`).
247
+ set.** It changes the infrastructure-error code, including unexpected runtime
248
+ failures. Findings (`1`), usage errors (`2`) and Ctrl+C (`130`) keep their codes.
248
249
 
249
250
  So for the common "don't let Socket outages block my pipeline, but still fail on
250
251
  real findings" goal, use `--exit-code-on-api-error` **without** `--disable-blocking`:
@@ -263,6 +264,28 @@ scan exit `0` on *both* findings and outages — the `soft_fail: 100` rule would
263
264
  never match, and real findings would stop blocking. That's usually not what you
264
265
  want.
265
266
 
267
+ ### Upgrading to 2.13.0
268
+
269
+ Update pipeline rules and wrapper scripts that match specific exit codes:
270
+
271
+ | Outcome | Before 2.13.0 | From 2.13.0 |
272
+ |---------|---------------|-------------|
273
+ | Invalid flags or configuration | CLI validation: `1`; argparse: `2` | `2` for both; never suppressed by `--disable-blocking` |
274
+ | Ctrl+C | `2` | `130`, or `0` with `--disable-blocking` |
275
+ | 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 |
276
+
277
+ Blocking findings still exit `1`. With `--strict-blocking`, existing blocking
278
+ alerts can now fail jobs that previously passed. GitLab report findings also get
279
+ new IDs once; see the [release notes](CHANGELOG.md#2130).
280
+
281
+ Configuration is validated before credentials or network setup. Use native
282
+ JSON/TOML booleans such as `false`, a positive integer `timeout`, and an array of
283
+ file paths for `files`. Invalid or unreadable configuration exits `2` even when
284
+ credentials are missing or blocking is disabled.
285
+
286
+ For a compact comparison of failure-handling policies, see
287
+ [Exit codes in CI](docs/ci-cd.md#exit-codes-in-ci).
288
+
266
289
  ## Common gotchas
267
290
 
268
291
  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
@@ -337,7 +337,7 @@ If you don't want to provide the Socket API Token every time then you can use th
337
337
  | Parameter | Required | Default | Description |
338
338
  |:---------------------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------------------------------|
339
339
  | `--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`). |
340
- | `--reach-version` | False | 15.15.1 | Version of the Coana 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. |
340
+ | `--reach-version` | False | 15.15.2 | Version of the Coana 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. |
341
341
  | `--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` |
342
342
  | `--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` |
343
343
  | `--reach-concurrency` | False | 1 | Control parallel analysis execution (must be >= 1). Omitted by default, so coana applies its own default. |
@@ -358,7 +358,7 @@ If you don't want to provide the Socket API Token every time then you can use th
358
358
 
359
359
  **Reachability Analysis Requirements:**
360
360
 
361
- The Python CLI verifies the following **up front** (before invoking the analysis engine) and exits with code **3** if any are unmet:
361
+ 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
362
  - `node` - Required to run the analysis engine (the Coana CLI). The engine needs Node.js 22.13 or later.
363
363
  - `uv` - Required by the analysis engine
364
364
  - An **Enterprise** Socket organization plan (any `enterprise*` plan, including Enterprise trials)
@@ -372,7 +372,7 @@ Separately, the analysis engine (coana) needs the **per-ecosystem build toolchai
372
372
  | Host | Used for | If blocked |
373
373
  |---|---|---|
374
374
  | `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', ...)` |
375
+ | `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
376
  | 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
377
 
378
378
  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 +389,13 @@ Socket's reachability analysis comes in three forms, referred to by their full n
389
389
 
390
390
  ## Config file support
391
391
 
392
+ Values are validated after CLI overrides and before scan setup. Boolean options
393
+ use native JSON/TOML booleans; integer options use integers, with `timeout` greater
394
+ than zero. `files` accepts an array of nonempty file paths, or its JSON string
395
+ representation. Invalid values and unreadable config files exit `2`, including
396
+ with `--disable-blocking`. Runtime exit policy uses the configuration loaded at
397
+ startup; changing or removing the file during a run does not change its exit code.
398
+
392
399
  Use `--config <path>` to load defaults from a `.toml` or `.json` file.
393
400
  CLI arguments always take precedence over config file values.
394
401
 
@@ -430,6 +437,8 @@ Sample config files:
430
437
  ### CI/CD usage tips
431
438
 
432
439
  For CI-specific examples and guidance, see [`ci-cd.md`](ci-cd.md).
440
+ Exit statuses and flag precedence are listed in [Exit codes](../README.md#exit-codes),
441
+ with pipeline examples in [Exit codes in CI](ci-cd.md#exit-codes-in-ci).
433
442
 
434
443
  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
444
 
@@ -437,13 +446,14 @@ The CLI runs a pinned version of the Coana CLI, the analysis engine; it does **n
437
446
  | Parameter | Required | Default | Description |
438
447
  |:-------------------------|:---------|:--------|:----------------------------------------------------------------------|
439
448
  | `--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`. |
449
+ | `--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. |
450
+ | `--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
451
  | `--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
452
  | `--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
453
  | `--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
454
  | `--enable-diff` | False | False | Enable diff mode even when using `--integration api` (forces diff mode without SCM integration) |
445
455
  | `--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. |
456
+ | `--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
457
 
448
458
  #### Plugins
449
459
 
@@ -641,8 +651,10 @@ Security issues detected by Socket Security:
641
651
 
642
652
  ### Important Notes
643
653
 
644
- - **Diff Mode Only**: The flag only works in diff mode (with SCM integration). In API mode, a warning is logged.
654
+ - **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
655
  - **Error-Level Only**: Only fails on `error=True` alerts (blocking severity), not warnings.
656
+ - **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.
657
+ - **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
658
  - **Priority**: `--disable-blocking` takes precedence - if both flags are set, the build will always pass.
647
659
  - **First Scan**: On the very first scan of a repository, there are no "existing" violations, so behavior is identical to standard mode.
648
660
 
@@ -881,9 +893,16 @@ The GitLab Security Dashboard report and the JSON/SARIF diff outputs use differe
881
893
 
882
894
  ### Alert Ignoring via PR/MR Comments
883
895
 
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.
896
+ In SCM diff mode (`--scm github` or `--scm gitlab`), an authorized
897
+ `@SocketSecurity ignore <ecosystem>/<package>@<version>` or
898
+ `@SocketSecurity ignore-all` comment removes matching new alerts from the CLI's
899
+ reports, including the GitLab report. With `--strict-blocking`, it also removes
900
+ matching existing alerts from blocking checks and reports. Without strict blocking,
901
+ the GitLab report still includes existing findings.
885
902
 
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.
903
+ `--disable-ignore` disables these commands. See [Who can ignore an alert](#who-can-ignore-an-alert)
904
+ for authorization rules. To suppress a finding across future PRs, update its policy
905
+ or triage state in Socket's dashboard.
887
906
 
888
907
  ### Report Schema
889
908
 
@@ -900,6 +919,10 @@ Socket CLI generates reports compliant with [GitLab Dependency Scanning schema v
900
919
 
901
920
  **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
921
 
922
+ Finding IDs distinguish the ecosystem, full package coordinate and advisory, so
923
+ different namespaces or CVEs remain separate findings. Upgrading to 2.13.0 changes
924
+ existing finding IDs once; GitLab may show them as newly detected on the first report.
925
+
903
926
  ### Performance Notes
904
927
 
905
928
  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.
@@ -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
@@ -1,5 +1,33 @@
1
1
  # Troubleshooting
2
2
 
3
+ ## Unexpected CI exit status
4
+
5
+ | Symptom | What to check |
6
+ |---------|---------------|
7
+ | Exit `2`, even with `--disable-blocking` | Fix the flags or configuration reported in the logs. Check config-file readability, native boolean/integer values, a positive timeout and the `files` array. Usage errors are never suppressed. |
8
+ | Exit `3` with no reported findings | Check tokens, scopes, baseline lookup and scan-completeness errors. This is a failed evaluation; `--exit-code-on-api-error` can remap its code. |
9
+ | Ctrl+C is treated as a configuration error | Update wrapper/CI rules: Ctrl+C changed from `2` to `130` in 2.13.0. |
10
+ | Exit `0` despite expected blockers | Check `--disable-blocking`, remapping to `0`, and whether the run produced a full scan instead of a diff. Full scans do not gate on findings. |
11
+
12
+ See [Exit codes in CI](ci-cd.md#exit-codes-in-ci) for the flag combinations and
13
+ [upgrade guidance](../README.md#upgrading-to-2130) for older pipeline rules.
14
+
15
+ ## Repository lookup or creation fails
16
+
17
+ A run that compares scans looks up the repository first, unless `--base-scan-id` or
18
+ `--base-commit-sha` is set. A token missing a repository scope stops there with the
19
+ infrastructure-error code (`3` by default):
20
+
21
+ | Log message | Missing scope |
22
+ |-------------|---------------|
23
+ | `Failed to get repository <repo> (HTTP 403). The API token may be missing the repo:list scope.` | `repo:list` |
24
+ | `API failure while creating repository <repo> (HTTP 403): ...`, then `A 403 here usually means the API token is missing the repo:create scope.` | `repo:create`. Only needed when the repository does not exist yet |
25
+
26
+ Both failures follow `--disable-blocking` and `--exit-code-on-api-error`. Before
27
+ 2.13.0, any failed lookup was treated as a missing repository, so a token without
28
+ `repo:list` ended in the `repo:create` message, and the run exited `2` whatever
29
+ either flag said.
30
+
3
31
  ## API token scopes for scan comparisons
4
32
 
5
33
  PR/MR runs compare the new scan against the repository's head scan. That comparison
@@ -10,6 +38,10 @@ scopes in addition to whatever the scan itself needs:
10
38
  - `diff-scans:list`
11
39
  - `full-scans:list`
12
40
 
41
+ `full-scans:list` also covers the read of the new full scan that `--strict-blocking`,
42
+ `--enable-gitlab-security` and `--legal-format fossa` use to get alerts on unchanged
43
+ packages.
44
+
13
45
  If the token is missing them the scan still succeeds, so this is easy to miss. The only
14
46
  signal is a warning, after which the CLI falls back to the older streaming comparison:
15
47
 
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
 
7
7
  [project]
8
8
  name = "socketsecurity"
9
- version = "2.12.1"
9
+ version = "2.13.0"
10
10
  requires-python = ">= 3.11"
11
11
  license = {"file" = "LICENSE"}
12
12
  dependencies = [
@@ -1,5 +1,5 @@
1
1
  [pytest]
2
- testpaths = tests/unit
2
+ testpaths = tests/unit tests/core
3
3
  ; addopts = -vv --no-cov --tb=short -ra
4
4
  addopts = -vv --tb=short -ra --cov=socketsecurity --cov-report=term-missing
5
5
  python_files = test_*.py
@@ -1,4 +1,4 @@
1
1
  __author__ = 'socket.dev'
2
- __version__ = '2.12.1'
2
+ __version__ = '2.13.0'
3
3
  USER_AGENT_NAME = 'socket-python-cli'
4
4
  USER_AGENT = f'{USER_AGENT_NAME}/{__version__}'