socketsecurity 2.2.8__tar.gz → 2.2.18__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 (87) hide show
  1. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.github/workflows/pr-preview.yml +8 -8
  2. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.github/workflows/release.yml +7 -7
  3. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.github/workflows/version-check.yml +2 -2
  4. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/PKG-INFO +92 -17
  5. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/README.md +89 -15
  6. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/pyproject.toml +4 -3
  7. socketsecurity-2.2.18/socketsecurity/__init__.py +3 -0
  8. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/config.py +126 -1
  9. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/__init__.py +40 -29
  10. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/cli_client.py +2 -1
  11. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/helper/__init__.py +2 -1
  12. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/resource_utils.py +21 -8
  13. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/scm/client.py +3 -2
  14. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/scm/github.py +2 -1
  15. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/scm/gitlab.py +8 -7
  16. socketsecurity-2.2.18/socketsecurity/core/tools/reachability.py +234 -0
  17. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/socketcli.py +196 -12
  18. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/unit/test_gitlab_auth.py +2 -1
  19. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/uv.lock +41 -5
  20. socketsecurity-2.2.8/Pipfile.lock +0 -20
  21. socketsecurity-2.2.8/socketsecurity/__init__.py +0 -2
  22. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.github/CODEOWNERS +0 -0
  23. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
  24. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
  25. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
  26. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  27. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.github/workflows/docker-stable.yml +0 -0
  28. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.gitignore +0 -0
  29. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.hooks/sync_version.py +0 -0
  30. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.pre-commit-config.yaml +0 -0
  31. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/.python-version +0 -0
  32. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/Dockerfile +0 -0
  33. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/LICENSE +0 -0
  34. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/Makefile +0 -0
  35. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/docs/README.md +0 -0
  36. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/pytest.ini +0 -0
  37. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/scripts/build_container.sh +0 -0
  38. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/scripts/deploy-test-docker.sh +0 -0
  39. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/scripts/deploy-test-pypi.sh +0 -0
  40. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/scripts/run.sh +0 -0
  41. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/classes.py +0 -0
  42. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/exceptions.py +0 -0
  43. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/git_interface.py +0 -0
  44. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/lazy_file_loader.py +0 -0
  45. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/logging.py +0 -0
  46. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/messages.py +0 -0
  47. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/scm/__init__.py +0 -0
  48. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/scm/base.py +0 -0
  49. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/scm_comments.py +0 -0
  50. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/socket_config.py +0 -0
  51. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/core/utils.py +0 -0
  52. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/output.py +0 -0
  53. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/plugins/__init__.py +0 -0
  54. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/plugins/base.py +0 -0
  55. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/plugins/jira.py +0 -0
  56. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/plugins/manager.py +0 -0
  57. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/plugins/slack.py +0 -0
  58. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/plugins/teams.py +0 -0
  59. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/socketsecurity/plugins/webhook.py +0 -0
  60. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/__init__.py +0 -0
  61. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/core/conftest.py +0 -0
  62. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/core/create_diff_input.json +0 -0
  63. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/core/test_diff_generation.py +0 -0
  64. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/core/test_package_and_alerts.py +0 -0
  65. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/core/test_sdk_methods.py +0 -0
  66. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/core/test_supporting_methods.py +0 -0
  67. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/data/fullscans/create_response.json +0 -0
  68. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/data/fullscans/diff/stream_diff.json +0 -0
  69. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
  70. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/data/fullscans/head_scan/metadata.json +0 -0
  71. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
  72. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
  73. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/data/fullscans/new_scan/metadata.json +0 -0
  74. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
  75. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/data/repos/repo_info_error.json +0 -0
  76. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/data/repos/repo_info_no_head.json +0 -0
  77. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/data/repos/repo_info_success.json +0 -0
  78. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/data/settings/security-policy.json +0 -0
  79. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/unit/__init__.py +0 -0
  80. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/unit/test_cli_config.py +0 -0
  81. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/unit/test_client.py +0 -0
  82. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/unit/test_config.py +0 -0
  83. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/unit/test_gitlab_auth_fallback.py +0 -0
  84. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/tests/unit/test_output.py +0 -0
  85. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/workflows/bitbucket-pipelines.yml +0 -0
  86. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/workflows/github-actions.yml +0 -0
  87. {socketsecurity-2.2.8 → socketsecurity-2.2.18}/workflows/gitlab-ci.yml +0 -0
