socketsecurity 2.13.1__tar.gz → 2.13.2__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.13.1 → socketsecurity-2.13.2}/.github/workflows/docker-stable.yml +2 -0
  2. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/workflows/release.yml +3 -0
  3. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/CHANGELOG.md +23 -0
  4. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/PKG-INFO +1 -1
  5. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/docs/ci-cd.md +3 -2
  6. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/pyproject.toml +1 -1
  7. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/__init__.py +1 -1
  8. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/__init__.py +6 -1
  9. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/messages.py +33 -10
  10. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_messages.py +18 -0
  11. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_pr_comment_rendering.py +128 -1
  12. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/uv.lock +1 -1
  13. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.dockerignore +0 -0
  14. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/CODEOWNERS +0 -0
  15. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
  16. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
  17. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
  18. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  19. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/actions/setup-docker/action.yml +0 -0
  20. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/actions/setup-hatch/action.yml +0 -0
  21. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/actions/setup-sfw/action.yml +0 -0
  22. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/dependabot.yml +0 -0
  23. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/workflows/dependency-audit.yml +0 -0
  24. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/workflows/dependency-review.yml +0 -0
  25. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/workflows/e2e-image.yml +0 -0
  26. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/workflows/e2e-test.yml +0 -0
  27. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/workflows/package-check.yml +0 -0
  28. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/workflows/pr-preview.yml +0 -0
  29. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/workflows/python-tests.yml +0 -0
  30. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/workflows/version-check.yml +0 -0
  31. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.github/zizmor.yml +0 -0
  32. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.gitignore +0 -0
  33. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.hooks/sync_version.py +0 -0
  34. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.pre-commit-config.yaml +0 -0
  35. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/.python-version +0 -0
  36. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/CONTRIBUTING.md +0 -0
  37. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/Dockerfile +0 -0
  38. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/Dockerfile.preview +0 -0
  39. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/LICENSE +0 -0
  40. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/Makefile +0 -0
  41. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/README.md +0 -0
  42. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/benchmarks/manifest_discovery.py +0 -0
  43. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/docs/cli-reference.md +0 -0
  44. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/docs/development.md +0 -0
  45. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/docs/troubleshooting.md +0 -0
  46. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/examples/config/sarif-dashboard-parity.json +0 -0
  47. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/examples/config/sarif-dashboard-parity.toml +0 -0
  48. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/examples/config/sarif-diff-ci-cd.json +0 -0
  49. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/examples/config/sarif-diff-ci-cd.toml +0 -0
  50. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/examples/config/sarif-instance-detail.json +0 -0
  51. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/examples/config/sarif-instance-detail.toml +0 -0
  52. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/instructions/gitlab-commit-status/uat.md +0 -0
  53. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/pytest.ini +0 -0
  54. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/scripts/build_container.sh +0 -0
  55. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/scripts/build_container_flexible.sh +0 -0
  56. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/scripts/deploy-test-docker.sh +0 -0
  57. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/scripts/deploy-test-pypi.sh +0 -0
  58. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/scripts/docker-entrypoint.sh +0 -0
  59. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/scripts/run.sh +0 -0
  60. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/session.md +0 -0
  61. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socket.yml +0 -0
  62. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/config.py +0 -0
  63. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/alert_selection.py +0 -0
  64. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/classes.py +0 -0
  65. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/cli_client.py +0 -0
  66. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/cli_run.py +0 -0
  67. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/exceptions.py +0 -0
  68. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/git_interface.py +0 -0
  69. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/git_remote.py +0 -0
  70. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/helper/__init__.py +0 -0
  71. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/helper/socket_facts_loader.py +0 -0
  72. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/lazy_file_loader.py +0 -0
  73. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/log_uploader.py +0 -0
  74. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/logging.py +0 -0
  75. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/pull_request.py +0 -0
  76. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/resource_utils.py +0 -0
  77. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/scm/__init__.py +0 -0
  78. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/scm/base.py +0 -0
  79. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/scm/client.py +0 -0
  80. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/scm/github.py +0 -0
  81. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/scm/gitlab.py +0 -0
  82. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/scm_comments.py +0 -0
  83. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/socket_config.py +0 -0
  84. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/streaming.py +0 -0
  85. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/tools/coana-cache.mjs +0 -0
  86. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/tools/reachability.py +0 -0
  87. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/core/utils.py +0 -0
  88. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/exit_codes.py +0 -0
  89. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/fossa_compat.py +0 -0
  90. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/output.py +0 -0
  91. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/plugins/__init__.py +0 -0
  92. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/plugins/base.py +0 -0
  93. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/plugins/formatters/__init__.py +0 -0
  94. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/plugins/formatters/slack.py +0 -0
  95. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/plugins/jira.py +0 -0
  96. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/plugins/manager.py +0 -0
  97. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/plugins/slack.py +0 -0
  98. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/plugins/teams.py +0 -0
  99. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/plugins/webhook.py +0 -0
  100. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/socketsecurity/socketcli.py +0 -0
  101. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/__init__.py +0 -0
  102. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/conftest.py +0 -0
  103. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/create_diff_input.json +0 -0
  104. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_alert_consolidation.py +0 -0
  105. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_cli_exit_contract.py +0 -0
  106. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_diff_alerts.py +0 -0
  107. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_diff_generation.py +0 -0
  108. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_diff_scan_polling.py +0 -0
  109. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_existing_alerts.py +0 -0
  110. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_exit_codes.py +0 -0
  111. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_facts_compression.py +0 -0
  112. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_full_scan_outputs.py +0 -0
  113. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_has_manifest_files.py +0 -0
  114. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_invalid_facts_marker.py +0 -0
  115. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_package_and_alerts.py +0 -0
  116. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_sdk_methods.py +0 -0
  117. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_strict_blocking_duplicates.py +0 -0
  118. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/core/test_supporting_methods.py +0 -0
  119. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/data/fullscans/create_response.json +0 -0
  120. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/data/fullscans/diff/stream_diff.json +0 -0
  121. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
  122. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/data/fullscans/head_scan/metadata.json +0 -0
  123. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
  124. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
  125. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/data/fullscans/new_scan/metadata.json +0 -0
  126. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
  127. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/data/repos/repo_info_error.json +0 -0
  128. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/data/repos/repo_info_no_head.json +0 -0
  129. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/data/repos/repo_info_success.json +0 -0
  130. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/data/settings/security-policy.json +0 -0
  131. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/fixtures/simple-cargo/Cargo.lock +0 -0
  132. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/fixtures/simple-cargo/Cargo.toml +0 -0
  133. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/fixtures/simple-cargo/src/main.rs +0 -0
  134. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/fixtures/simple-npm/index.js +0 -0
  135. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/fixtures/simple-npm/package.json +0 -0
  136. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/fixtures/simple-pypi/requirements.txt +0 -0
  137. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/reach_facts.py +0 -0
  138. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/run-with-retries.sh +0 -0
  139. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/validate-gitlab.sh +0 -0
  140. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/validate-json.sh +0 -0
  141. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/validate-reachability.sh +0 -0
  142. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/validate-sarif.sh +0 -0
  143. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/e2e/validate-scan.sh +0 -0
  144. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/fixtures/fossa/README.md +0 -0
  145. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/fixtures/fossa/fossa-analyze-empty.json +0 -0
  146. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/fixtures/fossa/fossa-analyze-populated.json +0 -0
  147. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/fixtures/fossa/fossa-sbom-empty-deep.json +0 -0
  148. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/fixtures/fossa/fossa-sbom-populated.json +0 -0
  149. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/__init__.py +0 -0
  150. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_alert_selection.py +0 -0
  151. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_cli_config.py +0 -0
  152. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_cli_run.py +0 -0
  153. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_client.py +0 -0
  154. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_commit_message_truncation.py +0 -0
  155. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_config.py +0 -0
  156. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_dependency_overview.py +0 -0
  157. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_disable_ignore.py +0 -0
  158. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_dockerfile.py +0 -0
  159. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_exclude_paths.py +0 -0
  160. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_fossa_compat.py +0 -0
  161. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_fossa_parity.py +0 -0
  162. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_full_scan_retry.py +0 -0
  163. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_git_interface.py +0 -0
  164. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_git_remote.py +0 -0
  165. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_github_buildkite_config.py +0 -0
  166. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_gitlab_auth.py +0 -0
  167. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_gitlab_auth_fallback.py +0 -0
  168. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_gitlab_commit_status.py +0 -0
  169. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_gitlab_format.py +0 -0
  170. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_ignore_authorization.py +0 -0
  171. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_ignore_telemetry_filtering.py +0 -0
  172. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_include_dirs.py +0 -0
  173. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_log_uploader.py +0 -0
  174. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_manifest_discovery.py +0 -0
  175. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_output.py +0 -0
  176. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_pull_request_context.py +0 -0
  177. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_reachability.py +0 -0
  178. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_scan_scope.py +0 -0
  179. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_slack_plugin.py +0 -0
  180. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_slack_severity_normalization.py +0 -0
  181. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_socketcli.py +0 -0
  182. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_streaming.py +0 -0
  183. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_summary_text.py +0 -0
  184. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_tier1_finalize.py +0 -0
  185. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/tests/unit/test_user_agent.py +0 -0
  186. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/workflows/bitbucket-pipelines.yml +0 -0
  187. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/workflows/buildkite.yml +0 -0
  188. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/workflows/github-actions.yml +0 -0
  189. {socketsecurity-2.13.1 → socketsecurity-2.13.2}/workflows/gitlab-ci.yml +0 -0
