Skip to content

Commit 42bbbed

Browse files
committed
Retire --reach-enable-analysis-splitting
The Coana CLI no longer splits analyses, so the flag has nothing left to turn on. It is now a hidden no-op, like --reach-disable-analysis-splitting. It still parses, so existing CI scripts keep working. Reachability now always passes --disable-analysis-splitting to Coana. A version picked with --reach-version that still splits by default runs a single analysis too, and newer versions ignore the flag. Bump to 2.13.3.
1 parent 9d976e7 commit 42bbbed

10 files changed

Lines changed: 34 additions & 14 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## 2.13.3
4+
5+
### Deprecated
6+
7+
- `--reach-enable-analysis-splitting` is now a hidden no-op, since the Coana
8+
CLI no longer splits analyses. The flag still parses, so existing CI scripts
9+
keep working. Remove it when convenient.
10+
11+
### Changed
12+
13+
- Reachability always passes `--disable-analysis-splitting` to the Coana CLI,
14+
so a version picked with `--reach-version` that still splits by default
15+
runs a single analysis too.
16+
317
## 2.13.2
418

519
### Added

‎docs/cli-reference.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ socketcli [-h] [--api-token API_TOKEN] [--repo REPO] [--workspace WORKSPACE] [--
218218
[--ignore-commit-files] [--disable-blocking] [--disable-ignore] [--enable-diff] [--scm SCM] [--timeout TIMEOUT] [--include-module-folders]
219219
[--reach] [--reach-version REACH_VERSION] [--reach-analysis-timeout REACH_ANALYSIS_TIMEOUT]
220220
[--reach-analysis-memory-limit REACH_ANALYSIS_MEMORY_LIMIT] [--reach-concurrency REACH_CONCURRENCY] [--reach-ecosystems REACH_ECOSYSTEMS]
221-
[--reach-min-severity <level>] [--reach-skip-cache] [--reach-disable-analytics] [--reach-enable-analysis-splitting] [--reach-detailed-analysis-log-file]
221+
[--reach-min-severity <level>] [--reach-skip-cache] [--reach-disable-analytics] [--reach-detailed-analysis-log-file]
222222
[--reach-use-only-pregenerated-sboms] [--reach-debug] [--reach-disable-external-tool-checks] [--reach-disable-dependency-downloads]
223223
[--reach-output-file REACH_OUTPUT_FILE] [--only-facts-file] [--version]
224224
````
@@ -362,7 +362,6 @@ docs.socket.dev use `SOCKET_SECURITY_API_KEY`. Either works. If both are set,
362362
| `--reach-min-severity` | False | info | Minimum severity of vulnerabilities to analyze (info, low, moderate, high, critical). Omitted by default, so coana analyzes all severities — equivalent to `info`, the lowest. |
363363
| `--reach-skip-cache` | False | False | Skip cache and force fresh reachability analysis |
364364
| `--reach-disable-analytics` | False | False | Disable analytics collection during reachability analysis |
365-
| `--reach-enable-analysis-splitting` | False | False | Enable analysis splitting/bucketing (a legacy performance feature). Splitting is disabled by default. |
366365
| `--reach-detailed-analysis-log-file` | False | False | Write a detailed analysis log file; its path is printed to stdout |
367366
| `--reach-use-only-pregenerated-sboms` | False | False | Build the scan only from pre-generated CycloneDX (CDX) and SPDX files in your project (requires --reach) |
368367
| `--reach-debug` | False | False | Enable coana debug output (`--debug`) for the analysis, independent of the global `--enable-debug` |

‎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.13.2"
9+
version = "2.13.3"
1010
requires-python = ">= 3.11"
1111
license = {"file" = "LICENSE"}
1212
dependencies = [

‎socketsecurity/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
__author__ = 'socket.dev'
2-
__version__ = '2.13.2'
2+
__version__ = '2.13.3'
33
USER_AGENT_NAME = 'socket-python-cli'
44
USER_AGENT = f'{USER_AGENT_NAME}/{__version__}'

‎socketsecurity/config.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ class CliConfig:
229229
reach_analysis_timeout: Optional[str] = None
230230
reach_disable_analytics: bool = False
231231
reach_disable_analysis_splitting: bool = False # Deprecated, kept for backwards compatibility
232-
reach_enable_analysis_splitting: bool = False
233232
reach_detailed_analysis_log_file: bool = False
234233
reach_lazy_mode: bool = False # Deprecated, kept for backwards compatibility
235234
reach_ecosystems: Optional[List[str]] = None
@@ -399,7 +398,6 @@ def _from_args(cls, args_list: Optional[List[str]] = None) -> 'CliConfig':
399398
'reach_analysis_memory_limit': args.reach_analysis_memory_limit,
400399
'reach_disable_analytics': args.reach_disable_analytics,
401400
'reach_disable_analysis_splitting': args.reach_disable_analysis_splitting,
402-
'reach_enable_analysis_splitting': args.reach_enable_analysis_splitting,
403401
'reach_detailed_analysis_log_file': args.reach_detailed_analysis_log_file,
404402
'reach_lazy_mode': args.reach_lazy_mode,
405403
'reach_ecosystems': args.reach_ecosystems.split(',') if args.reach_ecosystems else None,
@@ -1203,7 +1201,7 @@ def create_argument_parser() -> argparse.ArgumentParser:
12031201
"--reach-enable-analysis-splitting",
12041202
dest="reach_enable_analysis_splitting",
12051203
action="store_true",
1206-
help="Enable analysis splitting/bucketing for reachability analysis (disabled by default). This is a legacy feature for improving performance"
1204+
help=argparse.SUPPRESS # Deprecated, kept for backwards compatibility (no-op)
12071205
)
12081206
reachability_group.add_argument(
12091207
"--reach-detailed-analysis-log-file",

‎socketsecurity/core/tools/reachability.py‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ def run_reachability_analysis(
109109
min_severity: Optional[str] = None,
110110
skip_cache: bool = False,
111111
disable_analytics: bool = False,
112-
enable_analysis_splitting: bool = False,
113112
detailed_analysis_log_file: bool = False,
114113
repo_name: Optional[str] = None,
115114
branch_name: Optional[str] = None,
@@ -143,7 +142,6 @@ def run_reachability_analysis(
143142
min_severity: Minimum severity level (info, low, moderate, high, critical)
144143
skip_cache: Skip cache usage
145144
disable_analytics: Disable analytics sharing
146-
enable_analysis_splitting: Enable analysis splitting (disabled by default)
147145
detailed_analysis_log_file: Print detailed analysis log file path
148146
repo_name: Repository name
149147
branch_name: Branch name
@@ -181,9 +179,8 @@ def run_reachability_analysis(
181179
if disable_analytics:
182180
coana_args.append("--disable-analytics-sharing")
183181

184-
# Analysis splitting is disabled by default; only omit the flag if explicitly enabled
185-
if not enable_analysis_splitting:
186-
coana_args.append("--disable-analysis-splitting")
182+
# Older Coana versions split analyses unless told not to. Newer ones ignore this flag.
183+
coana_args.append("--disable-analysis-splitting")
187184

188185
if detailed_analysis_log_file:
189186
coana_args.append("--print-analysis-log-file")

‎socketsecurity/socketcli.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,6 @@ def main_code(config: Optional[CliConfig] = None):
520520
min_severity=config.reach_min_severity,
521521
skip_cache=config.reach_skip_cache or False,
522522
disable_analytics=config.reach_disable_analytics or False,
523-
enable_analysis_splitting=config.reach_enable_analysis_splitting or False,
524523
detailed_analysis_log_file=config.reach_detailed_analysis_log_file or False,
525524
repo_name=None if repo_defaulted else config.repo,
526525
branch_name=None if branch_defaulted else config.branch,

‎tests/unit/test_config.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,15 @@ def test_reach_disable_external_tool_checks_flag(self):
300300
)
301301
assert config.reach_disable_external_tool_checks is True
302302

303+
@pytest.mark.parametrize(
304+
"flag", ["--reach-enable-analysis-splitting", "--reach-disable-analysis-splitting"]
305+
)
306+
def test_analysis_splitting_flags_are_accepted_and_hidden(self, flag, capsys):
307+
CliConfig.from_args(self.BASE_ARGS + ["--reach", flag])
308+
with pytest.raises(SystemExit):
309+
CliConfig.from_args(["--help"])
310+
assert flag not in capsys.readouterr().out
311+
303312
def test_reach_new_flags_default_false(self):
304313
config = CliConfig.from_args(self.BASE_ARGS + ["--reach"])
305314
assert config.reach_debug is False

‎tests/unit/test_reachability.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ def test_disable_external_tool_checks(fake_run_path):
127127
assert "--disable-external-tool-checks" not in _run(fake_run_path)["args"]
128128

129129

130+
def test_always_disables_analysis_splitting(fake_run_path):
131+
assert "--disable-analysis-splitting" in _run(fake_run_path)["args"]
132+
133+
130134
def test_timeout_and_memory_forwarded_verbatim(fake_run_path):
131135
"""coana parses the units; config-file ints are coerced to strings."""
132136
args = _run(fake_run_path, timeout="10m", memory_limit=2048, concurrency=1)["args"]

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)