socketsecurity 2.2.91__tar.gz → 2.2.93__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 (139) hide show
  1. socketsecurity-2.2.93/.github/dependabot.yml +74 -0
  2. socketsecurity-2.2.93/.github/workflows/dependabot-review.yml +205 -0
  3. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.github/workflows/e2e-test.yml +8 -1
  4. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.github/workflows/python-tests.yml +16 -0
  5. socketsecurity-2.2.93/.gitignore +58 -0
  6. socketsecurity-2.2.93/CHANGELOG.md +130 -0
  7. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/PKG-INFO +1 -1
  8. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/pyproject.toml +1 -1
  9. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/__init__.py +1 -1
  10. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/__init__.py +32 -3
  11. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/core/test_package_and_alerts.py +76 -1
  12. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/e2e/fixtures/simple-npm/package.json +1 -1
  13. socketsecurity-2.2.93/tests/e2e/fixtures/simple-pypi/requirements.txt +3 -0
  14. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/uv.lock +84 -84
  15. socketsecurity-2.2.91/.gitignore +0 -34
  16. socketsecurity-2.2.91/CHANGELOG.md +0 -71
  17. socketsecurity-2.2.91/tests/e2e/fixtures/simple-pypi/requirements.txt +0 -3
  18. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.github/CODEOWNERS +0 -0
  19. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
  20. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
  21. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
  22. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  23. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.github/workflows/docker-stable.yml +0 -0
  24. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.github/workflows/pr-preview.yml +0 -0
  25. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.github/workflows/release.yml +0 -0
  26. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.github/workflows/version-check.yml +0 -0
  27. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.github/zizmor.yml +0 -0
  28. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.hooks/sync_version.py +0 -0
  29. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.pre-commit-config.yaml +0 -0
  30. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/.python-version +0 -0
  31. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/Dockerfile +0 -0
  32. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/LICENSE +0 -0
  33. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/Makefile +0 -0
  34. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/README.md +0 -0
  35. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/docs/ci-cd.md +0 -0
  36. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/docs/cli-reference.md +0 -0
  37. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/docs/development.md +0 -0
  38. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/docs/troubleshooting.md +0 -0
  39. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/examples/config/sarif-dashboard-parity.json +0 -0
  40. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/examples/config/sarif-dashboard-parity.toml +0 -0
  41. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/examples/config/sarif-diff-ci-cd.json +0 -0
  42. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/examples/config/sarif-diff-ci-cd.toml +0 -0
  43. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/examples/config/sarif-instance-detail.json +0 -0
  44. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/examples/config/sarif-instance-detail.toml +0 -0
  45. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/instructions/gitlab-commit-status/uat.md +0 -0
  46. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/pytest.ini +0 -0
  47. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/scripts/build_container.sh +0 -0
  48. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/scripts/build_container_flexible.sh +0 -0
  49. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/scripts/deploy-test-docker.sh +0 -0
  50. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/scripts/deploy-test-pypi.sh +0 -0
  51. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/scripts/docker-entrypoint.sh +0 -0
  52. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/scripts/run.sh +0 -0
  53. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/session.md +0 -0
  54. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socket.yml +0 -0
  55. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/config.py +0 -0
  56. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/alert_selection.py +0 -0
  57. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/classes.py +0 -0
  58. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/cli_client.py +0 -0
  59. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/exceptions.py +0 -0
  60. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/git_interface.py +0 -0
  61. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/helper/__init__.py +0 -0
  62. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/helper/socket_facts_loader.py +0 -0
  63. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/lazy_file_loader.py +0 -0
  64. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/logging.py +0 -0
  65. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/messages.py +0 -0
  66. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/resource_utils.py +0 -0
  67. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/scm/__init__.py +0 -0
  68. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/scm/base.py +0 -0
  69. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/scm/client.py +0 -0
  70. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/scm/github.py +0 -0
  71. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/scm/gitlab.py +0 -0
  72. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/scm_comments.py +0 -0
  73. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/socket_config.py +0 -0
  74. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/tools/reachability.py +0 -0
  75. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/core/utils.py +0 -0
  76. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/fossa_compat.py +0 -0
  77. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/output.py +0 -0
  78. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/plugins/__init__.py +0 -0
  79. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/plugins/base.py +0 -0
  80. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/plugins/formatters/__init__.py +0 -0
  81. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/plugins/formatters/slack.py +0 -0
  82. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/plugins/jira.py +0 -0
  83. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/plugins/manager.py +0 -0
  84. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/plugins/slack.py +0 -0
  85. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/plugins/teams.py +0 -0
  86. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/plugins/webhook.py +0 -0
  87. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/socketsecurity/socketcli.py +0 -0
  88. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/__init__.py +0 -0
  89. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/core/conftest.py +0 -0
  90. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/core/create_diff_input.json +0 -0
  91. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/core/test_diff_alerts.py +0 -0
  92. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/core/test_diff_generation.py +0 -0
  93. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/core/test_has_manifest_files.py +0 -0
  94. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/core/test_sdk_methods.py +0 -0
  95. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/core/test_supporting_methods.py +0 -0
  96. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/data/fullscans/create_response.json +0 -0
  97. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/data/fullscans/diff/stream_diff.json +0 -0
  98. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
  99. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/data/fullscans/head_scan/metadata.json +0 -0
  100. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
  101. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
  102. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/data/fullscans/new_scan/metadata.json +0 -0
  103. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
  104. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/data/repos/repo_info_error.json +0 -0
  105. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/data/repos/repo_info_no_head.json +0 -0
  106. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/data/repos/repo_info_success.json +0 -0
  107. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/data/settings/security-policy.json +0 -0
  108. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/e2e/fixtures/simple-npm/index.js +0 -0
  109. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/e2e/validate-gitlab.sh +0 -0
  110. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/e2e/validate-json.sh +0 -0
  111. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/e2e/validate-reachability.sh +0 -0
  112. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/e2e/validate-sarif.sh +0 -0
  113. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/e2e/validate-scan.sh +0 -0
  114. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/fixtures/fossa/README.md +0 -0
  115. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/fixtures/fossa/fossa-analyze-empty.json +0 -0
  116. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/fixtures/fossa/fossa-analyze-populated.json +0 -0
  117. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/fixtures/fossa/fossa-sbom-empty-deep.json +0 -0
  118. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/fixtures/fossa/fossa-sbom-populated.json +0 -0
  119. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/__init__.py +0 -0
  120. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_alert_selection.py +0 -0
  121. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_cli_config.py +0 -0
  122. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_client.py +0 -0
  123. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_config.py +0 -0
  124. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_dependency_overview.py +0 -0
  125. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_disable_ignore.py +0 -0
  126. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_fossa_compat.py +0 -0
  127. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_fossa_parity.py +0 -0
  128. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_gitlab_auth.py +0 -0
  129. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_gitlab_auth_fallback.py +0 -0
  130. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_gitlab_commit_status.py +0 -0
  131. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_gitlab_format.py +0 -0
  132. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_ignore_telemetry_filtering.py +0 -0
  133. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_output.py +0 -0
  134. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_slack_plugin.py +0 -0
  135. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/tests/unit/test_socketcli.py +0 -0
  136. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/workflows/bitbucket-pipelines.yml +0 -0
  137. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/workflows/buildkite.yml +0 -0
  138. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/workflows/github-actions.yml +0 -0
  139. {socketsecurity-2.2.91 → socketsecurity-2.2.93}/workflows/gitlab-ci.yml +0 -0