@@ -11,10 +11,10 @@ jobs:
11
11
  contents: read
12
12
  pull-requests: write
13
13
  steps:
14
- - uses: actions/checkout@v4
14
+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
15
15
  with:
16
16
  fetch-depth: 0
17
- - uses: actions/setup-python@v5
17
+ - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
18
18
  with:
19
19
  python-version: '3.x'
20
20
 
@@ -43,14 +43,14 @@ jobs:
43
43
 
44
44
  - name: Publish to Test PyPI
45
45
  if: steps.version_check.outputs.exists != 'true'
46
- uses: pypa/gh-action-pypi-publish@v1.12.4
46
+ uses: pypa/gh-action-pypi-publish@ab69e431e9c9f48a3310be0a56527c679f56e04d
47
47
  with:
48
48
  repository-url: https://test.pypi.org/legacy/
49
49
  verbose: true
50
50
 
51
51
  - name: Comment on PR
52
52
  if: steps.version_check.outputs.exists != 'true'
53
- uses: actions/github-script@v7
53
+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
54
54
  env:
55
55
  VERSION: ${{ env.VERSION }}
56
56
  with:
@@ -120,21 +120,21 @@ jobs:
120
120
  exit 1
121
121
 
122
122
  - name: Set up QEMU
123
- uses: docker/setup-qemu-action@v3
123
+ uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
124
124
 
125
125
  - name: Set up Docker Buildx
126
- uses: docker/setup-buildx-action@v3
126
+ uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349
127
127
 
128
128
  - name: Login to Docker Hub with Organization Token
129
129
  if: steps.verify_package.outputs.success == 'true'
130
- uses: docker/login-action@v3
130
+ uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
131
131
  with:
132
132
  username: ${{ secrets.DOCKERHUB_USERNAME }}
133
133
  password: ${{ secrets.DOCKERHUB_TOKEN }}
134
134
 
135
135
  - name: Build & Push Docker Preview
136
136
  if: steps.verify_package.outputs.success == 'true'
137
- uses: docker/build-push-action@v5
137
+ uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
138
138
  env:
139
139
  VERSION: ${{ env.VERSION }}
140
140
  with:
@@ -10,10 +10,10 @@ jobs:
10
10
  id-token: write
11
11
  contents: read
12
12
  steps:
13
- - uses: actions/checkout@v4
13
+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
14
14
  with:
15
15
  fetch-depth: 0
16
- - uses: actions/setup-python@v5
16
+ - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
17
17
  with:
18
18
  python-version: '3.x'
19
19
 
@@ -66,16 +66,16 @@ jobs:
66
66
 
67
67
  - name: Publish to PyPI
68
68
  if: steps.version_check.outputs.pypi_exists != 'true'
69
- uses: pypa/gh-action-pypi-publish@v1.12.4
69
+ uses: pypa/gh-action-pypi-publish@ab69e431e9c9f48a3310be0a56527c679f56e04d
70
70
 
71
71
  - name: Set up QEMU
72
- uses: docker/setup-qemu-action@v3
72
+ uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
73
73
 
74
74
  - name: Set up Docker Buildx
75
- uses: docker/setup-buildx-action@v3
75
+ uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349
76
76
 
77
77
  - name: Login to Docker Hub with Organization Token
78
- uses: docker/login-action@v3
78
+ uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
79
79
  with:
80
80
  username: ${{ secrets.DOCKERHUB_USERNAME }}
81
81
  password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -102,7 +102,7 @@ jobs:
102
102
  if: |
103
103
  steps.verify_package.outputs.success == 'true' &&
104
104
  steps.docker_check.outputs.docker_exists != 'true'
105
- uses: docker/build-push-action@v5
105
+ uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
106
106
  env:
107
107
  VERSION: ${{ env.VERSION }}
108
108
  with:
@@ -11,7 +11,7 @@ jobs:
11
11
  check_version:
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
- - uses: actions/checkout@v4
14
+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
15
15
  with:
16
16
  fetch-depth: 0 # Fetch all history for all branches
17
17
 
@@ -39,7 +39,7 @@ jobs:
39
39
  "
40
40
 
41
41
  - name: Manage PR Comment
42
- uses: actions/github-script@v7
42
+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
43
43
  if: always()
44
44
  env:
