Skip to content

Commit 4ac1036

Browse files
committed
feat: enhance monorepo support with multiple --sub-path options
- Add support for multiple --sub-path arguments to scan different directories within a single workspace - Require --workspace-name when using --sub-path for proper workspace identification - Optimize base_paths parameter to pass target_path for simplified SDK integration - Update argument validation to enforce sub_paths and workspace_name pairing - Add comprehensive README documentation with monorepo examples and usage patterns - Include GitHub Actions workflow examples for monorepo CI/CD scenarios - Extend parameter table with detailed descriptions of new CLI options This enhancement enables scanning multiple directories (e.g., frontend, backend, services/api) as a single workspace while preserving git context from the repository root, making it ideal for organizations with monorepo structures.
1 parent 9eb782c commit 4ac1036

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
66

77
[project]
88
name = "socketsecurity"
9-
version = "2.2.10"
9+
version = "2.2.11"
1010
requires-python = ">= 3.10"
1111
license = {"file" = "LICENSE"}
1212
dependencies = [

socketsecurity/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
__author__ = 'socket.dev'
2-
__version__ = '2.2.10'
2+
__version__ = '2.2.11'

socketsecurity/socketcli.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def main_code():
149149

150150
# Calculate the scan paths - combine target_path with sub_paths if provided
151151
scan_paths = []
152-
base_paths = []
152+
base_paths = [config.target_path] # Always use target_path as the single base path
153153

154154
if config.sub_paths:
155155
import os
@@ -160,11 +160,9 @@ def main_code():
160160
if not os.path.exists(full_scan_path):
161161
raise Exception(f"Sub-path does not exist: {full_scan_path}")
162162
scan_paths.append(full_scan_path)
163-
base_paths.append(sub_path)
164163
else:
165164
# Use the target path as the single scan path
166165
scan_paths = [config.target_path]
167-
base_paths = ["."]
168166

169167
# Modify repository name if workspace_name is provided
170168
if config.workspace_name and config.repo:

0 commit comments

Comments
 (0)