@@ -0,0 +1,74 @@
1
+ # Dependabot configuration for socket-python-cli.
2
+ #
3
+ # Design notes:
4
+ # - Python deps are grouped into a weekly PR (minor/patch).
5
+ # - GitHub Actions are grouped similarly into one weekly PR.
6
+ # - Docker (the project Dockerfile) is tracked separately.
7
+ # - 7-day cooldown enforced across all ecosystems.
8
+
9
+ version: 2
10
+ updates:
11
+
12
+ # Main app Python deps (uv-tracked)
13
+ - package-ecosystem: "uv"
14
+ directory: "/"
15
+ schedule:
16
+ interval: "weekly"
17
+ open-pull-requests-limit: 2
18
+ groups:
19
+ python-minor-patch:
20
+ patterns:
21
+ - "*"
22
+ update-types:
23
+ - "minor"
24
+ - "patch"
25
+ python-major:
26
+ patterns:
27
+ - "*"
28
+ update-types:
29
+ - "major"
30
+ labels:
31
+ - "dependencies"
32
+ - "python:uv"
33
+ commit-message:
34
+ prefix: "chore"
35
+ include: "scope"
36
+ cooldown:
37
+ default-days: 7
38
+
39
+ # GitHub Actions used in workflows
40
+ - package-ecosystem: "github-actions"
41
+ directory: "/"
42
+ schedule:
43
+ interval: "weekly"
44
+ open-pull-requests-limit: 2
45
+ groups:
46
+ github-actions-minor-patch:
47
+ patterns:
48
+ - "*"
49
+ update-types:
50
+ - "minor"
51
+ - "patch"
52
+ labels:
53
+ - "dependencies"
54
+ - "github-actions"
55
+ commit-message:
56
+ prefix: "ci"
57
+ include: "scope"
58
+ cooldown:
59
+ default-days: 7
60
+
61
+ # Project Dockerfile base images and pinned binaries
62
+ - package-ecosystem: "docker"
63
+ directory: "/"
64
+ schedule:
65
+ interval: "weekly"
66
+ open-pull-requests-limit: 2
67
+ labels:
68
+ - "dependencies"
69
+ - "docker"
70
+ commit-message:
71
+ prefix: "chore"
72
+ include: "scope"
73
+ cooldown:
74
+ default-days: 7
@@ -0,0 +1,205 @@
1
+ name: dependabot-review
2
+
3
+ # Dependency-update PR guardrails for Dependabot-authored PRs.
4
+ #
5
+ # Runs only on PRs opened by dependabot[bot]. Inspects which files
6
+ # changed, then conditionally runs Socket Firewall (sfw) install smoke
7
+ # jobs for the affected manifests. Because sfw uses the free, anonymous
8
+ # Socket public-data path it needs NO API key, so we can run it from
9
+ # the unprivileged `pull_request` context without pull_request_target
10
+ # or any of its security tradeoffs.
11
+ #
12
+ # Pattern adapted from SocketDev/socket-basics.
13
+
14
+ on:
15
+ pull_request:
16
+ types: [opened, synchronize, reopened, ready_for_review]
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ concurrency:
22
+ group: dependabot-review-${{ github.event.pull_request.number }}
23
+ cancel-in-progress: true
24
+
25
+ jobs:
26
+ inspect:
27
+ if: github.event.pull_request.user.login == 'dependabot[bot]'
28
+ runs-on: ubuntu-latest
29
+ timeout-minutes: 5
30
+ outputs:
31
+ python_deps_changed: ${{ steps.diff.outputs.python_deps_changed }}
32
+ fixture_npm_changed: ${{ steps.diff.outputs.fixture_npm_changed }}
33
+ fixture_pypi_changed: ${{ steps.diff.outputs.fixture_pypi_changed }}
34
+ dockerfile_changed: ${{ steps.diff.outputs.dockerfile_changed }}
35
+ workflow_or_action_changed: ${{ steps.diff.outputs.workflow_or_action_changed }}
36
+ steps:
37
+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
38
+ with:
39
+ fetch-depth: 0
40
+ persist-credentials: false
41
+
42
+ - name: Inspect changed files
43
+ id: diff
44
+ env:
45
+ BASE_SHA: ${{ github.event.pull_request.base.sha }}
46
+ HEAD_SHA: ${{ github.event.pull_request.head.sha }}
47
+ run: |
48
+ CHANGED_FILES="$(git diff --name-only "$BASE_SHA" "$HEAD_SHA")"
49
+
50
+ {
51
+ echo "## Changed files"
52
+ echo '```'
53
+ printf '%s\n' "$CHANGED_FILES"
54
+ echo '```'
55
+ } >> "$GITHUB_STEP_SUMMARY"
56
+
57
+ has_file() {
58
+ local pattern="$1"
59
+ if printf '%s\n' "$CHANGED_FILES" | grep -Eq "$pattern"; then
60
+ echo "true"
61
+ else
62
+ echo "false"
63
+ fi
64
+ }
65
+
66
+ {
67
+ echo "python_deps_changed=$(has_file '^(pyproject\.toml|uv\.lock)$')"
68
+ echo "fixture_npm_changed=$(has_file '^tests/e2e/fixtures/simple-npm/')"
69
+ echo "fixture_pypi_changed=$(has_file '^tests/e2e/fixtures/simple-pypi/')"
70
+ echo "dockerfile_changed=$(has_file '^Dockerfile$')"
71
+ echo "workflow_or_action_changed=$(has_file '^\.github/workflows/|^\.github/dependabot\.yml$')"
72
+ } >> "$GITHUB_OUTPUT"
73
+
74
+ - name: Summarize review expectations
75
+ env:
76
+ PR_URL: ${{ github.event.pull_request.html_url }}
77
+ run: |
78
+ {
79
+ echo "## Dependabot Review Checklist"
80
+ echo "- PR: $PR_URL"
81
+ echo "- Confirm upstream release notes before merge"
82
+ echo "- Do not treat a Dependabot PR as trusted solely because of the actor"
83
+ echo "- This workflow runs in pull_request context only; no publish secrets are exposed"
84
+ } >> "$GITHUB_STEP_SUMMARY"
85
+
86
+ python-sfw-smoke:
87
+ needs: inspect
88
+ if: needs.inspect.outputs.python_deps_changed == 'true'
89
+ runs-on: ubuntu-latest
90
+ timeout-minutes: 15
91
+ steps:
92
+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
93
+ with:
94
+ fetch-depth: 1
95
+ persist-credentials: false
96
+
97
+ - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
98
+ with:
99
+ python-version: "3.12"
100
+
101
+ - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
102
+ with:
103
+ node-version: "20"
104
+
105
+ - name: Install Socket Firewall
106
+ run: npm install -g sfw
107
+
108
+ - name: Install uv
109
+ run: python -m pip install --upgrade pip uv
110
+
111
+ - name: Sync project through Socket Firewall
112
+ run: sfw uv sync --extra test --extra dev
113
+
114
+ - name: Import smoke test
115
+ run: |
116
+ uv run python -c "
117
+ from socketsecurity.socketcli import cli, build_socket_sdk
118
+ from socketsecurity.core import Core
119
+ from socketsecurity.core.exceptions import (
120
+ APIFailure, RequestTimeoutExceeded, APIResourceNotFound,
121
+ )
122
+ from socketsecurity.core.git_interface import Git
123
+ from socketsecurity.config import CliConfig
124
+ print('import smoke OK')
125
+ "
126
+
127
+ fixture-npm-sfw-smoke:
128
+ needs: inspect
129
+ if: needs.inspect.outputs.fixture_npm_changed == 'true'
130
+ runs-on: ubuntu-latest
131
+ timeout-minutes: 15
132
+ steps:
133
+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
134
+ with:
135
+ fetch-depth: 1
136
+ persist-credentials: false
137
+
138
+ - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
139
+ with:
140
+ node-version: "20"
141
+
142
+ - name: Install Socket Firewall
143
+ run: npm install -g sfw
144
+
145
+ - name: Install fixture through Socket Firewall
146
+ working-directory: tests/e2e/fixtures/simple-npm
147
+ run: sfw npm install --no-audit --no-fund --ignore-scripts
148
+
149
+ fixture-pypi-sfw-smoke:
150
+ needs: inspect
151
+ if: needs.inspect.outputs.fixture_pypi_changed == 'true'
152
+ runs-on: ubuntu-latest
153
+ timeout-minutes: 15
154
+ steps:
155
+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
156
+ with:
157
+ fetch-depth: 1
158
+ persist-credentials: false
159
+
160
+ - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
161
+ with:
162
+ python-version: "3.12"
163
+
164
+ - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
165
+ with:
166
+ node-version: "20"
167
+
168
+ - name: Install Socket Firewall
169
+ run: npm install -g sfw
170
+
171
+ - name: Install fixture through Socket Firewall
172
+ working-directory: tests/e2e/fixtures/simple-pypi
173
+ run: |
174
+ python -m venv .venv
175
+ # shellcheck disable=SC1091
176
+ source .venv/bin/activate
177
+ sfw pip install -r requirements.txt
178
+
179
+ dockerfile-smoke:
180
+ needs: inspect
181
+ if: needs.inspect.outputs.dockerfile_changed == 'true'
182
+ runs-on: ubuntu-latest
183
+ timeout-minutes: 20
184
+ steps:
185
+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
186
+ with:
187
+ fetch-depth: 1
188
+ persist-credentials: false
189
+
190
+ - name: Build the Dockerfile (no push)
191
+ run: docker build --pull -t socket-python-cli:dependabot-smoke .
192
+
193
+ workflow-notice:
194
+ needs: inspect
195
+ if: needs.inspect.outputs.workflow_or_action_changed == 'true'
196
+ runs-on: ubuntu-latest
197
+ timeout-minutes: 2
198
+ steps:
199
+ - name: Flag workflow-sensitive updates
200
+ run: |
201
+ {
202
+ echo "## Sensitive File Notice"
203
+ echo "This Dependabot PR changes workflow or dependabot config files."
204
+ echo "Require explicit human review before merge."
205
+ } >> "$GITHUB_STEP_SUMMARY"
@@ -11,7 +11,14 @@ permissions:
11
11
 
