Skip to content

Commit a0c5715

Browse files
committed
Merge origin/main and clarify workspace boundaries
2 parents a633e0a + 6076acf commit a0c5715

16 files changed

Lines changed: 999 additions & 84 deletions

‎CHANGELOG.md‎

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## 2.7.0
3+
## 2.8.0
44

55
### Changed: improve monorepo scan diagnostics and guidance
66

@@ -14,6 +14,65 @@
1414
- Full-scan and streamed-diff API failures now use the configured infrastructure
1515
error exit code instead of the security-finding exit code.
1616

17+
## 2.7.1
18+
19+
### Changed: bump pinned @coana-tech/cli to 15.10.36
20+
21+
- Bumped the pinned reachability engine (`@coana-tech/cli`) from `15.10.32` to
22+
`15.10.36`. See the [Coana changelogs](https://docs.coana.tech/changelogs) for
23+
engine changes.
24+
25+
## 2.7.0
26+
27+
### Fixed: unreadable reachability facts no longer report a blocking package
28+
29+
- Scans with no supported manifest files uploaded a zero-byte `.socket.facts.json`
30+
placeholder. The API cannot parse that, and answers by adding a
31+
`generic/invalid-socket-facts@1.0.0` artifact to the scan, which the CLI then reported
32+
as a new blocking package with no manifest file and no introducing dependency —
33+
failing the run and, on pull requests, leaving a security comment that could not be
34+
acted on. The placeholder is now an empty but well-formed facts document.
35+
- When the API does report `generic/invalid-socket-facts` (a diagnostic for a facts file
36+
it could not parse, not a real dependency), the CLI now excludes it from scan results
37+
and logs a warning instead. It no longer blocks a run, appears in reports, or triggers
38+
a pull request comment.
39+
- Each placeholder is written to its own temporary directory. Two CLI runs sharing a
40+
temporary directory previously used the same path and could remove each other's
41+
placeholder mid-upload.
42+
43+
### Fixed: pull request comments no longer show orphaned tags or an empty table
44+
45+
- Optional sections that rendered as empty, such as the ignore instructions
46+
suppressed by `--disable-ignore`, left a whitespace-only line in the alerts
47+
table. That line closed the surrounding HTML block, and the indented
48+
`</blockquote></details>` tags after it were rendered as a literal code block.
49+
Generated comment markup now omits blank lines and stays under the indentation
50+
that starts a code block.
51+
- Alert descriptions, suggestions and license findings are collapsed onto a
52+
single line so multi-line API text cannot break the table markup either.
53+
- When a pull request has no alerts left to report, the security comment is
54+
replaced with a short confirmation instead of keeping the "Caution" banner
55+
above a table with no rows. This happens both when a later commit resolves
56+
every alert and when every alert is ignored by comment. The comment marker is
57+
preserved, so a commit that reintroduces an alert updates the same comment
58+
rather than posting a second one.
59+
- `@SocketSecurity ignore-all` now applies to comments written by CLI versions
60+
before 2.0.55, which use the older Markdown alerts table. The check was made
61+
once per ignore command, and an ignore-all comment produces none, so no rows
62+
were removed.
63+
64+
### Fixed: `--disable-security-issue` and `--disable-overview` now suppress the comment entirely
65+
66+
- Both flags were checked only after testing whether a comment of that type was
67+
already on the pull request, so they suppressed the first post and then
68+
updated that comment on every later run. `--disable-security-issue` in
69+
particular kept refreshing an existing comment with the full alerts table.
70+
- The flags now mean the CLI does not manage that comment at all. An existing
71+
comment is left untouched rather than being rewritten, since a body claiming
72+
no alerts would be inaccurate when reporting is merely switched off.
73+
- The decision moved into `should_write_comment()` so it is covered directly by
74+
tests.
75+
1776
## 2.6.11
1877

1978
### Changed: bump pinned @coana-tech/cli to 15.10.32
@@ -45,7 +104,6 @@
45104
- Bumped the pinned reachability engine (`@coana-tech/cli`) from `15.10.23` to
46105
`15.10.25`. See the [Coana changelogs](https://docs.coana.tech/changelogs) for
47106
engine changes.
48-
49107
## 2.6.7
50108

51109
### Changed: bump pinned @coana-tech/cli to 15.10.23

‎docs/ci-cd.md‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ when GitHub skips the entire workflow because of a top-level path filter.
8282
Define a repository variable named `SOCKET_MONOREPO_WORKSPACES_JSON`. Its value is
8383
an array with one stable workspace name, one or more scan roots, and the path globs
8484
that should select that workspace. Fill these placeholders with the repository's
85-
real layout; list a shared/root lockfile in every workspace it affects.
85+
real layout. A workspace definition selects directory roots; shared root manifests,
86+
lockfiles, and cross-directory path dependencies outside those roots are not included
87+
automatically.
8688

8789
```json
8890
[
@@ -94,6 +96,12 @@ real layout; list a shared/root lockfile in every workspace it affects.
9496
]
9597
```
9698

99+
Each `sub_paths` value must be a directory, not an individual manifest or lockfile.
100+
Using `.` includes the entire target path. Do not use this changed-workspace pattern
101+
until the directory boundaries preserve every shared input needed to resolve each
102+
logical graph. If root workspace metadata governs most or all of the repository, a
103+
smaller coverage-preserving split may not be representable with `--sub-path` alone.
104+
97105
Also define `SOCKETCLI_VERSION` as the exact package version validated for the
98106
workflow. The workflow below logs that version, uses full Git history for reliable
99107
base/head selection, creates one matrix job (and therefore one graph and baseline)
@@ -279,7 +287,8 @@ Each configuration object may intentionally contain several `sub_paths` when
279287
those directories are one logical dependency graph. To split backend resolution,
280288
use separate objects with different `name` values. Add `--workspace <name>` only
281289
when the Socket organization requires API workspace association; it is not a scan
282-
scope control.
290+
scope control. Use `--save-submitted-files-list` in a non-required canary to verify
291+
the exact manifests selected before adopting workspace-level scans as a merge gate.
283292

284293
The job has an explicit 20-minute total budget. Tune that value from observed
285294
workspace-level latency after the split; a five-minute cap can still be too close

‎docs/cli-reference.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ socketcli [-h] [--api-token API_TOKEN] [--repo REPO] [--workspace WORKSPACE] [--
178178
[--reach] [--reach-version REACH_VERSION] [--reach-analysis-timeout REACH_ANALYSIS_TIMEOUT]
179179
[--reach-analysis-memory-limit REACH_ANALYSIS_MEMORY_LIMIT] [--reach-concurrency REACH_CONCURRENCY] [--reach-ecosystems REACH_ECOSYSTEMS]
180180
[--reach-min-severity <level>] [--reach-skip-cache] [--reach-disable-analytics] [--reach-enable-analysis-splitting] [--reach-detailed-analysis-log-file]
181-
[--reach-lazy-mode] [--reach-use-only-pregenerated-sboms] [--reach-debug] [--reach-disable-external-tool-checks]
181+
[--reach-use-only-pregenerated-sboms] [--reach-debug] [--reach-disable-external-tool-checks]
182182
[--reach-output-file REACH_OUTPUT_FILE] [--only-facts-file] [--version]
183183
````
184184

@@ -297,7 +297,7 @@ If you don't want to provide the Socket API Token every time then you can use th
297297
| Parameter | Required | Default | Description |
298298
|:---------------------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------------------------------|
299299
| `--reach` | False | False | Enable reachability analysis to identify which vulnerable functions are actually called by your code. Creates a full application reachability scan (`scan_type=socket_tier1`). |
300-
| `--reach-version` | False | 15.10.32 | Version of @coana-tech/cli to use. Defaults to the pinned version that ships with this CLI release, so the engine only changes when you upgrade the Socket CLI. Pass `latest` to always use the newest published version (opt-in auto-update), or an explicit version (e.g. `1.2.3`) to pin it. |
300+
| `--reach-version` | False | 15.10.36 | Version of @coana-tech/cli to use. Defaults to the pinned version that ships with this CLI release, so the engine only changes when you upgrade the Socket CLI. Pass `latest` to always use the newest published version (opt-in auto-update), or an explicit version (e.g. `1.2.3`) to pin it. |
301301
| `--reach-analysis-timeout` | False | 10m | Timeout for each reachability analysis run, e.g. `90s`, `10m` or `1h`. Omitted by default, so coana applies its own default (`10m`). Alias: `--reach-timeout` |
302302
| `--reach-analysis-memory-limit` | False | 8GB | Memory limit for each reachability analysis run, e.g. `512MB` or `8GB`. Omitted by default, so coana applies its own default (`8GB`). Alias: `--reach-memory-limit` |
303303
| `--reach-concurrency` | False | 1 | Control parallel analysis execution (must be >= 1). Omitted by default, so coana applies its own default. |
@@ -308,7 +308,6 @@ If you don't want to provide the Socket API Token every time then you can use th
308308
| `--reach-disable-analytics` | False | False | Disable analytics collection during reachability analysis |
309309
| `--reach-enable-analysis-splitting` | False | False | Enable analysis splitting/bucketing (a legacy performance feature). Splitting is disabled by default. |
310310
| `--reach-detailed-analysis-log-file` | False | False | Write a detailed analysis log file; its path is printed to stdout |
311-
| `--reach-lazy-mode` | False | False | Enable lazy mode (experimental performance feature) |
312311
| `--reach-use-only-pregenerated-sboms` | False | False | Build the scan only from pre-generated CycloneDX (CDX) and SPDX files in your project (requires --reach) |
313312
| `--reach-debug` | False | False | Enable coana debug output (`--debug`) for the analysis, independent of the global `--enable-debug` |
314313
| `--reach-disable-external-tool-checks` | False | False | Disable coana's external tool availability checks (passes `--disable-external-tool-checks`) |

‎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.7.0"
9+
version = "2.8.0"
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,3 +1,3 @@
11
__author__ = 'socket.dev'
2-
__version__ = '2.7.0'
2+
__version__ = '2.8.0'
33
USER_AGENT = f'SocketPythonCLI/{__version__}'

‎socketsecurity/config.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class CliConfig:
176176
reach_disable_analysis_splitting: bool = False # Deprecated, kept for backwards compatibility
177177
reach_enable_analysis_splitting: bool = False
178178
reach_detailed_analysis_log_file: bool = False
179-
reach_lazy_mode: bool = False
179+
reach_lazy_mode: bool = False # Deprecated, kept for backwards compatibility
180180
reach_ecosystems: Optional[List[str]] = None
181181
reach_exclude_paths: Optional[List[str]] = None
182182
reach_skip_cache: bool = False
@@ -1091,7 +1091,7 @@ def create_argument_parser() -> argparse.ArgumentParser:
10911091
"--reach-lazy-mode",
10921092
dest="reach_lazy_mode",
10931093
action="store_true",
1094-
help="Enable lazy mode for reachability analysis. This is an experimental feature for improving performance"
1094+
help=argparse.SUPPRESS # Deprecated, kept for backwards compatibility (no-op)
10951095
)
10961096
reachability_group.add_argument(
10971097
"--reach-output-file",

0 commit comments

Comments
 (0)