45
45
  MAIN_VERSION: ${{ env.MAIN_VERSION }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: socketsecurity
3
- Version: 2.2.8
3
+ Version: 2.2.18
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>
@@ -33,13 +33,14 @@ Classifier: Intended Audience :: Developers
33
33
  Classifier: Programming Language :: Python :: 3.11
34
34
  Classifier: Programming Language :: Python :: 3.12
35
35
  Requires-Python: >=3.10
36
+ Requires-Dist: bs4>=0.0.2
36
37
  Requires-Dist: gitpython
37
38
  Requires-Dist: mdutils
38
39
  Requires-Dist: packaging
39
40
  Requires-Dist: prettytable
40
41
  Requires-Dist: python-dotenv
41
42
  Requires-Dist: requests
42
- Requires-Dist: socketdev<4.0.0,>=3.0.5
43
+ Requires-Dist: socketdev<4.0.0,>=3.0.6
43
44
  Provides-Extra: dev
44
45
  Requires-Dist: hatch; extra == 'dev'
45
46
  Requires-Dist: pre-commit; extra == 'dev'
@@ -97,15 +98,64 @@ Pre-configured workflow examples are available in the [`workflows/`](workflows/)
97
98
 
98
99
  These examples are production-ready and include best practices for each platform.
99
100
 
101
+ ## Monorepo Workspace Support
102
+
103
+ The Socket CLI supports scanning specific workspaces within monorepo structures while preserving git context from the repository root. This is useful for organizations that maintain multiple applications or services in a single repository.
104
+
105
+ ### Key Features
106
+
107
+ - **Multiple Sub-paths**: Specify multiple `--sub-path` options to scan different directories within your monorepo
108
+ - **Combined Workspace**: All sub-paths are scanned together as a single workspace in Socket
109
+ - **Git Context Preserved**: Repository metadata (commits, branches, etc.) comes from the main target-path
110
+ - **Workspace Naming**: Use `--workspace-name` to differentiate scans from different parts of your monorepo
111
+
112
+ ### Usage Examples
113
+
114
+ **Scan multiple frontend and backend workspaces:**
115
+ ```bash
116
+ socketcli --target-path /path/to/monorepo \
117
+ --sub-path frontend \
118
+ --sub-path backend \
119
+ --sub-path services/api \
120
+ --workspace-name main-app
121
+ ```
122
+
123
+ **GitHub Actions for monorepo workspace:**
124
+ ```bash
125
+ socketcli --target-path $GITHUB_WORKSPACE \
126
+ --sub-path packages/web \
127
+ --sub-path packages/mobile \
128
+ --workspace-name mobile-web \
129
+ --scm github \
130
+ --pr-number $PR_NUMBER
131
+ ```
132
+
133
+ This will:
134
+ - Scan manifest files in `./packages/web/` and `./packages/mobile/`
135
+ - Combine them into a single workspace scan
136
+ - Create a repository in Socket named like `my-repo-mobile-web`
137
+ - Preserve git context (commits, branch info) from the repository root
138
+
139
+ ### Requirements
140
+
141
+ - Both `--sub-path` and `--workspace-name` must be specified together
142
+ - `--sub-path` can be used multiple times to include multiple directories
143
+ - All specified sub-paths must exist within the target-path
144
+
100
145
  ## Usage
101
146
 
102
147
  ```` shell
103
- socketcli [-h] [--api-token API_TOKEN] [--repo REPO] [--integration {api,github,gitlab}] [--owner OWNER] [--branch BRANCH]
104
- [--committers [COMMITTERS ...]] [--pr-number PR_NUMBER] [--commit-message COMMIT_MESSAGE] [--commit-sha COMMIT_SHA]
105
- [--target-path TARGET_PATH] [--sbom-file SBOM_FILE] [--files FILES] [--save-submitted-files-list SAVE_SUBMITTED_FILES_LIST]
106
- [--default-branch] [--pending-head] [--generate-license] [--enable-debug] [--enable-json] [--enable-sarif]
107
- [--disable-overview] [--disable-security-issue] [--allow-unverified] [--ignore-commit-files] [--disable-blocking]
108
- [--scm SCM] [--timeout TIMEOUT] [--exclude-license-details]
148
+ socketcli [-h] [--api-token API_TOKEN] [--repo REPO] [--repo-is-public] [--branch BRANCH] [--integration {api,github,gitlab,azure,bitbucket}]
149
+ [--owner OWNER] [--pr-number PR_NUMBER] [--commit-message COMMIT_MESSAGE] [--commit-sha COMMIT_SHA] [--committers [COMMITTERS ...]]
150
+ [--target-path TARGET_PATH] [--sbom-file SBOM_FILE] [--license-file-name LICENSE_FILE_NAME] [--save-submitted-files-list SAVE_SUBMITTED_FILES_LIST]
151
+ [--save-manifest-tar SAVE_MANIFEST_TAR] [--files FILES] [--sub-path SUB_PATH] [--workspace-name WORKSPACE_NAME]
152
+ [--excluded-ecosystems EXCLUDED_ECOSYSTEMS] [--default-branch] [--pending-head] [--generate-license] [--enable-debug]
153
+ [--enable-json] [--enable-sarif] [--disable-overview] [--exclude-license-details] [--allow-unverified] [--disable-security-issue]
154
+ [--ignore-commit-files] [--disable-blocking] [--enable-diff] [--scm SCM] [--timeout TIMEOUT] [--include-module-folders]
155
+ [--reach] [--reach-version REACH_VERSION] [--reach-analysis-timeout REACH_ANALYSIS_TIMEOUT]
156
+ [--reach-analysis-memory-limit REACH_ANALYSIS_MEMORY_LIMIT] [--reach-ecosystems REACH_ECOSYSTEMS] [--reach-exclude-paths REACH_EXCLUDE_PATHS]
157
+ [--reach-min-severity {low,medium,high,critical}] [--reach-skip-cache] [--reach-disable-analytics] [--reach-output-file REACH_OUTPUT_FILE]
158
+ [--only-facts-file] [--version]
109
159
  ````
110
160
 
111
161
  If you don't want to provide the Socket API Token every time then you can use the environment variable `SOCKET_SECURITY_API_KEY`
@@ -121,11 +171,11 @@ If you don't want to provide the Socket API Token every time then you can use th
121
171
  | Parameter | Required | Default | Description |
122
172
  |:-----------------|:---------|:--------|:------------------------------------------------------------------------|
123
173
  | --repo | False | *auto* | Repository name in owner/repo format (auto-detected from git remote) |
124
- | --integration | False | api | Integration type (api, github, gitlab) |
174
+ | --repo-is-public | False | False | If set, flags a new repository creation as public. Defaults to false. |
175
+ | --integration | False | api | Integration type (api, github, gitlab, azure, bitbucket) |
125
176
  | --owner | False | | Name of the integration owner, defaults to the socket organization slug |
126
177
  | --branch | False | *auto* | Branch name (auto-detected from git) |
127
178
  | --committers | False | *auto* | Committer(s) to filter by (auto-detected from git commit) |
128
- | --repo-is-public | False | False | If set, flags a new repository creation as public. Defaults to false. |
129
179
 
130
180
  #### Pull Request and Commit
131
181
  | Parameter | Required | Default | Description |
@@ -139,17 +189,20 @@ If you don't want to provide the Socket API Token every time then you can use th
139
189
  |:----------------------------|:---------|:----------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
140
190
  | --target-path | False | ./ | Target path for analysis |
141
191
  | --sbom-file | False | | SBOM file path |
142
- | --files | False | *auto* | Files to analyze (JSON array string). Auto-detected from git commit changes when not specified |
143
- | --excluded-ecosystems | False | [] | List of ecosystems to exclude from analysis (JSON array string). You can get supported files from the [Supported Files API](https://docs.socket.dev/reference/getsupportedfiles) |
144
192
  | --license-file-name | False | `license_output.json` | Name of the file to save the license details to if enabled |
145
193
  | --save-submitted-files-list | False | | Save list of submitted file names to JSON file for debugging purposes |
146
194
  | --save-manifest-tar | False | | Save all manifest files to a compressed tar.gz archive with original directory structure |
195
+ | --files | False | *auto* | Files to analyze (JSON array string). Auto-detected from git commit changes when not specified |
196
+ | --sub-path | False | | Sub-path within target-path for manifest file scanning (can be specified multiple times). All sub-paths are combined into a single workspace scan while preserving git context from target-path. Must be used with --workspace-name |
197
+ | --workspace-name | False | | Workspace name suffix to append to repository name (repo-name-workspace_name). Must be used with --sub-path |
198
+ | --excluded-ecosystems | False | [] | List of ecosystems to exclude from analysis (JSON array string). You can get supported files from the [Supported Files API](https://docs.socket.dev/reference/getsupportedfiles) |
147
199
 
148
200
  #### Branch and Scan Configuration
149
- | Parameter | Required | Default | Description |
150
- |:-----------------|:---------|:--------|:------------------------------------------------------------------------------------------------------|
151
- | --default-branch | False | *auto* | Make this branch the default branch (auto-detected from git and CI environment when not specified) |
152
- | --pending-head | False | *auto* | If true, the new scan will be set as the branch's head scan (automatically synced with default-branch) |
201
+ | Parameter | Required | Default | Description |
202
+ |:-------------------------|:---------|:--------|:------------------------------------------------------------------------------------------------------|
203
+ | --default-branch | False | *auto* | Make this branch the default branch (auto-detected from git and CI environment when not specified) |
204
+ | --pending-head | False | *auto* | If true, the new scan will be set as the branch's head scan (automatically synced with default-branch) |
205
+ | --include-module-folders | False | False | If enabled will include manifest files from folders like node_modules |
153
206
 
154
207
  #### Output Configuration
155
208
  | Parameter | Required | Default | Description |
@@ -160,6 +213,7 @@ If you don't want to provide the Socket API Token every time then you can use th
160
213
  | --enable-sarif | False | False | Enable SARIF output of results instead of table or JSON format |
161
214
  | --disable-overview | False | False | Disable overview output |
162
215
  | --exclude-license-details | False | False | Exclude license details from the diff report (boosts performance for large repos) |
216
+ | --version | False | False | Show program's version number and exit |
163
217
 
164
218
  #### Security Configuration
165
219
  | Parameter | Required | Default | Description |
@@ -167,6 +221,28 @@ If you don't want to provide the Socket API Token every time then you can use th
167
221
  | --allow-unverified | False | False | Allow unverified packages |
168
222
  | --disable-security-issue | False | False | Disable security issue checks |
169
223
 
224
+ #### Reachability Analysis
225
+ | Parameter | Required | Default | Description |
226
+ |:---------------------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------------------------------|
227
+ | --reach | False | False | Enable reachability analysis to identify which vulnerable functions are actually called by your code |
228
+ | --reach-version | False | latest | Version of @coana-tech/cli to use for analysis |
229
+ | --reach-analysis-timeout | False | 1200 | Timeout in seconds for the reachability analysis (default: 1200 seconds / 20 minutes) |
230
+ | --reach-analysis-memory-limit | False | 4096 | Memory limit in MB for the reachability analysis (default: 4096 MB / 4 GB) |
231
+ | --reach-ecosystems | False | | Comma-separated list of ecosystems to analyze (e.g., "npm,pypi"). If not specified, all supported ecosystems are analyzed |
232
+ | --reach-exclude-paths | False | | Comma-separated list of file paths or patterns to exclude from reachability analysis |
233
+ | --reach-min-severity | False | | Minimum severity level for reporting reachability results (low, medium, high, critical) |
234
+ | --reach-skip-cache | False | False | Skip cache and force fresh reachability analysis |
235
+ | --reach-disable-analytics | False | False | Disable analytics collection during reachability analysis |
236
+ | --reach-output-file | False | .socket.facts.json | Path where reachability analysis results should be saved |
237
+ | --only-facts-file | False | False | Submit only the .socket.facts.json file to an existing scan (requires --reach and a prior scan) |
238
+
239
+ **Reachability Analysis Requirements:**
240
+ - `npm` - Required to install and run @coana-tech/cli
241
+ - `npx` - Required to execute @coana-tech/cli
242
+ - `uv` - Required for Python environment management
243
+
244
+ The CLI will automatically install @coana-tech/cli if not present. Use `--reach` to enable reachability analysis during a full scan, or use `--only-facts-file` with `--reach` to submit reachability results to an existing scan.
245
+
170
246
  #### Advanced Configuration
171
247
  | Parameter | Required | Default | Description |
172
248
  |:-------------------------|:---------|:--------|:----------------------------------------------------------------------|
@@ -175,7 +251,6 @@ If you don't want to provide the Socket API Token every time then you can use th
175
251
  | --enable-diff | False | False | Enable diff mode even when using --integration api (forces diff mode without SCM integration) |
176
252
  | --scm | False | api | Source control management type |
177
253
  | --timeout | False | | Timeout in seconds for API requests |
178
- | --include-module-folders | False | False | If enabled will include manifest files from folders like node_modules |
179
254
 
180
255
  #### Plugins
181
256
 
@@ -41,15 +41,64 @@ Pre-configured workflow examples are available in the [`workflows/`](workflows/)
41
41
 
42
42
  These examples are production-ready and include best practices for each platform.
43
43
 
44
+ ## Monorepo Workspace Support
45
+
46
+ The Socket CLI supports scanning specific workspaces within monorepo structures while preserving git context from the repository root. This is useful for organizations that maintain multiple applications or services in a single repository.
47
+
48
+ ### Key Features
49
+
50
+ - **Multiple Sub-paths**: Specify multiple `--sub-path` options to scan different directories within your monorepo
51
+ - **Combined Workspace**: All sub-paths are scanned together as a single workspace in Socket
52
+ - **Git Context Preserved**: Repository metadata (commits, branches, etc.) comes from the main target-path
53
+ - **Workspace Naming**: Use `--workspace-name` to differentiate scans from different parts of your monorepo
54
+
55
+ ### Usage Examples
56
+
57
+ **Scan multiple frontend and backend workspaces:**
58
+ ```bash
59
+ socketcli --target-path /path/to/monorepo \
60
+ --sub-path frontend \
61
+ --sub-path backend \
62
+ --sub-path services/api \
63
+ --workspace-name main-app
64
+ ```
65
+
66
+ **GitHub Actions for monorepo workspace:**
67
+ ```bash
68
+ socketcli --target-path $GITHUB_WORKSPACE \
69
+ --sub-path packages/web \
70
+ --sub-path packages/mobile \
71
+ --workspace-name mobile-web \
72
+ --scm github \
73
+ --pr-number $PR_NUMBER
74
+ ```
75
+
76
+ This will:
77
+ - Scan manifest files in `./packages/web/` and `./packages/mobile/`
78
+ - Combine them into a single workspace scan
79
+ - Create a repository in Socket named like `my-repo-mobile-web`
80
+ - Preserve git context (commits, branch info) from the repository root
81
+
82
+ ### Requirements
83
+
84
+ - Both `--sub-path` and `--workspace-name` must be specified together
85
+ - `--sub-path` can be used multiple times to include multiple directories
86
+ - All specified sub-paths must exist within the target-path
87
+
44
88
  ## Usage
45
89
 
46
90
  ```` shell
47
- socketcli [-h] [--api-token API_TOKEN] [--repo REPO] [--integration {api,github,gitlab}] [--owner OWNER] [--branch BRANCH]
48
- [--committers [COMMITTERS ...]] [--pr-number PR_NUMBER] [--commit-message COMMIT_MESSAGE] [--commit-sha COMMIT_SHA]
49
- [--target-path TARGET_PATH] [--sbom-file SBOM_FILE] [--files FILES] [--save-submitted-files-list SAVE_SUBMITTED_FILES_LIST]
50
- [--default-branch] [--pending-head] [--generate-license] [--enable-debug] [--enable-json] [--enable-sarif]
51
- [--disable-overview] [--disable-security-issue] [--allow-unverified] [--ignore-commit-files] [--disable-blocking]
52
- [--scm SCM] [--timeout TIMEOUT] [--exclude-license-details]
91
+ socketcli [-h] [--api-token API_TOKEN] [--repo REPO] [--repo-is-public] [--branch BRANCH] [--integration {api,github,gitlab,azure,bitbucket}]
92
+ [--owner OWNER] [--pr-number PR_NUMBER] [--commit-message COMMIT_MESSAGE] [--commit-sha COMMIT_SHA] [--committers [COMMITTERS ...]]
93
+ [--target-path TARGET_PATH] [--sbom-file SBOM_FILE] [--license-file-name LICENSE_FILE_NAME] [--save-submitted-files-list SAVE_SUBMITTED_FILES_LIST]
94
+ [--save-manifest-tar SAVE_MANIFEST_TAR] [--files FILES] [--sub-path SUB_PATH] [--workspace-name WORKSPACE_NAME]
95
+ [--excluded-ecosystems EXCLUDED_ECOSYSTEMS] [--default-branch] [--pending-head] [--generate-license] [--enable-debug]
96
+ [--enable-json] [--enable-sarif] [--disable-overview] [--exclude-license-details] [--allow-unverified] [--disable-security-issue]
97
+ [--ignore-commit-files] [--disable-blocking] [--enable-diff] [--scm SCM] [--timeout TIMEOUT] [--include-module-folders]
98
+ [--reach] [--reach-version REACH_VERSION] [--reach-analysis-timeout REACH_ANALYSIS_TIMEOUT]
99
+ [--reach-analysis-memory-limit REACH_ANALYSIS_MEMORY_LIMIT] [--reach-ecosystems REACH_ECOSYSTEMS] [--reach-exclude-paths REACH_EXCLUDE_PATHS]
100
+ [--reach-min-severity {low,medium,high,critical}] [--reach-skip-cache] [--reach-disable-analytics] [--reach-output-file REACH_OUTPUT_FILE]
101
+ [--only-facts-file] [--version]
53
102
  ````
54
103
 
55
104
  If you don't want to provide the Socket API Token every time then you can use the environment variable `SOCKET_SECURITY_API_KEY`
@@ -65,11 +114,11 @@ If you don't want to provide the Socket API Token every time then you can use th
65
114
  | Parameter | Required | Default | Description |
66
115
  |:-----------------|:---------|:--------|:------------------------------------------------------------------------|
67
116
  | --repo | False | *auto* | Repository name in owner/repo format (auto-detected from git remote) |
68
- | --integration | False | api | Integration type (api, github, gitlab) |
117
+ | --repo-is-public | False | False | If set, flags a new repository creation as public. Defaults to false. |
118
+ | --integration | False | api | Integration type (api, github, gitlab, azure, bitbucket) |
69
119
  | --owner | False | | Name of the integration owner, defaults to the socket organization slug |
70
120
  | --branch | False | *auto* | Branch name (auto-detected from git) |
71
121
  | --committers | False | *auto* | Committer(s) to filter by (auto-detected from git commit) |
72
- | --repo-is-public | False | False | If set, flags a new repository creation as public. Defaults to false. |
73
122
 
74
123
  #### Pull Request and Commit
75
124
  | Parameter | Required | Default | Description |
@@ -83,17 +132,20 @@ If you don't want to provide the Socket API Token every time then you can use th
83
132
  |:----------------------------|:---------|:----------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
84
133
  | --target-path | False | ./ | Target path for analysis |
85
134
  | --sbom-file | False | | SBOM file path |
86
- | --files | False | *auto* | Files to analyze (JSON array string). Auto-detected from git commit changes when not specified |
87
- | --excluded-ecosystems | False | [] | List of ecosystems to exclude from analysis (JSON array string). You can get supported files from the [Supported Files API](https://docs.socket.dev/reference/getsupportedfiles) |
88
135
  | --license-file-name | False | `license_output.json` | Name of the file to save the license details to if enabled |
89
136
  | --save-submitted-files-list | False | | Save list of submitted file names to JSON file for debugging purposes |
90
137
  | --save-manifest-tar | False | | Save all manifest files to a compressed tar.gz archive with original directory structure |
138
+ | --files | False | *auto* | Files to analyze (JSON array string). Auto-detected from git commit changes when not specified |
139
+ | --sub-path | False | | Sub-path within target-path for manifest file scanning (can be specified multiple times). All sub-paths are combined into a single workspace scan while preserving git context from target-path. Must be used with --workspace-name |
140
+ | --workspace-name | False | | Workspace name suffix to append to repository name (repo-name-workspace_name). Must be used with --sub-path |
141
+ | --excluded-ecosystems | False | [] | List of ecosystems to exclude from analysis (JSON array string). You can get supported files from the [Supported Files API](https://docs.socket.dev/reference/getsupportedfiles) |
91
142
 
92
143
  #### Branch and Scan Configuration
93
- | Parameter | Required | Default | Description |
94
- |:-----------------|:---------|:--------|:------------------------------------------------------------------------------------------------------|
95
- | --default-branch | False | *auto* | Make this branch the default branch (auto-detected from git and CI environment when not specified) |
96
- | --pending-head | False | *auto* | If true, the new scan will be set as the branch's head scan (automatically synced with default-branch) |
144
+ | Parameter | Required | Default | Description |
145
+ |:-------------------------|:---------|:--------|:------------------------------------------------------------------------------------------------------|
146
+ | --default-branch | False | *auto* | Make this branch the default branch (auto-detected from git and CI environment when not specified) |
147
+ | --pending-head | False | *auto* | If true, the new scan will be set as the branch's head scan (automatically synced with default-branch) |
148
+ | --include-module-folders | False | False | If enabled will include manifest files from folders like node_modules |
97
149
 
98
150
  #### Output Configuration
99
151
  | Parameter | Required | Default | Description |
@@ -104,6 +156,7 @@ If you don't want to provide the Socket API Token every time then you can use th
104
156
  | --enable-sarif | False | False | Enable SARIF output of results instead of table or JSON format |
105
157
  | --disable-overview | False | False | Disable overview output |
106
158
  | --exclude-license-details | False | False | Exclude license details from the diff report (boosts performance for large repos) |
159
+ | --version | False | False | Show program's version number and exit |
107
160
 
108
161
  #### Security Configuration
109
162
  | Parameter | Required | Default | Description |
@@ -111,6 +164,28 @@ If you don't want to provide the Socket API Token every time then you can use th
111
164
  | --allow-unverified | False | False | Allow unverified packages |
112
165
  | --disable-security-issue | False | False | Disable security issue checks |
113
166
 
167
+ #### Reachability Analysis
168
+ | Parameter | Required | Default | Description |
169
+ |:---------------------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------------------------------|
170
+ | --reach | False | False | Enable reachability analysis to identify which vulnerable functions are actually called by your code |
171
+ | --reach-version | False | latest | Version of @coana-tech/cli to use for analysis |
172
+ | --reach-analysis-timeout | False | 1200 | Timeout in seconds for the reachability analysis (default: 1200 seconds / 20 minutes) |
173
+ | --reach-analysis-memory-limit | False | 4096 | Memory limit in MB for the reachability analysis (default: 4096 MB / 4 GB) |
174
+ | --reach-ecosystems | False | | Comma-separated list of ecosystems to analyze (e.g., "npm,pypi"). If not specified, all supported ecosystems are analyzed |
175
+ | --reach-exclude-paths | False | | Comma-separated list of file paths or patterns to exclude from reachability analysis |
176
+ | --reach-min-severity | False | | Minimum severity level for reporting reachability results (low, medium, high, critical) |
177
+ | --reach-skip-cache | False | False | Skip cache and force fresh reachability analysis |
178
+ | --reach-disable-analytics | False | False | Disable analytics collection during reachability analysis |
179
+ | --reach-output-file | False | .socket.facts.json | Path where reachability analysis results should be saved |
180
+ | --only-facts-file | False | False | Submit only the .socket.facts.json file to an existing scan (requires --reach and a prior scan) |
181
+
182
+ **Reachability Analysis Requirements:**
183
+ - `npm` - Required to install and run @coana-tech/cli
184
+ - `npx` - Required to execute @coana-tech/cli
185
+ - `uv` - Required for Python environment management
186
+
187
+ The CLI will automatically install @coana-tech/cli if not present. Use `--reach` to enable reachability analysis during a full scan, or use `--only-facts-file` with `--reach` to submit reachability results to an existing scan.
188
+
114
189
  #### Advanced Configuration
115
190
  | Parameter | Required | Default | Description |
116
191
  |:-------------------------|:---------|:--------|:----------------------------------------------------------------------|
@@ -119,7 +194,6 @@ If you don't want to provide the Socket API Token every time then you can use th
119
194
  | --enable-diff | False | False | Enable diff mode even when using --integration api (forces diff mode without SCM integration) |
120
195
  | --scm | False | api | Source control management type |
121
196
  | --timeout | False | | Timeout in seconds for API requests |
122
- | --include-module-folders | False | False | If enabled will include manifest files from folders like node_modules |
123
197
 
124
198
  #### Plugins
125
199
 
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
 
7
7
  [project]
8
8
  name = "socketsecurity"
9
- version = "2.2.8"
9
+ version = "2.2.18"
10
10
  requires-python = ">= 3.10"
11
11
  license = {"file" = "LICENSE"}
12
12
  dependencies = [
@@ -16,7 +16,8 @@ dependencies = [
16
16
  'GitPython',
17
17
  'packaging',
18
18
  'python-dotenv',
19
- 'socketdev>=3.0.5,<4.0.0'
19
+ 'socketdev>=3.0.6,<4.0.0',
20
+ "bs4>=0.0.2",
20
21
  ]
21
22
  readme = "README.md"
22
23
  description = "Socket Security CLI for CI/CD"
@@ -158,4 +159,4 @@ docstring-code-format = false
158
159
  docstring-code-line-length = "dynamic"
159
160
 
160
161
  [tool.hatch.build.targets.wheel]
161
- include = ["socketsecurity", "LICENSE"]
162
+ include = ["socketsecurity", "LICENSE"]
@@ -0,0 +1,3 @@
1
+ __author__ = 'socket.dev'
2
+ __version__ = '2.2.18'
3
+ USER_AGENT = f'SocketPythonCLI/{__version__}'