@@ -1,3 +1,5 @@
1
+ # Every release already tags `stable`. Run this only to point `stable` at a
2
+ # different release, such as rolling back from a bad one.
1
3
  name: Mark Release as Stable
2
4
  on:
3
5
  workflow_dispatch:
@@ -126,8 +126,11 @@ jobs:
126
126
  # Attach an SPDX SBOM generated from the built image, next to the
127
127
  # provenance attestation the action already adds.
128
128
  sbom: true
129
+ # `stable` follows `latest`. To point it at an older release, run
130
+ # docker-stable.yml.
129
131
  tags: |
130
132
  socketdev/cli:latest
133
+ socketdev/cli:stable
131
134
  socketdev/cli:${{ env.VERSION }}
132
135
  build-args: |
133
136
  CLI_VERSION=${{ env.VERSION }}
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.13.2
4
+
5
+ ### Added
6
+
7
+ - Security and license alerts on a transitive dependency now name the direct
8
+ dependency that introduced it, under the manifest link. Up to five are listed.
9
+
10
+ ### Changed
11
+
12
+ - Manifest file links in PR comments and reports pick the source host only from
13
+ `--scm`. The fallback that guessed GitHub, GitLab, or Bitbucket from the Socket
14
+ diff URL never produced a link and has been removed.
15
+ - Each release now also tags `socketdev/cli:stable`, so `stable` and `latest`
16
+ both point at the newest release. Previously `stable` moved only when someone
17
+ promoted a release by hand. Pin `socketdev/cli:<version>` for reproducible CI
18
+ runs.
19
+
20
+ ### Fixed
21
+
22
+ - Scoped npm packages and Maven artifacts named as the introducing dependency
23
+ keep their scope or group ID (`npm/@acme/widgets@1.2.0`, not
24
+ `npm/widgets@1.2.0`).
25
+
3
26
  ## 2.13.1