12
12
  jobs:
13
13
  e2e:
14
- if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
14
+ # Skip e2e on:
15
+ # - PRs from forks (no secrets)
16
+ # - Dependabot PRs (no secrets, and dependency-bump risk is already
17
+ # covered by dependabot-review.yml's Socket Firewall smoke jobs)
18
+ if: >-
19
+ (github.event_name != 'pull_request' ||
20
+ github.event.pull_request.head.repo.full_name == github.repository) &&
21
+ github.event.pull_request.user.login != 'dependabot[bot]'
15
22
  runs-on: ubuntu-latest
16
23
  strategy:
17
24
  fail-fast: false
@@ -48,8 +48,24 @@ jobs:
48
48
  python -m pip install --upgrade pip
49
49
  pip install uv
50
50
  uv sync --extra test
51
+ - name: 🔒 verify uv.lock is in sync with pyproject.toml
52
+ run: uv lock --locked
51
53
  - name: 🧪 run tests
52
54
  run: uv run pytest -q tests/unit/ tests/core/
55
+ - name: 💨 import smoke (catches API-removal breaks from upgraded deps)
56
+ run: |
57
+ uv run python -c "
58
+ from socketsecurity.socketcli import cli
59
+ from socketsecurity.core import Core
60
+ from socketsecurity.core.exceptions import APIFailure, APIResourceNotFound
61
+ from socketsecurity.core.git_interface import Git
62
+ from socketsecurity.config import CliConfig
63
+ print('import smoke OK')
64
+ "
65
+ - name: 🛡️ pip-audit (known CVEs in the locked deps)
66
+ run: |
67
+ uv export --no-hashes --no-emit-project --format requirements-txt > /tmp/req-audit.txt
68
+ uvx pip-audit --strict --progress-spinner off --disable-pip --no-deps -r /tmp/req-audit.txt
53
69
 
