|
4 | 4 |
|
5 | 5 | ### Upgrade notes |
6 | 6 |
|
7 | | -This release changes exit codes. Check any CI step that matches on a specific |
8 | | -code. |
9 | | - |
10 | | -- **Invalid flags exit `2`, not `1`.** `1` now always means blocking security |
11 | | - findings. `2` is the code argparse already used for its own usage errors. |
12 | | - `--disable-blocking` does not apply to usage errors. |
13 | | -- **Ctrl+C exits `130`, not `2`.** `130` is the POSIX code for a process stopped |
14 | | - by SIGINT. |
15 | | -- **`--disable-blocking` and `--exit-code-on-api-error` apply to more failures.** |
16 | | - A missing API token, `GITLAB_TOKEN` or `GH_API_TOKEN`, missing reachability |
17 | | - dependencies, a plan without reachability, and a repository that can't be |
18 | | - created used to exit with a hard-coded `2` or `3`. They now exit `3`, or your |
19 | | - `--exit-code-on-api-error` value, and `--disable-blocking` turns them into `0`. |
20 | | -- **`--strict-blocking` now fails on existing blocking alerts.** It didn't |
21 | | - before, because the scan comparison doesn't include alerts on unchanged |
22 | | - packages. Runs that passed with existing blocking alerts will now fail, which |
23 | | - is what the flag documents. To roll it out gradually, see |
24 | | - [Strict Blocking Mode](docs/cli-reference.md#strict-blocking-mode). |
25 | | -- **An incomplete scan comparison fails the run** with the infrastructure-error |
26 | | - code instead of reporting a result that may be missing alerts. |
27 | | - |
28 | | -### Changed: exit codes are decided in one place |
29 | | - |
30 | | -- Failures that are not security findings raise one error type, and the |
31 | | - top-level handler applies `--disable-blocking` and `--exit-code-on-api-error` |
32 | | - to all of them. See [Exit codes](README.md#exit-codes). |
33 | | - |
34 | | -### Fixed: `--strict-blocking` passed with existing blocking alerts |
35 | | - |
36 | | -- The CLI reads alerts on unchanged packages from the new full scan, because |
37 | | - the scan comparison returns those packages without their alerts. This costs |
38 | | - one more API request per run, and only runs when an output needs existing |
39 | | - alerts: `--strict-blocking`, `--enable-gitlab-security` or |
40 | | - `--legal-format fossa`. The GitLab security report and FOSSA output, which |
41 | | - list every current finding, were missing the same alerts. |
42 | | -- If that request fails, the run fails with the infrastructure-error code |
43 | | - rather than passing without the existing alerts. |
44 | | - |
45 | | -### Fixed: duplicate findings with `--strict-blocking` |
| 7 | +Exit codes change in this release. Check any CI step that matches on a specific |
| 8 | +code; see [Exit codes](README.md#exit-codes). |
| 9 | + |
| 10 | +- Invalid flags and config values exit `2` instead of `1`, so `1` always means |
| 11 | + blocking findings. `--disable-blocking` doesn't apply to them. |
| 12 | +- Ctrl+C exits `130` instead of `2`. |
| 13 | +- A missing API or SCM token, missing reachability dependencies, a plan without |
| 14 | + reachability, and a repository that can't be created now honor |
| 15 | + `--disable-blocking` and `--exit-code-on-api-error`. |
| 16 | +- `--strict-blocking` now fails on existing blocking alerts, as documented, so |
| 17 | + runs that passed with them will fail. |
46 | 18 |
|
47 | | -- Alerts on added packages are no longer also reported as existing alerts. Each |
48 | | - finding on an added package was listed twice in JSON, SARIF, Slack and GitLab |
49 | | - output, and counted again in the summary's "EXISTING blocking issues" line and |
50 | | - the GitLab commit status. |
51 | | - |
52 | | -### Fixed: a package's second CVE was dropped |
| 19 | +### Added |
53 | 20 |
|
54 | | -- Alerts were collapsed on package and alert type, and every CVE of one |
55 | | - severity shares an alert type, so only one advisory per package and severity |
56 | | - was reported. A blocking advisory could be dropped behind a warning on the |
57 | | - same package, letting the run pass. Each GHSA or CVE is now reported, and the |
58 | | - PR comment shows its ID next to the title. |
| 21 | +- Under `--strict-blocking`, PR/MR comments list existing alerts in their own |
| 22 | + table after the new ones. `@SocketSecurity ignore` applies to them. |
59 | 23 |
|
60 | | -### Added: existing alerts in PR/MR comments |
| 24 | +### Changed |
61 | 25 |
|
62 | | -- Under `--strict-blocking`, the security comment lists existing alerts in |
63 | | - their own table after the new ones, blocking first. `@SocketSecurity ignore` |
64 | | - applies to them too. The table stops before the comment reaches GitHub's size |
65 | | - limit and links to the full report for the rest. |
| 26 | +- An incomplete scan comparison fails the run with the infrastructure-error |
| 27 | + code instead of reporting a result that may be missing alerts. |
66 | 28 |
|
67 | | -### Fixed: a token without `repo:list` was reported as a missing repository |
| 29 | +### Fixed |
68 | 30 |
|
69 | | -- A repository lookup that fails with 401 or 403 now says the token may be |
70 | | - missing the `repo:list` scope. Before, the CLI treated it as a missing |
71 | | - repository, tried to create it, and failed with a `repo:create` error. |
| 31 | +- `--strict-blocking` passed with existing blocking alerts, because the scan |
| 32 | + comparison returns unchanged packages without their alerts. The CLI now reads |
| 33 | + them from the full scan, at the cost of one more API request. The GitLab |
| 34 | + security report and FOSSA output get the same alerts. |
| 35 | +- `--strict-blocking` listed each finding on an added package twice. |
| 36 | +- A package with several CVEs of the same severity reported only one, so a |
| 37 | + blocking advisory could be dropped behind a warning. |
| 38 | +- A token without the `repo:list` scope was reported as a missing repository, |
| 39 | + ending in a `repo:create` error. |
72 | 40 |
|
73 | 41 | ## 2.12.1 |
74 | 42 |
|
|
0 commit comments