4
27
 
5
28
  ### Documentation
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: socketsecurity
3
- Version: 2.13.1
3
+ Version: 2.13.2
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>
@@ -564,8 +564,9 @@ console output and Dashboard association but does not post a PR comment.
564
564
 
565
565
  `socketdev/cli` on Docker Hub packages the CLI with the toolchains reachability
566
566
  analysis runs on: Node.js, Go, Java, .NET, Rust, Ruby, pyenv, and PyPy on
567
- `linux/amd64`. The toolchains are most of the image's size. Tags are published
568
- per release (`socketdev/cli:<version>`), plus `latest` and `stable`.
567
+ `linux/amd64`. The toolchains are most of the image's size. Each release is
568
+ published as `socketdev/cli:<version>`, and `latest` and `stable` both point at
569
+ the newest release. Pin a version tag for reproducible CI runs.
569
570
 
570
571
  ```sh
571
572
  docker run --rm \
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
 
7
7
  [project]
8
8
  name = "socketsecurity"
9
- version = "2.13.1"
9
+ version = "2.13.2"
10
10
  requires-python = ">= 3.11"
11
11
  license = {"file" = "LICENSE"}
12
12
  dependencies = [
@@ -1,4 +1,4 @@
1
1
  __author__ = 'socket.dev'
2
- __version__ = '2.13.1'
2
+ __version__ = '2.13.2'
3
3
  USER_AGENT_NAME = 'socket-python-cli'
4
4
  USER_AGENT = f'{USER_AGENT_NAME}/{__version__}'
@@ -2795,7 +2795,12 @@ class Core:
2795
2795
  top_package = packages.get(top_id)
2796
2796
  if top_package:
2797
2797
  manifests = ""
2798
- top_purl = f"{top_package.type}/{top_package.name}@{top_package.version}"
2798
+ ancestor_name = (
2799
+ f"{top_package.namespace}/{top_package.name}"
2800
+ if top_package.namespace
2801
+ else top_package.name
2802
+ )
2803
+ top_purl = f"{top_package.type}/{ancestor_name}@{top_package.version}"
2799
2804
  if hasattr(top_package, "manifestFiles") and top_package.manifestFiles:
2800
2805
  for manifest_data in top_package.manifestFiles:
2801
2806
  manifest_file = manifest_data.get("file")
@@ -78,18 +78,10 @@ class Messages:
78
78
  # Remove leading slashes
79
79
  clean_path = clean_path.lstrip('/')
80
80
 
81
- # Determine SCM type from config or diff_url
82
- scm_type = "api" # Default to API
81
+ # diff.diff_url points at Socket, not the SCM, so only config decides.
82
+ scm_type = "api"
83
83
  if config and hasattr(config, 'scm'):
84
84
  scm_type = config.scm.lower()
85
- elif hasattr(diff, 'diff_url') and diff.diff_url:
86
- diff_url = diff.diff_url.lower()
87
- if 'github.com' in diff_url or 'github' in diff_url:
88
- scm_type = "github"
89
- elif 'gitlab' in diff_url:
90
- scm_type = "gitlab"
91
- elif 'bitbucket' in diff_url:
92
- scm_type = "bitbucket"
93
85
 
94
86
  # Generate URL based on SCM type using config information
95
87
  # NEVER use diff.diff_url for SCM URLs - those are Socket URLs for "View report" links
@@ -861,6 +853,35 @@ class Messages:
861
853
  """
862
854
  return escape(Messages.inline_html_text(value))
863
855
 
856
+ # Enough to name the usual one or two ancestors without letting a package
857
+ # pulled in by dozens of direct dependencies swamp the alert row.
858
+ INTRODUCED_BY_LIMIT = 5
859
+
860
+ @staticmethod
861
+ def introduced_by_html(alert: Issue) -> str:
862
+ """Name the direct dependencies that pulled a transitive package in.
863
+
864
+ Returns an empty string for a direct dependency, or for a transitive one
865
+ whose ancestors are not in this scan, so the row only gains a line when
866
+ there is an ancestor to name.
867
+ """
868
+ ancestors = []
869
+ for entry in getattr(alert, "introduced_by", None) or []:
870
+ if not isinstance(entry, (list, tuple)) or not entry:
871
+ continue
872
+ source = entry[0]
873
+ if source and source != "direct" and source not in ancestors:
874
+ ancestors.append(source)
875
+ if not ancestors:
876
+ return ""
877
+
878
+ shown = ancestors[:Messages.INTRODUCED_BY_LIMIT]
879
+ names = ", ".join(f"<code>{Messages.html_text(name)}</code>" for name in shown)
880
+ hidden = len(ancestors) - len(shown)
881
+ if hidden:
882
+ names += f" and {hidden} more"
883
+ return f"<p><strong>Introduced by:</strong> {names}</p>"
884
+
864
885
  @staticmethod
865
886
  def html_attr(value) -> str:
866
887
  """Escape a value for an HTML attribute, quotes included.
@@ -990,6 +1011,7 @@ class Messages:
990
1011
  ) if show_ignore else ""
991
1012
  row += f""" </ul>
992
1013
  <p><strong>From:</strong> <a href="{Messages.html_attr(license_manifest_url)}">Manifest File</a></p>
1014
+ {Messages.introduced_by_html(first_alert)}
993
1015
  <p>ℹ️ Read more on: <a href="{Messages.html_attr(first_alert.purl)}">This package</a> | <a href="https://socket.dev/alerts/license">What is a license policy violation?</a></p>
994
1016
  <blockquote>
995
1017
  <p><em>Next steps:</em> Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at <strong>support@socket.dev</strong>.</p>
@@ -1039,6 +1061,7 @@ class Messages:
1039
1061
  <p><strong>Note:</strong> {Messages.html_text(alert.description)}</p>
1040
1062
  {patched_version_html}
1041
1063
  <p><strong>Source:</strong> <a href="{Messages.html_attr(manifest_url)}">Manifest File</a></p>
1064
+ {Messages.introduced_by_html(alert)}
1042
1065
  <p>ℹ️ Read more on:
1043
1066
  <a href="{Messages.html_attr(alert.purl)}">This package</a> |
1044
1067
  <a href="{Messages.html_attr(alert.url)}">This alert</a> |
@@ -102,3 +102,21 @@ def test_manifest_link_falls_back_to_the_report_without_a_repository_url():
102
102
  url = Messages.get_manifest_file_url(diff, "app/package.json", config)
103
103
 
104
104
  assert url == "https://socket.dev/report/123?tab=files&file=app%2Fpackage.json"
105
+
106
+
107
+
108
+ def test_manifest_link_does_not_guess_the_scm_from_the_diff_url():
109
+ """Without an explicit scm, a GitHub-looking diff_url falls back to the report."""
110
+
111
+ class _NoScmConfig:
112
+ branch = "main"
113
+ repository_url = "https://github.com/acme/widgets"
114
+
115
+ diff = Diff(
116
+ diff_url="https://github.com/acme/widgets/pull/1",
117
+ report_url="https://socket.dev/report/123",
118
+ )
119
+
120
+ url = Messages.get_manifest_file_url(diff, "app/package.json", _NoScmConfig())
121
+
122
+ assert url == "https://socket.dev/report/123?tab=files&file=app%2Fpackage.json"
@@ -11,7 +11,8 @@ from dataclasses import dataclass
11
11
 
12
12
  import pytest
13
13
 
14
- from socketsecurity.core.classes import Comment, Diff, Issue
14
+ from socketsecurity.core import Core
15
+ from socketsecurity.core.classes import Comment, Diff, Issue, Package
15
16
  from socketsecurity.core.messages import Messages
16
17
  from socketsecurity.core.scm_comments import Comments
17
18
 
@@ -503,3 +504,129 @@ class TestCreateSourcesEscaping:
503
504
  manifest_str, _ = Messages.create_sources(alert, "plain")
504
505
 
505
506
  assert "<img src=x>/package.json" in manifest_str
507
+
508
+
509
+ class TestIntroducedBy:
510
+ """The default comment names the direct dependency behind a transitive alert."""
511
+
512
+ def _body(self, alert: Issue) -> str:
513
+ return Messages.security_comment_template(_make_diff([alert]), _FakeConfig())
514
+
515
+ def test_transitive_alert_names_its_ancestor(self):
516
+ alert = _make_alert(
517
+ manifests="",
518
+ introduced_by=[("npm/@acme/widgets@1.2.0", "package.json")],
519
+ )
520
+
521
+ body = self._body(alert)
522
+
523
+ assert (
524
+ "<p><strong>Introduced by:</strong> <code>npm/@acme/widgets@1.2.0</code></p>"
525
+ in body
526
+ )
527
+ assert_html_block_intact(body)
528
+
529
+ def test_direct_dependency_gets_no_line(self):
530
+ alert = _make_alert(manifests="", introduced_by=[("direct", "package.json")])
531
+
532
+ body = self._body(alert)
533
+
534
+ assert "Introduced by" not in body
535
+ assert_html_block_intact(body)
536
+
537
+ def test_transitive_without_known_ancestors_gets_no_line(self):
538
+ body = self._body(_make_alert())
539
+
540
+ assert "Introduced by" not in body
541
+ assert_html_block_intact(body)
542
+
543
+ def test_repeated_ancestors_are_listed_once(self):
544
+ """One ancestor declared in two manifests yields two entries."""
545
+ alert = _make_alert(
546
+ manifests="",
547
+ introduced_by=[
548
+ ("npm/express@4.0.0", "a/package.json"),
549
+ ("npm/express@4.0.0", "b/package.json"),
550
+ ],
551
+ )
552
+
553
+ assert Messages.introduced_by_html(alert).count("npm/express@4.0.0") == 1
554
+
555
+ def test_long_ancestor_lists_are_capped(self):
556
+ limit = Messages.INTRODUCED_BY_LIMIT
557
+ alert = _make_alert(
558
+ manifests="",
559
+ introduced_by=[(f"npm/root-{i}@1.0.0", "package.json") for i in range(limit + 3)],
560
+ )
561
+
562
+ html = Messages.introduced_by_html(alert)
563
+
564
+ assert html.count("<code>") == limit
565
+ assert html.endswith(" and 3 more</p>")
566
+
567
+ def test_ancestor_name_is_escaped(self):
568
+ alert = _make_alert(
569
+ manifests="",
570
+ introduced_by=[("npm/<img src=x>@1.0.0", "package.json")],
571
+ )
572
+
573
+ body = self._body(alert)
574
+
575
+ assert "<img src=x>" not in body
576
+ assert "npm/&lt;img src=x&gt;@1.0.0" in body
577
+
578
+ def test_license_row_names_its_ancestor(self):
579
+ alert = _make_alert(
580
+ type="licenseSpdxDisj",
581
+ title="License Policy Violation",
582
+ manifests="",
583
+ introduced_by=[("pypi/requests@2.31.0", "requirements.txt")],
584
+ )
585
+
586
+ body = self._body(alert)
587
+
588
+ assert "has a License Policy Violation" in body
589
+ assert "<code>pypi/requests@2.31.0</code>" in body
590
+ assert_html_block_intact(body)
591
+
592
+
593
+ def _package(package_id: str, **overrides):
594
+ fields = dict(
595
+ type="npm",
596
+ namespace=None,
597
+ name="widget",
598
+ version="1.0.0",
599
+ id=package_id,
600
+ score={},
601
+ alerts=[],
602
+ direct=False,
603
+ topLevelAncestors=[],
604
+ manifestFiles=[],
605
+ purl="",
606
+ )
607
+ fields.update(overrides)
608
+ return Package(**fields)
609
+
610
+
611
+ def test_ancestor_labels_keep_their_namespace():
612
+ """Two scoped npm roots with the same name, and a Maven root, must render as
613
+ distinct, correctly named ancestors in the comment."""
614
+ packages = {
615
+ "one": _package("one", namespace="@one", manifestFiles=[{"file": "package.json"}]),
616
+ "two": _package("two", namespace="@two", manifestFiles=[{"file": "package.json"}]),
617
+ "mvn": _package(
618
+ "mvn", type="maven", namespace="com.acme", name="core",
619
+ manifestFiles=[{"file": "pom.xml"}],
620
+ ),
621
+ "plain": _package("plain", name="express", manifestFiles=[{"file": "package.json"}]),
622
+ }
623
+ child = _package("child", name="leaf", topLevelAncestors=["one", "two", "mvn", "plain"])
624
+
625
+ sources = [source for source, _ in Core.get_source_data(child, packages)]
626
+
627
+ assert sources == [
628
+ "npm/@one/widget@1.0.0",
629
+ "npm/@two/widget@1.0.0",
630
+ "maven/com.acme/core@1.0.0",
631
+ "npm/express@1.0.0",
632
+ ]
@@ -1334,7 +1334,7 @@ wheels = [
1334
1334
 
1335
1335
  [[package]]
1336
1336
  name = "socketsecurity"
1337
- version = "2.13.1"
1337
+ version = "2.13.2"
1338
1338
  source = { editable = "." }
1339
1339
  dependencies = [
1340
1340
  { name = "beautifulsoup4" },
File without changes