54
70
  unsupported-python-install:
55
71
  runs-on: ubuntu-latest
@@ -0,0 +1,58 @@
1
+ # --- Python bytecode / cache ---
2
+ *.pyc
3
+ __pycache__/
4
+ .coverage
5
+ .coverage.*
6
+ coverage.xml
7
+ htmlcov/
8
+ .pytest_cache/
9
+
10
+ # --- Virtual environments ---
11
+ venv/
12
+ .venv/
13
+ .venv-test/
14
+ Pipfile
15
+
16
+ # --- Build / packaging ---
17
+ *.build
18
+ *.dist
19
+ *.egg-info/
20
+ bin/
21
+ build/
22
+ dist/
23
+ *.zip
24
+
25
+ # --- Editor / IDE ---
26
+ .idea/
27
+ *.swp
28
+ *.swo
29
+
30
+ # --- OS ---
31
+ .DS_Store
32
+
33
+ # --- Logs ---
34
+ logs/
35
+
36
+ # --- Env files ---
37
+ *.env
38
+ .env.local
39
+
40
+ # --- Generated output ---
41
+ *.json
42
+ !tests/**/*.json
43
+ !examples/config/*.json
44
+ *.sarif
45
+ markdown_overview_temp.md
46
+ markdown_security_temp.md
47
+
48
+ # --- Project-specific scratch ---
49
+ ai_testing/
50
+ file_generator.py
51
+ run_container.sh
52
+ scripts/*.py
53
+ test/
54
+ test.py
55
+ verify_find_files_lazy_loading.py
56
+
57
+ # --- Conductor workspace ---
58
+ .context/
@@ -0,0 +1,130 @@
1
+ # Changelog
2
+
3
+ ## 2.2.93
4
+
5
+ - Bundled twelve Dependabot dependency updates: `urllib3`, `gitpython`, `python-dotenv`, `pytest`, `uv`, `cryptography`, `pygments`, `requests`, and `idna` (main app), plus `axios`, `requests`, and `flask` (e2e fixtures). `idna` 3.11 → 3.15 includes the fix for CVE-2026-45409.
6
+ - Added `.github/dependabot.yml` with grouped weekly updates, a 7-day cooldown, and e2e fixtures excluded.
7
+ - Added a `dependabot-review` workflow that runs Socket Firewall (`sfw`) install checks on Dependabot PRs with no API token required.
8
+ - Added a `uv.lock` drift check, an import smoke test, and `pip-audit` to the test workflow; skipped e2e tests on Dependabot PRs.
9
+ - Tidied `.gitignore` and backfilled missing CHANGELOG entries for `2.2.81`, `2.2.85`, `2.2.86`, `2.2.88`, `2.2.89`, `2.2.91`, and `2.2.92`.
10
+
11
+ ## 2.2.92
12
+
13
+ - Fixed dependency-overview rendering for unmapped alert types: alert types the SDK
14
+ has no metadata for now fall back to a humanized Title-Cased label (e.g.
15
+ `gptDidYouMean` -> "Possible typosquat attack (GPT)", `SQLInjection` -> "SQL
16
+ Injection") instead of surfacing the raw camelCase identifier.
17
+
18
+ ## 2.2.91
19
+
20
+ - Added legal/compliance artifact presets (`--legal`) and FOSSA-compatible output
21
+ shapes (`--legal-format fossa`) for license and SBOM reporting.
22
+
23
+ ## 2.2.90
24
+
25
+ - Migrated license enrichment PURL lookup to the org-scoped endpoint (`POST /v0/orgs/{slug}/purl`) from the deprecated global endpoint (`POST /v0/purl`).
26
+
27
+ ## 2.2.89
28
+
29
+ - Added `uv.lock` to the version-incrementation CI check so a `pyproject.toml` /
30
+ `__init__.py` version bump without a matching lockfile sync no longer slips through.
31
+ - Updated the local Python pre-commit hook to keep `uv.lock` in sync with
32
+ `pyproject.toml` and `socketsecurity/__init__.py` version changes automatically.
33
+
34
+ ## 2.2.88
35
+
36
+ - Added `bun.lock`, `bun.lockb`, and `vlt-lock.json` to the recognized manifest files
37
+ for Socket scanning, with matching unit-test coverage.
38
+
39
+ ## 2.2.86
40
+
41
+ - Bumped `socketdev` to `>=3.0.33,<4.0.0` to pick up the SDK fix for unknown alert
42
+ categories (the SDK previously crashed while deserializing diff alerts when the API
43
+ returned a category like `"other"`).
44
+ - Normalized diff artifacts with `score=None` to an empty score map in the CLI model
45
+ layer; PR-comment dependency-overview rendering no longer crashes on missing or
46
+ partial score data.
47
+ - Defaulted missing badge values to a valid `100%` fallback rather than producing
48
+ invalid badge URLs.
49
+
50
+ ## 2.2.85
51
+
52
+ - Added four hidden `--reach-continue-on-*` flags in preparation for Coana CLI v15:
53
+ `--reach-continue-on-analysis-errors`, `--reach-continue-on-install-errors`,
54
+ `--reach-continue-on-missing-lock-files`, `--reach-continue-on-no-source-files`.
55
+ Each forwards to the matching Coana flag and opts out of one of Coana v15's new
56
+ halt-by-default behaviors. No-op against today's default Coana version; will take
57
+ effect automatically once Coana v15 becomes the default.
58
+
59
+ ## 2.2.83
60
+
61
+ - Fixed branch detection in detached-HEAD CI checkouts. When `git name-rev --name-only HEAD` returned an output with a suffix operator (e.g. `remotes/origin/master~1`, `master^0`), the `~N`/`^N` was previously passed through as the branch name and rejected by the Socket API as an invalid Git ref. The suffix is now stripped before the prefix split, producing the bare branch name.
62
+
63
+ ## 2.2.81
64
+
65
+ - Fixed GitLab security report schema compliance: corrected schema validation errors so
66
+ Socket-produced reports parse cleanly under GitLab's dependency-scanning ingestion.
67
+ - Populated scan alert data in the GitLab security report so previously-empty alert
68
+ sections now carry the expected findings.
69
+
70
+ ## 2.2.80
71
+
72
+ - Hardened GitHub Actions workflows.
73
+ - Fixed broken links on PyPI page.
74
+
75
+ ## 2.2.79
76
+
77
+ - Updated minimum required Python version.
78
+ - Tweaked CI checks.
79
+
80
+ ## 2.2.78
81
+
82
+ - Fixed reachability filtering.
83
+ - Added config file support.
84
+
85
+ ## 2.2.77
86
+
87
+ - Fixed `has_manifest_files` failing to match root-level manifest files.
88
+
89
+ ## 2.2.76
90
+
91
+ - Added SARIF file output support.
92
+ - Improved reachability filtering.
93
+
94
+ ## 2.2.75
95
+
96
+ - Fixed `workspace` flag regression by updating SDK dependency.
97
+
98
+ ## 2.2.74
99
+
100
+ - Added `--workspace` flag to CLI args.
101
+ - Added GitLab branch protection flag.
102
+ - Added e2e tests for full scans and full scans with reachability.
103
+ - Bumped dependencies: `cryptography`, `virtualenv`, `filelock`, `urllib3`.
104
+
105
+ ## 2.2.71
106
+
107
+ - Added `strace` to the Docker image for debugging purposes.
108
+
109
+ ## 2.2.70
110
+
111
+ - Set the scan to `'socket_tier1'` when using the `--reach` flag. This ensures Tier 1 scans are properly integrated into the organization-wide alerts.
112
+
113
+ ## 2.2.69
114
+
115
+ - Added `--reach-enable-analysis-splitting` flag to enable analysis splitting (disabled by default).
116
+ - Added `--reach-detailed-analysis-log-file` flag to print detailed analysis log file path.
117
+ - Added `--reach-lazy-mode` flag to enable lazy mode for reachability analysis.
118
+ - Changed default behavior: analysis splitting is now disabled by default. The old `--reach-disable-analysis-splitting` flag is kept as a hidden no-op for backwards compatibility.
119
+
120
+ ## 2.2.64
121
+
122
+ - Included PyPy in the Docker image.
123
+
124
+ ## 2.2.57
125
+
126
+ - Fixed Dockerfile to set `GOROOT` to `/usr/lib/go` when using system Go (`GO_VERSION=system`) instead of always using `/usr/local/go`.
127
+
128
+ ## 2.2.56
129
+
130
+ - Removed process timeout from reachability analysis subprocess. Timeouts are now only passed to the Coana CLI via the `--analysis-timeout` flag.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: socketsecurity
3
- Version: 2.2.91
3
+ Version: 2.2.93
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>
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
 
7
7
  [project]
8
8
  name = "socketsecurity"
9
- version = "2.2.91"
9
+ version = "2.2.93"
10
10
  requires-python = ">= 3.11"
11
11
  license = {"file" = "LICENSE"}
12
12
  dependencies = [
@@ -1,3 +1,3 @@
1
1
  __author__ = 'socket.dev'
2
- __version__ = '2.2.91'
2
+ __version__ = '2.2.93'
3
3
  USER_AGENT = f'SocketPythonCLI/{__version__}'
@@ -1,5 +1,6 @@
1
1
  import logging
2
2
  import os
3
+ import re
3
4
  import sys
4
5
  import tarfile
5
6
  import tempfile
@@ -44,6 +45,26 @@ __all__ = [
44
45
  version = __version__
45
46
  log = logging.getLogger("socketdev")
46
47
 
48
+ _ALERT_TYPE_TITLE_OVERRIDES = {
49
+ "gptDidYouMean": "Possible typosquat attack (GPT)",
50
+ }
51
+
52
+ _HUMANIZE_BOUNDARY = re.compile(r"(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])")
53
+
54
+
55
+ def _humanize_alert_type(alert_type: str) -> str:
56
+ """Convert a camelCase/PascalCase alert type into a Title-Cased label.
57
+
58
+ Used as a last-resort fallback when the SDK does not have metadata for an
59
+ alert type and there is no explicit override. Adjacent capitals are kept
60
+ together so acronyms like 'SQL' survive ('SQLInjection' -> 'SQL Injection').
61
+ """
62
+ if not alert_type:
63
+ return ""
64
+ parts = _HUMANIZE_BOUNDARY.split(alert_type)
65
+ return " ".join(part[:1].upper() + part[1:] for part in parts if part)
66
+
67
+
47
68
  class Core:
48
69
  """Main class for interacting with Socket Security API and processing scan results."""
49
70
 
@@ -1402,11 +1423,19 @@ class Core:
1402
1423
  alert = Alert(**alert_item)
1403
1424
  props = getattr(self.config.all_issues, alert.type, default_props)
1404
1425
  introduced_by = self.get_source_data(package, packages)
1405
-
1406
- # Handle special case for license policy violations
1426
+
1427
+ # Title resolution order:
1428
+ # 1. SDK-provided title (props.title) if non-empty
1429
+ # 2. Explicit override for known-but-unmapped alert types (e.g. gptDidYouMean)
1430
+ # 3. Hard-coded special cases (e.g. licenseSpdxDisj)
1431
+ # 4. Humanized alert.type as last-resort fallback
1407
1432
  title = props.title
1408
- if alert.type == "licenseSpdxDisj" and not title:
1433
+ if not title:
1434
+ title = _ALERT_TYPE_TITLE_OVERRIDES.get(alert.type, "")
1435
+ if not title and alert.type == "licenseSpdxDisj":
1409
1436
  title = "License Policy Violation"
1437
+ if not title:
1438
+ title = _humanize_alert_type(alert.type)
1410
1439
 
1411
1440
  issue_alert = Issue(
1412
1441
  pkg_type=package.type,
@@ -4,7 +4,7 @@ from unittest.mock import Mock
4
4
  import pytest
5
5
  from socketdev import socketdev
6
6
 
7
- from socketsecurity.core import Core
7
+ from socketsecurity.core import Core, _humanize_alert_type
8
8
  from socketsecurity.core.classes import Issue, Package
9
9
  from socketsecurity.core.socket_config import SocketConfig
10
10
 
@@ -166,6 +166,62 @@ class TestPackageAndAlerts:
166
166
  assert alert.type == "networkAccess"
167
167
  assert alert.severity == "high"
168
168
 
169
+ def test_gpt_did_you_mean_gets_typosquat_title(self, core):
170
+ """gptDidYouMean alerts must render a non-empty title (CUS2-2)."""
171
+ package = self.make_package(
172
+ alerts=[{
173
+ "type": "gptDidYouMean",
174
+ "key": "gpt-did-you-mean-alert",
175
+ "severity": "middle",
176
+ }],
177
+ topLevelAncestors=[],
178
+ )
179
+
180
+ result = core.add_package_alerts_to_collection(
181
+ package, alerts_collection={}, packages={package.id: package}
182
+ )
183
+
184
+ alert = result["gpt-did-you-mean-alert"][0]
185
+ assert alert.type == "gptDidYouMean"
186
+ assert alert.title, "title should not be empty for gptDidYouMean"
187
+ assert "typosquat" in alert.title.lower()
188
+
189
+ def test_unknown_alert_type_falls_back_to_humanized_title(self, core):
190
+ """Any alert type not present in the SDK should still render a non-empty title."""
191
+ package = self.make_package(
192
+ alerts=[{
193
+ "type": "someBrandNewAlertType",
194
+ "key": "future-alert",
195
+ "severity": "low",
196
+ }],
197
+ topLevelAncestors=[],
198
+ )
199
+
200
+ result = core.add_package_alerts_to_collection(
201
+ package, alerts_collection={}, packages={package.id: package}
202
+ )
203
+
204
+ alert = result["future-alert"][0]
205
+ assert alert.title == "Some Brand New Alert Type"
206
+
207
+ def test_license_spdx_disj_keeps_explicit_title(self, core):
208
+ """licenseSpdxDisj must keep its hard-coded fallback (regression guard for CUS2-2 fix)."""
209
+ package = self.make_package(
210
+ alerts=[{
211
+ "type": "licenseSpdxDisj",
212
+ "key": "license-alert",
213
+ "severity": "high",
214
+ }],
215
+ topLevelAncestors=[],
216
+ )
217
+
218
+ result = core.add_package_alerts_to_collection(
219
+ package, alerts_collection={}, packages={package.id: package}
220
+ )
221
+
222
+ alert = result["license-alert"][0]
223
+ assert alert.title == "License Policy Violation"
224
+
169
225
 
170
226
 
171
227
  def test_get_capabilities_for_added_packages(self, core):
@@ -266,3 +322,22 @@ class TestPackageAndAlerts:
266
322
  )
267
323
  assert result["npm/lodash@4.18.1"].licenseAttrib == [{"name": "MIT"}]
268
324
  assert result["npm/lodash@4.18.1"].licenseDetails == [{"license": "MIT"}]
325
+
326
+
327
+ class TestHumanizeAlertType:
328
+ def test_humanizes_camel_case(self):
329
+ assert _humanize_alert_type("gptDidYouMean") == "Gpt Did You Mean"
330
+
331
+ def test_humanizes_single_word(self):
332
+ assert _humanize_alert_type("malware") == "Malware"
333
+
334
+ def test_humanizes_pascal_case(self):
335
+ assert _humanize_alert_type("UnsafeShellAccess") == "Unsafe Shell Access"
336
+
337
+ def test_empty_input_returns_empty_string(self):
338
+ assert _humanize_alert_type("") == ""
339
+
340
+ def test_handles_acronyms_conservatively(self):
341
+ """Adjacent capitals are kept together: SQLInjection -> 'SQL Injection'."""
342
+ assert _humanize_alert_type("SQLInjection") == "SQL Injection"
343
+