socketsecurity 2.13.2__tar.gz → 2.14.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 (198) hide show
  1. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/CHANGELOG.md +60 -0
  2. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/PKG-INFO +26 -24
  3. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/README.md +24 -22
  4. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/docs/ci-cd.md +73 -18
  5. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/docs/cli-reference.md +30 -28
  6. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/docs/troubleshooting.md +23 -2
  7. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/pyproject.toml +2 -2
  8. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/__init__.py +1 -1
  9. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/config.py +5 -2
  10. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/__init__.py +130 -88
  11. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/classes.py +7 -0
  12. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/messages.py +130 -122
  13. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/scm/github.py +54 -6
  14. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/scm/gitlab.py +16 -1
  15. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/scm_comments.py +33 -16
  16. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/exit_codes.py +1 -5
  17. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/output.py +5 -2
  18. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/socketcli.py +14 -10
  19. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_cli_exit_contract.py +8 -3
  20. socketsecurity-2.14.0/tests/core/test_existing_alerts.py +667 -0
  21. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_exit_codes.py +124 -3
  22. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_strict_blocking_duplicates.py +7 -3
  23. socketsecurity-2.14.0/tests/core/test_strict_blocking_no_manifest_change.py +398 -0
  24. socketsecurity-2.14.0/tests/unit/test_comment_event_flow.py +256 -0
  25. socketsecurity-2.14.0/tests/unit/test_comment_package_links.py +222 -0
  26. socketsecurity-2.14.0/tests/unit/test_github_event_filter.py +269 -0
  27. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_ignore_telemetry_filtering.py +2 -3
  28. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_include_dirs.py +57 -5
  29. socketsecurity-2.14.0/tests/unit/test_strict_blocking_report_only.py +88 -0
  30. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/uv.lock +5 -5
  31. socketsecurity-2.14.0/workflows/github-actions-comments.yml +36 -0
  32. socketsecurity-2.14.0/workflows/github-actions-push.yml +32 -0
  33. socketsecurity-2.14.0/workflows/github-actions.yml +35 -0
  34. socketsecurity-2.13.2/tests/core/test_existing_alerts.py +0 -380
  35. socketsecurity-2.13.2/workflows/github-actions.yml +0 -63
  36. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.dockerignore +0 -0
  37. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/CODEOWNERS +0 -0
  38. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
  39. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
  40. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
  41. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  42. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/actions/setup-docker/action.yml +0 -0
  43. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/actions/setup-hatch/action.yml +0 -0
  44. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/actions/setup-sfw/action.yml +0 -0
  45. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/dependabot.yml +0 -0
  46. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/workflows/dependency-audit.yml +0 -0
  47. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/workflows/dependency-review.yml +0 -0
  48. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/workflows/docker-stable.yml +0 -0
  49. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/workflows/e2e-image.yml +0 -0
  50. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/workflows/e2e-test.yml +0 -0
  51. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/workflows/package-check.yml +0 -0
  52. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/workflows/pr-preview.yml +0 -0
  53. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/workflows/python-tests.yml +0 -0
  54. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/workflows/release.yml +0 -0
  55. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/workflows/version-check.yml +0 -0
  56. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.github/zizmor.yml +0 -0
  57. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.gitignore +0 -0
  58. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.hooks/sync_version.py +0 -0
  59. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.pre-commit-config.yaml +0 -0
  60. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/.python-version +0 -0
  61. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/CONTRIBUTING.md +0 -0
  62. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/Dockerfile +0 -0
  63. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/Dockerfile.preview +0 -0
  64. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/LICENSE +0 -0
  65. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/Makefile +0 -0
  66. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/benchmarks/manifest_discovery.py +0 -0
  67. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/docs/development.md +0 -0
  68. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/examples/config/sarif-dashboard-parity.json +0 -0
  69. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/examples/config/sarif-dashboard-parity.toml +0 -0
  70. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/examples/config/sarif-diff-ci-cd.json +0 -0
  71. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/examples/config/sarif-diff-ci-cd.toml +0 -0
  72. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/examples/config/sarif-instance-detail.json +0 -0
  73. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/examples/config/sarif-instance-detail.toml +0 -0
  74. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/instructions/gitlab-commit-status/uat.md +0 -0
  75. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/pytest.ini +0 -0
  76. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/scripts/build_container.sh +0 -0
  77. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/scripts/build_container_flexible.sh +0 -0
  78. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/scripts/deploy-test-docker.sh +0 -0
  79. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/scripts/deploy-test-pypi.sh +0 -0
  80. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/scripts/docker-entrypoint.sh +0 -0
  81. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/scripts/run.sh +0 -0
  82. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/session.md +0 -0
  83. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socket.yml +0 -0
  84. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/alert_selection.py +0 -0
  85. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/cli_client.py +0 -0
  86. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/cli_run.py +0 -0
  87. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/exceptions.py +0 -0
  88. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/git_interface.py +0 -0
  89. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/git_remote.py +0 -0
  90. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/helper/__init__.py +0 -0
  91. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/helper/socket_facts_loader.py +0 -0
  92. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/lazy_file_loader.py +0 -0
  93. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/log_uploader.py +0 -0
  94. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/logging.py +0 -0
  95. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/pull_request.py +0 -0
  96. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/resource_utils.py +0 -0
  97. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/scm/__init__.py +0 -0
  98. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/scm/base.py +0 -0
  99. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/scm/client.py +0 -0
  100. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/socket_config.py +0 -0
  101. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/streaming.py +0 -0
  102. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/tools/coana-cache.mjs +0 -0
  103. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/tools/reachability.py +0 -0
  104. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/core/utils.py +0 -0
  105. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/fossa_compat.py +0 -0
  106. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/plugins/__init__.py +0 -0
  107. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/plugins/base.py +0 -0
  108. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/plugins/formatters/__init__.py +0 -0
  109. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/plugins/formatters/slack.py +0 -0
  110. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/plugins/jira.py +0 -0
  111. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/plugins/manager.py +0 -0
  112. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/plugins/slack.py +0 -0
  113. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/plugins/teams.py +0 -0
  114. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/socketsecurity/plugins/webhook.py +0 -0
  115. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/__init__.py +0 -0
  116. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/conftest.py +0 -0
  117. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/create_diff_input.json +0 -0
  118. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_alert_consolidation.py +0 -0
  119. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_diff_alerts.py +0 -0
  120. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_diff_generation.py +0 -0
  121. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_diff_scan_polling.py +0 -0
  122. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_facts_compression.py +0 -0
  123. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_full_scan_outputs.py +0 -0
  124. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_has_manifest_files.py +0 -0
  125. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_invalid_facts_marker.py +0 -0
  126. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_package_and_alerts.py +0 -0
  127. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_sdk_methods.py +0 -0
  128. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/core/test_supporting_methods.py +0 -0
  129. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/data/fullscans/create_response.json +0 -0
  130. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/data/fullscans/diff/stream_diff.json +0 -0
  131. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
  132. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/data/fullscans/head_scan/metadata.json +0 -0
  133. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
  134. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
  135. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/data/fullscans/new_scan/metadata.json +0 -0
  136. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
  137. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/data/repos/repo_info_error.json +0 -0
  138. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/data/repos/repo_info_no_head.json +0 -0
  139. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/data/repos/repo_info_success.json +0 -0
  140. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/data/settings/security-policy.json +0 -0
  141. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/fixtures/simple-cargo/Cargo.lock +0 -0
  142. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/fixtures/simple-cargo/Cargo.toml +0 -0
  143. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/fixtures/simple-cargo/src/main.rs +0 -0
  144. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/fixtures/simple-npm/index.js +0 -0
  145. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/fixtures/simple-npm/package.json +0 -0
  146. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/fixtures/simple-pypi/requirements.txt +0 -0
  147. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/reach_facts.py +0 -0
  148. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/run-with-retries.sh +0 -0
  149. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/validate-gitlab.sh +0 -0
  150. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/validate-json.sh +0 -0
  151. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/validate-reachability.sh +0 -0
  152. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/validate-sarif.sh +0 -0
  153. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/e2e/validate-scan.sh +0 -0
  154. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/fixtures/fossa/README.md +0 -0
  155. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/fixtures/fossa/fossa-analyze-empty.json +0 -0
  156. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/fixtures/fossa/fossa-analyze-populated.json +0 -0
  157. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/fixtures/fossa/fossa-sbom-empty-deep.json +0 -0
  158. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/fixtures/fossa/fossa-sbom-populated.json +0 -0
  159. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/__init__.py +0 -0
  160. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_alert_selection.py +0 -0
  161. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_cli_config.py +0 -0
  162. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_cli_run.py +0 -0
  163. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_client.py +0 -0
  164. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_commit_message_truncation.py +0 -0
  165. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_config.py +0 -0
  166. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_dependency_overview.py +0 -0
  167. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_disable_ignore.py +0 -0
  168. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_dockerfile.py +0 -0
  169. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_exclude_paths.py +0 -0
  170. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_fossa_compat.py +0 -0
  171. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_fossa_parity.py +0 -0
  172. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_full_scan_retry.py +0 -0
  173. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_git_interface.py +0 -0
  174. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_git_remote.py +0 -0
  175. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_github_buildkite_config.py +0 -0
  176. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_gitlab_auth.py +0 -0
  177. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_gitlab_auth_fallback.py +0 -0
  178. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_gitlab_commit_status.py +0 -0
  179. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_gitlab_format.py +0 -0
  180. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_ignore_authorization.py +0 -0
  181. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_log_uploader.py +0 -0
  182. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_manifest_discovery.py +0 -0
  183. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_messages.py +0 -0
  184. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_output.py +0 -0
  185. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_pr_comment_rendering.py +0 -0
  186. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_pull_request_context.py +0 -0
  187. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_reachability.py +0 -0
  188. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_scan_scope.py +0 -0
  189. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_slack_plugin.py +0 -0
  190. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_slack_severity_normalization.py +0 -0
  191. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_socketcli.py +0 -0
  192. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_streaming.py +0 -0
  193. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_summary_text.py +0 -0
  194. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_tier1_finalize.py +0 -0
  195. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/tests/unit/test_user_agent.py +0 -0
  196. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/workflows/bitbucket-pipelines.yml +0 -0
  197. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/workflows/buildkite.yml +0 -0
  198. {socketsecurity-2.13.2 → socketsecurity-2.14.0}/workflows/gitlab-ci.yml +0 -0
@@ -1,5 +1,65 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.14.0
4
+
5
+ ### Upgrade notes
6
+
7
+ - Without a GitHub or GitLab SCM adapter, `--strict-blocking` now compares scans
8
+ even when no manifest changed. This includes default-branch pushes and scans of
9
+ non-git paths. These runs can now fail on Block findings or comparison errors
10
+ and need the [API token scopes for comparison runs](docs/troubleshooting.md#api-token-permissions).
11
+ - If you use the GitHub Actions example, replace the combined workflow with the
12
+ [PR workflow](workflows/github-actions.yml) and require its `socket-security`
13
+ check. Install the [push workflow](workflows/github-actions-push.yml) in the
14
+ same change: the PR workflow doesn't run on pushes, so without it the
15
+ default-branch baseline stops updating and PR comparisons run against an old
16
+ scan. Install the
17
+ [ignore-command workflow](workflows/github-actions-comments.yml) if you use PR
18
+ ignore commands.
19
+
20
+ ### Changed
21
+
22
+ - Updated the Socket Python SDK (`socketdev`) to 3.6.4. This can increase
23
+ advisory counts in full-scan JSON, SARIF, and GitLab security reports, and
24
+ in the existing findings shown in GitLab security and FOSSA diff reports.
25
+ - Skipped GitHub events and GitLab pipeline sources now warn that no scan ran.
26
+
27
+ ### Fixed
28
+
29
+ - `--strict-blocking` counts distinct advisories on unchanged dependencies and
30
+ lists findings that persist after a version change in the Existing alerts
31
+ table. When a finding has both Warn and Block actions, Block takes precedence.
32
+ - SARIF reports use advisory IDs to distinguish findings on the same package
33
+ and manifest.
34
+ - Comparisons with missing or invalid package lists fail with exit `3` by
35
+ default. `--exit-code-on-api-error` can remap the code, and
36
+ `--disable-blocking` takes precedence.
37
+ - `--strict-blocking` checks existing Block findings on code-only changes.
38
+ GitHub and GitLab pull request comments show those findings under Existing
39
+ alerts.
40
+ - With `--scm github`, reopened pull requests and pull requests marked ready for
41
+ review run the PR scan.
42
+ - GitHub pull request comment runs exit `0` and leave the Socket security
43
+ comment unchanged when there are no Socket ignore commands to process.
44
+ - Under `--strict-blocking --disable-blocking`, the PR/MR comment and console
45
+ summary no longer say that existing Block alerts fail the run.
46
+ - The "This package" link in GitHub and GitLab security comments opens the
47
+ affected package version on socket.dev. License findings for different
48
+ namespaces appear in separate rows, and generated ignore commands identify
49
+ the package by its scope or namespace.
50
+ - Large PR/MR security comments fit within GitHub's size limit and show how many
51
+ new or existing findings were omitted. Policy checks and reports use all findings.
52
+
53
+ ### Documentation
54
+
55
+ - The [CI guide](docs/ci-cd.md#required-github-checks) describes GitHub required
56
+ checks and the GitHub Actions workflow migration.
57
+ - The README's upgrade notes for 2.13 and 2.14 are combined into one short
58
+ [section](README.md#upgrading-from-212-or-earlier).
59
+ - Clarified that `--include-module-folders` discovers dependency manifests.
60
+ Added a guide to scanning packages installed outside the lockfile with a
61
+ CycloneDX SBOM.
62
+
3
63
  ## 2.13.2
4
64
 
5
65
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: socketsecurity
3
- Version: 2.13.2
3
+ Version: 2.14.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>
@@ -44,7 +44,7 @@ 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.3
47
+ Requires-Dist: socketdev==3.6.4
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'
@@ -266,7 +266,7 @@ JSON:
266
266
 
267
267
  Prebuilt workflow examples:
268
268
 
269
- - [GitHub Actions](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/github-actions.yml)
269
+ - GitHub Actions for [pull requests](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/github-actions.yml), [pushes](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/github-actions-push.yml), and [ignore commands](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/github-actions-comments.yml)
270
270
  - [Buildkite](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/buildkite.yml)
271
271
  - [GitLab CI](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/gitlab-ci.yml)
272
272
  - [Bitbucket Pipelines](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/bitbucket-pipelines.yml)
@@ -329,27 +329,29 @@ scan exit `0` on *both* findings and outages — the `soft_fail: 100` rule would
329
329
  never match, and real findings would stop blocking. That's usually not what you
330
330
  want.
331
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).
332
+ ### Upgrading from 2.12 or earlier
333
+
334
+ 2.13 and 2.14 change exit codes and what `--strict-blocking` checks:
335
+
336
+ - **Exit codes:** invalid flags or configuration exit `2`, Ctrl+C exits `130`,
337
+ and setup failures such as a missing token use the infrastructure-error code
338
+ (`3` by default). Blocking findings still exit `1`. See
339
+ [Exit codes in CI](docs/ci-cd.md#exit-codes-in-ci).
340
+ - **Config files** are validated before credentials or network setup. Use native
341
+ JSON/TOML booleans, a positive integer `timeout` and an array for `files`.
342
+ - **`--strict-blocking`** fails on existing Block alerts, counts each advisory
343
+ separately, and compares code-only changes too, so pipelines can fail on
344
+ alerts they used to pass. Without `--scm github` or `--scm gitlab`, that
345
+ includes default-branch pushes, which need the `full-scans:list` and
346
+ `repo:list` token scopes; see
347
+ [API token permissions](docs/troubleshooting.md#api-token-permissions).
348
+ - **GitHub Actions example:** if you copied it, put the
349
+ [PR workflow](workflows/github-actions.yml) at the existing path and add the
350
+ [push workflow](workflows/github-actions-push.yml) in the same change. See
351
+ [Required GitHub checks](docs/ci-cd.md#required-github-checks).
352
+
353
+ GitLab report findings get new IDs once. The [release notes](CHANGELOG.md) have
354
+ the details.
353
355
 
354
356
  ## Common gotchas
355
357
 
@@ -205,7 +205,7 @@ JSON:
205
205
 
206
206
  Prebuilt workflow examples:
207
207
 
208
- - [GitHub Actions](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/github-actions.yml)
208
+ - GitHub Actions for [pull requests](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/github-actions.yml), [pushes](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/github-actions-push.yml), and [ignore commands](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/github-actions-comments.yml)
209
209
  - [Buildkite](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/buildkite.yml)
210
210
  - [GitLab CI](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/gitlab-ci.yml)
211
211
  - [Bitbucket Pipelines](https://github.com/SocketDev/socket-python-cli/blob/main/workflows/bitbucket-pipelines.yml)
@@ -268,27 +268,29 @@ scan exit `0` on *both* findings and outages — the `soft_fail: 100` rule would
268
268
  never match, and real findings would stop blocking. That's usually not what you
269
269
  want.
270
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).
271
+ ### Upgrading from 2.12 or earlier
272
+
273
+ 2.13 and 2.14 change exit codes and what `--strict-blocking` checks:
274
+
275
+ - **Exit codes:** invalid flags or configuration exit `2`, Ctrl+C exits `130`,
276
+ and setup failures such as a missing token use the infrastructure-error code
277
+ (`3` by default). Blocking findings still exit `1`. See
278
+ [Exit codes in CI](docs/ci-cd.md#exit-codes-in-ci).
279
+ - **Config files** are validated before credentials or network setup. Use native
280
+ JSON/TOML booleans, a positive integer `timeout` and an array for `files`.
281
+ - **`--strict-blocking`** fails on existing Block alerts, counts each advisory
282
+ separately, and compares code-only changes too, so pipelines can fail on
283
+ alerts they used to pass. Without `--scm github` or `--scm gitlab`, that
284
+ includes default-branch pushes, which need the `full-scans:list` and
285
+ `repo:list` token scopes; see
286
+ [API token permissions](docs/troubleshooting.md#api-token-permissions).
287
+ - **GitHub Actions example:** if you copied it, put the
288
+ [PR workflow](workflows/github-actions.yml) at the existing path and add the
289
+ [push workflow](workflows/github-actions-push.yml) in the same change. See
290
+ [Required GitHub checks](docs/ci-cd.md#required-github-checks).
291
+
292
+ GitLab report findings get new IDs once. The [release notes](CHANGELOG.md) have
293
+ the details.
292
294
 
293
295
  ## Common gotchas
294
296
 
@@ -84,11 +84,13 @@ they also hide findings and usage errors. Even with exit `0`, a setup/API failur
84
84
  does not mean a clean scan; check the logs for a completed report.
85
85
 
86
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.
87
+ SCM event filters can also skip unsupported events with exit `0` and a warning
88
+ (see [Skipped events](#skipped-events)); confirm a report was created when
89
+ validating a new workflow.
90
+ The CLI treats comparisons marked incomplete or returned with missing or
91
+ invalid package lists as infrastructure failures. With `--strict-blocking`,
92
+ incomplete existing-alert data is also an infrastructure failure. See the
93
+ [upgrade notes](../README.md#upgrading-from-212-or-earlier) when updating existing CI rules.
92
94
 
93
95
  ## Config file usage in CI
94
96
 
@@ -137,6 +139,11 @@ Buildkite-specific config-file format is required.
137
139
  SOCKET_SECURITY_API_TOKEN: ${{ secrets.SOCKET_SECURITY_API_TOKEN }}
138
140
  ```
139
141
 
142
+ With `--scm github`, `issue_comment` runs process Socket ignore commands on the
143
+ pull request. When there are no commands to process, the run exits `0` and
144
+ leaves the security comment unchanged. Use a dedicated `pull_request` scan job
145
+ for any required check that gates merges on scan findings.
146
+
140
147
  #### GitHub Actions: scan changed monorepo workspaces independently
141
148
 
142
149
  GitHub Actions `paths` filters only decide whether a workflow starts. They do not
@@ -499,27 +506,75 @@ pipelines:
499
506
 
500
507
  ## Scan type by pipeline
501
508
 
502
- With `--scm github` or `--scm gitlab`, the detected event decides the scan type:
509
+ With `--scm github` or `--scm gitlab`, the adapter uses the event and PR/MR
510
+ context to select the scan type. A push given a PR/MR number can use the
511
+ comparison path.
503
512
 
504
513
  | Event | Scan | Blocks the build |
505
514
  |:------|:-----|:-----------------|
506
- | Pull request / merge request | Diff scan against the repository's baseline | Yes, on new blocking alerts; also existing blockers with `--strict-blocking` |
507
- | Any other pipeline, including default-branch pushes | Full scan | No |
515
+ | Supported pull request / merge request events | Diff scan against the repository's baseline when a comparison runs | Yes, on new blocking alerts and on existing blockers with `--strict-blocking` |
516
+ | Push without a PR/MR number, including default-branch pushes | Full scan | No blocking on findings |
508
517
 
509
- A full scan has no baseline, so it cannot tell a newly introduced alert from one
510
- that was already there. Rather than block on a number that would mean something
511
- different depending on which output format was enabled, those runs behave as if
512
- `--disable-blocking` was supplied and report through the Dashboard instead. This
513
- matches how the CLI already treats a run with no supported manifest files.
518
+ With changed-file detection, a PR/MR with no supported manifest change runs a
519
+ full scan by default. Use `--strict-blocking` or `--ignore-commit-files` to
520
+ compare it. Full scans report through the Dashboard. A branch pipeline without
521
+ PR/MR context stays in full-scan mode even with `--enable-diff`,
522
+ `--ignore-commit-files`, or `--strict-blocking`.
514
523
 
515
- The event type is authoritative once `--scm` is set: `--enable-diff` and
516
- `--ignore-commit-files` do not turn a branch pipeline into a comparison. To diff
517
- a branch build, drop `--scm` and use `--enable-diff` with `--integration`, which
518
- runs the comparison without the PR comment adapter.
524
+ Without a GitHub or GitLab SCM adapter, `--strict-blocking` runs a comparison
525
+ even when no supported manifest changed. This includes default-branch pushes and
526
+ scans of non-git paths. A Block finding exits `1`. A comparison infrastructure
527
+ error exits `3` by default. Check the [API token scopes for comparison runs](troubleshooting.md#api-token-permissions)
528
+ when upgrading a pipeline that previously ran only full scans.
519
529
 
520
530
  `--generate-license` and `--legal-format fossa` work on both paths; a full scan
521
531
  fetches the package list for them.
522
532
 
533
+ ### Skipped events
534
+
535
+ With `--scm github`, `pull_request` runs scan on the `opened`, `synchronize`,
536
+ `reopened` and `ready_for_review` actions. Other actions (`closed`, `labeled`,
537
+ `edited`, and others) and unsupported events log a warning and exit `0` without
538
+ scanning. `issue_comment` handles ignore commands. With `--scm gitlab`, the
539
+ recognized scan sources are `web`, `merge_request_event`, `push`, `api`, and
540
+ `pipeline`. Other sources, apart from the comment flow, also warn and exit `0`
541
+ without scanning.
542
+
543
+ - A GitHub merge queue evaluates required checks on the `merge_group` commit.
544
+ The CLI skips that event. Use a check that scans the merge group for
545
+ [merge queue enforcement](https://docs.github.com/en/pull-requests/how-tos/merge-and-close-pull-requests/troubleshooting-required-status-checks#status-checks-with-github-actions-and-a-merge-queue).
546
+ - GitHub runs `pull_request_target` in the base repository context, and the CLI
547
+ skips it. Under GitHub's default fork settings, `pull_request` runs cannot
548
+ access the Socket API secret. The CLI exits with its infrastructure error code
549
+ if the token is missing. See GitHub's guidance for
550
+ [securing workflows that handle fork PRs](https://docs.github.com/en/actions/reference/security/securely-using-pull_request_target).
551
+
552
+ ### Required GitHub checks
553
+
554
+ Use the [PR workflow](../workflows/github-actions.yml) for the required
555
+ `socket-security` check. If your workflow skips drafts, include
556
+ `ready_for_review` in its `pull_request.types` so marking a PR ready starts the scan.
557
+ Use the [push workflow](../workflows/github-actions-push.yml) to update the
558
+ default-branch baseline and scan branch pushes. Use the
559
+ [ignore-command workflow](../workflows/github-actions-comments.yml) if your
560
+ repository handles ignore commands in PR comments.
561
+
562
+ GitHub normally checks the PR's test merge commit when it has a status and
563
+ otherwise checks the head commit. The default PR checkout uses the test merge
564
+ commit, while a push run uses the pushed commit. Keep the required job name
565
+ exclusive to the PR workflow in either setup. A job skipped by a job-level
566
+ `if` in a shared workflow can still report a successful check. See GitHub's
567
+ [required status check rules](https://docs.github.com/en/pull-requests/how-tos/merge-and-close-pull-requests/troubleshooting-required-status-checks).
568
+
569
+ When replacing the combined example, copy the PR workflow to the existing
570
+ workflow path and remove any other jobs named `socket-security`. Confirm the
571
+ PR job reports the check named in branch protection. Add the push workflow in
572
+ the same change: the PR workflow doesn't run on pushes, so without it the
573
+ default-branch baseline stops updating and later PR comparisons run against an
574
+ old scan. If you use
575
+ `--strict-blocking` as a merge gate, verify a reopened PR with an existing
576
+ Block alert fails and a completed clean comparison passes.
577
+
523
578
  ## Pull request and Dashboard association
524
579
 
525
580
  The CLI sends the resolved pull request number with each full scan and attaches
@@ -642,7 +697,7 @@ listed thinly or not at all.
642
697
 
643
698
  Prebuilt examples in this repo:
644
699
 
645
- - [`../workflows/github-actions.yml`](../workflows/github-actions.yml)
700
+ - GitHub Actions for [pull requests](../workflows/github-actions.yml), [pushes](../workflows/github-actions-push.yml), and [ignore commands](../workflows/github-actions-comments.yml)
646
701
  - [`../workflows/buildkite.yml`](../workflows/buildkite.yml)
647
702
  - [`../workflows/gitlab-ci.yml`](../workflows/gitlab-ci.yml)
648
703
  - [`../workflows/bitbucket-pipelines.yml`](../workflows/bitbucket-pipelines.yml)
@@ -324,7 +324,7 @@ docs.socket.dev use `SOCKET_SECURITY_API_KEY`. Either works. If both are set,
324
324
  | Parameter | Required | Default | Description |
325
325
  |:-------------------------|:---------|:--------|:------------------------------------------------------------------------------------------------------|
326
326
  | `--default-branch` | False | *auto* | Make this branch the default branch (auto-detected from git and CI environment when not specified) |
327
- | `--include-module-folders` | False | False | If enabled, re-includes the JS/TS module folders (`node_modules`, `bower_components`, `jspm_packages`) in manifest discovery. For other excluded directories, use `--include-dirs`. |
327
+ | `--include-module-folders` | False | False | Includes supported manifests found under `node_modules`, `bower_components`, and `jspm_packages` in manifest discovery. Equivalent to `--include-dirs node_modules,bower_components,jspm_packages`. Other discovery exclusions still apply. For an inventory of installed packages, see [Packages installed outside the lockfile](troubleshooting.md#packages-installed-outside-the-lockfile). |
328
328
 
329
329
  #### Output Configuration
330
330
  | Parameter | Required | Default | Description |
@@ -461,12 +461,12 @@ The CLI runs a pinned version of the Coana CLI, the analysis engine; it does **n
461
461
  #### Advanced Configuration
462
462
  | Parameter | Required | Default | Description |
463
463
  |:-------------------------|:---------|:--------|:----------------------------------------------------------------------|
464
- | `--ignore-commit-files` | False | False | Compare regardless of which files changed, scanning every manifest |
464
+ | `--ignore-commit-files` | False | False | Skip the changed-file check for comparisons eligible under the SCM event rules. |
465
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
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`. |
467
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). |
468
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). |
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. |
469
+ | `--strict-blocking` | False | False | Fail on new and existing Block findings, including on changes that touch no manifest. See [Strict Blocking Mode](#strict-blocking-mode). |
470
470
  | `--enable-diff` | False | False | Enable diff mode even when using `--integration api` (forces diff mode without SCM integration) |
471
471
  | `--scm` | False | api | Source control management type |
472
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. |
@@ -604,19 +604,12 @@ Bot mode (`bot_configs` array items):
604
604
 
605
605
  ## Strict Blocking Mode
606
606
 
607
- The `--strict-blocking` flag enforces a zero-tolerance security policy by failing builds when **ANY** security violations with blocking severity exist, not just new ones introduced in the current changes.
607
+ In a scan comparison, `--strict-blocking` fails the build on new and existing findings with a **Block** action.
608
608
 
609
609
  ### Standard vs Strict Blocking Behavior
610
610
 
611
- **Standard Behavior (Default)**:
612
- - ✅ Passes if no NEW violations are introduced
613
- - ❌ Fails only on NEW violations from your changes
614
- - 🟡 Existing violations are ignored
615
-
616
- **Strict Blocking Behavior (`--strict-blocking`)**:
617
- - ✅ Passes only if NO violations exist (new or existing)
618
- - ❌ Fails on ANY violation (new OR existing)
619
- - 🔴 Enforces zero-tolerance policy
611
+ - **Default** fails on findings introduced by the change that have a **Block** action.
612
+ - **Strict blocking** also checks unchanged dependencies and findings that persist after a version change. For example, if an upgrade leaves a blocking advisory unresolved, the run still fails and the advisory appears under **Existing alerts** at the new version.
620
613
 
621
614
  ### Usage Examples
622
615
 
@@ -667,10 +660,20 @@ Security issues detected by Socket Security:
667
660
 
668
661
  ### Important Notes
669
662
 
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).
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.
663
+ - **Scan scope**. Strict mode compares the configured scan scope even when no supported manifest changed. Scan options such as `--sub-path` and `--reach-use-only-pregenerated-sboms` still control what the CLI submits. With `--scm`, GitHub and GitLab branch pipelines without PR/MR context perform non-blocking full scans. See [Scan type by pipeline](ci-cd.md#scan-type-by-pipeline).
664
+ - **With `--reach`**. With no explicit baseline, the CLI looks for a default-branch head scan with reachability enabled. If none exists, the CLI compares against an empty baseline and classifies all findings as new. Scan the default branch with `--reach` too.
665
+ - **Policy actions**. Warn findings are reported. If the same finding has both Warn and Block actions, Block takes precedence.
666
+ - **Existing alerts come from the full scan**. The CLI fetches the current full scan when the comparison leaves out alerts on unchanged packages or when a dependency version changes. A failed fetch or a missing package in that response triggers the infrastructure-error exit code.
667
+ - **PR/MR comments**. The comment lists new alerts first, then existing alerts
668
+ with Block findings first in the existing-alerts table. License findings are
669
+ grouped by package, including its scope or namespace. **This package** opens
670
+ the affected version on socket.dev. Use the generated `@SocketSecurity ignore`
671
+ command to target the package's exact scope or namespace.
672
+ - **Comment size**. Large comments show how many new and existing alerts were
673
+ omitted to fit GitHub's size limit and link to the full report.
674
+ Policy checks and reports still use all findings. If you ignore every visible
675
+ alert, the comment keeps the omission notice. Use `@SocketSecurity ignore-all`
676
+ to clear all findings, including omitted ones.
674
677
  - **Priority**: `--disable-blocking` takes precedence - if both flags are set, the build will always pass.
675
678
  - **First Scan**: On the very first scan of a repository, there are no "existing" violations, so behavior is identical to standard mode.
676
679
 
@@ -769,25 +772,26 @@ The CLI determines which files to scan based on the following logic:
769
772
 
770
773
  2. **`--files` Parameter Override**: When specified, this parameter takes precedence over git commit detection. It accepts a JSON array of file paths to check for manifest files.
771
774
 
772
- 3. **`--ignore-commit-files` Flag**: When set, the changed-file check is skipped entirely. The CLI runs the comparison regardless of what changed, and scans every manifest file in the target directory.
775
+ 3. **`--ignore-commit-files` Flag**: Skip the changed-file check for comparisons, subject to the SCM event type.
773
776
 
774
- 4. **Automatic Fallback**: If no manifest files are found in git commit changes and no `--files` are specified, the CLI automatically switches to "API mode" and performs a full repository scan.
777
+ 4. **Automatic Fallback**: When the changed-file check finds no supported manifest, the CLI normally runs a full scan. Strict mode compares scans so it can evaluate existing findings. See [Scan type by pipeline](ci-cd.md#scan-type-by-pipeline) for SCM event rules.
775
778
 
776
- > **Important**: The CLI doesn't scan only the specified files - it uses them to determine whether a scan should be performed and what type of scan to run. When triggered, it searches the entire `--target-path` for all supported manifest files.
779
+ The changed-file list and `--files` select the scan type. Manifest discovery
780
+ uses the configured scan scope, including any `--sub-path` restrictions.
777
781
 
778
782
  ### Scanning Modes
779
783
 
780
784
  - **Differential Mode**: When manifest files are detected in changes, performs a diff scan with PR/MR comment integration
781
- - **API Mode**: When no manifest files are in changes, creates a full scan report without PR comments but still scans the entire repository
782
- - **Force Mode**: With `--ignore-commit-files`, always runs a comparison regardless of which files changed, over every manifest in the target path
785
+ - **Full Scan**: Reports findings to the Dashboard. SCM branch pipelines without PR/MR context use this mode.
786
+ - **Force Mode**: With `--ignore-commit-files`, compares regardless of which files changed on pipelines eligible for comparison.
783
787
  - **Forced Diff Mode**: With `--enable-diff`, forces differential mode even when using `--integration api` (without SCM integration)
784
788
 
785
789
  ### Examples
786
790
 
787
791
  - **Commit with manifest file**: If your commit includes changes to `package.json`, a differential scan will be triggered automatically with PR comment integration.
788
- - **Commit without manifest files**: If your commit only changes non-manifest files (like `.github/workflows/socket.yaml`), the CLI automatically switches to API mode and performs a full repository scan.
792
+ - **Code-only commit**: The CLI runs a full scan by default. `--strict-blocking` selects a comparison on pipelines eligible for comparison.
789
793
  - **Using `--files`**: If you specify `--files '["package.json"]'`, the CLI will check if this file exists and is a manifest file before determining scan type.
790
- - **Using `--ignore-commit-files`**: This runs the comparison regardless of what's in your commit, over all manifest files in the target path. Use it when the changed-file check would otherwise skip a comparison you need.
794
+ - **Using `--ignore-commit-files`**: Compare the configured scan scope regardless of which files changed when the pipeline supports comparison.
791
795
  - **Using `--enable-diff`**: Forces diff mode without SCM integration - useful when you want differential scanning but are using `--integration api`. For example: `socketcli --integration api --enable-diff --target-path /path/to/repo`
792
796
  - **Auto-detection**: Most CI/CD scenarios now work with just `socketcli --target-path /path/to/repo --scm github --pr-number $PR_NUM`
793
797
 
@@ -899,13 +903,11 @@ The GitLab Security Dashboard report and the JSON/SARIF diff outputs use differe
899
903
 
900
904
  | Output Format | Default Alerts | With `--strict-blocking` |
901
905
  |:---|:---|:---|
902
- | `--enable-gitlab-security` | **All** alerts (new + existing) | All alerts (same) |
906
+ | `--enable-gitlab-security` | New alerts and existing alerts on unchanged dependencies | Also includes findings that persist after a version change |
903
907
  | `--enable-json` | New alerts only | New + existing alerts |
904
908
  | `--enable-sarif` (diff scope) | New alerts only | New + existing alerts |
905
909
 
906
- **Why the difference?** GitLab's Security Dashboard is designed to present the full security posture of a project. An empty dashboard on a scan with no dependency changes would be misleading -- the vulnerabilities still exist, they just didn't change. By contrast, JSON and SARIF in diff scope are designed to answer "what changed?" and only include existing alerts when `--strict-blocking` explicitly requests it.
907
-
908
- > **Tip:** If you use `--enable-json` alongside `--enable-gitlab-security`, the GitLab report may contain more vulnerabilities than the JSON output. This is expected. To make JSON output match, add `--strict-blocking`.
910
+ Enable `--strict-blocking` to include existing findings in JSON and diff-scope SARIF. Scan-based SARIF includes the advisory ID in the rule ID when available, so separate advisories on the same package and manifest remain distinguishable.
909
911
 
910
912
  ### Alert Ignoring via PR/MR Comments
911
913
 
@@ -10,7 +10,7 @@
10
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
11
 
12
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.
13
+ [upgrade notes](../README.md#upgrading-from-212-or-earlier) for older pipeline rules.
14
14
 
15
15
  ## Repository lookup or creation fails
16
16
 
@@ -123,7 +123,7 @@ Flags add:
123
123
  | `--reach` | `POST orgs/{org}/upload-manifest-files`, `POST tier1-reachability-scan/finalize` | `full-scans:create` |
124
124
  | `--generate-license` | `POST orgs/{org}/purl` | `packages:list` |
125
125
  | `--enable-json`, `--enable-sarif`, `--enable-gitlab-security` or `--generate-license` on a full scan | `GET orgs/{org}/full-scans/{id}` (scan contents) | `full-scans:list` |
126
- | `--strict-blocking`, `--enable-gitlab-security` or `--legal-format fossa` on a run that compares scans | `GET orgs/{org}/full-scans/{id}` (alerts on unchanged packages) | `full-scans:list` |
126
+ | `--strict-blocking`, `--enable-gitlab-security` or `--legal-format fossa` on a run that compares scans | `GET orgs/{org}/full-scans/{id}` (existing alerts) | `full-scans:list` |
127
127
 
128
128
  `--reach` also runs the analysis engine with the same token. The engine reports to the
129
129
  `tier1-reachability-scan/*` endpoints, which check `full-scans:create`.
@@ -232,6 +232,27 @@ by the comparison step that follows.
232
232
  - Every vulnerability reported as `INSTALL ERROR`: the engine could not install your dependencies. Allow the ecosystem's package registry, or install dependencies in the target path before running `--reach`.
233
233
  - See **Reachability network access** in the [CLI reference](cli-reference.md) for the full list of hosts.
234
234
 
235
+ ## Packages installed outside the lockfile
236
+
237
+ Packages present only on disk, such as packages that a `postinstall` script adds without updating the lockfile, can be missing from a manifest-based scan.
238
+
239
+ `--include-module-folders` lets the CLI discover supported manifests in `node_modules`, `bower_components`, and `jspm_packages`, including nested directories. Other directory and path exclusions still apply, and discovery skips symlinked directories. Socket resolves the dependencies the manifests declare, including `devDependencies`. This can add findings for dependencies absent from your installed tree. With `--reach`, the CLI also includes these files in the manifest upload for reachability analysis.
240
+
241
+ For npm projects, generate a CycloneDX software bill of materials (SBOM) from the installed tree. The example uses Node.js 20.18 or newer and npm 9 or newer. Run it from the scan root with a Socket API token configured.
242
+
243
+ ```bash
244
+ npm ci &&
245
+ npx --yes @cyclonedx/cyclonedx-npm@7.0.1 --omit dev --output-format JSON --output-file installed.cdx.json &&
246
+ socketcli --target-path .
247
+ ```
248
+
249
+ The example excludes development dependencies. To include them, remove `--omit dev` and run the install and generator without production-only npm settings or `NODE_ENV=production`. If npm reports a dependency-tree error, inspect it first. Use the generator's `--ignore-npm-errors` option only if the tree npm returns contains the packages you intend to scan.
250
+
251
+ The CLI discovers CycloneDX files such as `bom.json`, `*.cdx.json`, and `*.cyclonedx.json` (or their `.xml` equivalents) alongside the lockfile. Leave `--include-module-folders` off when you only want to add the SBOM.
252
+
253
+ - For PR comparisons, generate the SBOM with the same settings before the default-branch and PR scans. Add `--ignore-commit-files` to the PR scan so it runs a comparison even on commits that change no tracked manifest. A generated SBOM outside the Git diff does not trigger comparison mode on its own.
254
+ - The SBOM covers packages present when it is generated. Packages fetched later or installed outside the tree, such as tools fetched into the npm cache by `npx`, are outside its scope.
255
+
235
256
  ## Dashboard vs CLI result counts
236
257
 
237
258
  Differences in result counts can be valid, even when filtering appears similar.
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
 
7
7
  [project]
8
8
  name = "socketsecurity"
9
- version = "2.13.2"
9
+ version = "2.14.0"
10
10
  requires-python = ">= 3.11"
11
11
  license = {"file" = "LICENSE"}
12
12
  dependencies = [
@@ -16,7 +16,7 @@ dependencies = [
16
16
  "gitpython==3.2.1",
17
17
  "packaging==26.3",
18
18
  "python-dotenv==1.2.4",
19
- "socketdev==3.6.3",
19
+ "socketdev==3.6.4",
20
20
  "beautifulsoup4==4.15.0",
21
21
  "markdown==3.11.3",
22
22
  "brotli==1.2.1; platform_python_implementation == 'CPython'",
@@ -1,4 +1,4 @@
1
1
  __author__ = 'socket.dev'
2
- __version__ = '2.13.2'
2
+ __version__ = '2.14.0'
3
3
  USER_AGENT_NAME = 'socket-python-cli'
4
4
  USER_AGENT = f'{USER_AGENT_NAME}/{__version__}'
@@ -1058,7 +1058,8 @@ def create_argument_parser() -> argparse.ArgumentParser:
1058
1058
  "--strict-blocking",
1059
1059
  dest="strict_blocking",
1060
1060
  action="store_true",
1061
- help="Fail on ANY security policy violations (blocking severity), not just new ones. Only works in diff mode."
1061
+ help="Fail on new and existing Block findings. Compare even when no manifest changed. "
1062
+ "With --scm, branch pipelines without PR/MR context run non-blocking full scans."
1062
1063
  )
1063
1064
  advanced_group.add_argument(
1064
1065
  "--enable-diff",
@@ -1119,7 +1120,9 @@ def create_argument_parser() -> argparse.ArgumentParser:
1119
1120
  dest="include_module_folders",
1120
1121
  action="store_true",
1121
1122
  default=False,
1122
- help="Enabling including module folders like node_modules"
1123
+ help="Include manifests found under node_modules, bower_components, and jspm_packages. "
1124
+ "Use a CycloneDX SBOM to inventory installed packages. "
1125
+ "See https://github.com/SocketDev/socket-python-cli/blob/main/docs/troubleshooting.md"
1123
1126
  )
1124
1127
 
1125
1128
  # Reachability Configuration