Skip to content

Commit 481a20a

Browse files
committed
Combine the 2.13 and 2.14 upgrade notes in the README
1 parent 23b5ac9 commit 481a20a

4 files changed

Lines changed: 27 additions & 43 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818

1919
### Documentation
2020

21-
- The README's [Upgrading to 2.14.0](README.md#upgrading-to-2140) section lists
22-
what changes for `--strict-blocking` pipelines and what to check before
23-
upgrading.
21+
- The README's upgrade notes for 2.13 and 2.14 are combined into one short
22+
[section](README.md#upgrading-from-212-or-earlier).
2423
- Clarified that `--include-module-folders` discovers dependency manifests.
2524
Added a guide to scanning packages installed outside the lockfile with a
2625
CycloneDX SBOM.

‎README.md‎

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -268,44 +268,29 @@ scan exit `0` on *both* findings and outages — the `soft_fail: 100` rule would
268268
never match, and real findings would stop blocking. That's usually not what you
269269
want.
270270

271-
### Upgrading to 2.14.0
272-
273-
2.14.0 changes what `--strict-blocking` evaluates, so jobs that passed on 2.13.x
274-
can now fail on existing Block alerts. That is the intended result. Check these
275-
before upgrading:
276-
277-
| Change | Affects | What to do |
278-
|--------|---------|------------|
279-
| Each advisory on a package counts separately, findings that persist across a version change count as existing, and Block takes precedence over Warn | `--strict-blocking` | Expect higher existing-blocker counts. |
280-
| Code-only changes run a comparison instead of a non-blocking full scan | `--strict-blocking` without `--ignore-commit-files` | These runs take about as long as `--ignore-commit-files` runs and can fail on existing Block alerts. |
281-
| Without `--scm github` or `--scm gitlab`, that includes default-branch pushes and scans of non-git paths | `--strict-blocking` in Bitbucket, Azure Pipelines, Jenkins and other pipelines without `--scm` | The token needs `full-scans:list` and `repo:list`; see [API token permissions](docs/troubleshooting.md#api-token-permissions). Without them the run exits `3`. |
282-
| A comparison returned with missing or invalid package lists is an infrastructure failure | Every comparison | Exits `3` by default; `--exit-code-on-api-error` and `--disable-blocking` apply. |
283-
| Reopened and ready-for-review pull requests run the PR scan | `--scm github` | If you removed `reopened` from your workflow triggers to avoid unscanned passes, add it back. |
284-
| The GitHub Actions example is split into PR, push and ignore-command workflows | Pipelines copied from the example | Put the [PR workflow](workflows/github-actions.yml) at the existing workflow path and add the [push workflow](workflows/github-actions-push.yml) in the same change. See [Required GitHub checks](docs/ci-cd.md#required-github-checks). |
285-
286-
See the [release notes](CHANGELOG.md#2140) for the full list.
287-
288-
### Upgrading to 2.13.0
289-
290-
Update pipeline rules and wrapper scripts that match specific exit codes:
291-
292-
| Outcome | Before 2.13.0 | From 2.13.0 |
293-
|---------|---------------|-------------|
294-
| Invalid flags or configuration | CLI validation: `1`; argparse: `2` | `2` for both; never suppressed by `--disable-blocking` |
295-
| Ctrl+C | `2` | `130`, or `0` with `--disable-blocking` |
296-
| Missing token or other setup failure | Fixed `2` or `3`, depending on the failure | Infrastructure-error code (`3` by default); both exit-code flags now apply |
297-
298-
Blocking findings still exit `1`. With `--strict-blocking`, existing blocking
299-
alerts can now fail jobs that previously passed. GitLab report findings also get
300-
new IDs once; see the [release notes](CHANGELOG.md#2130).
301-
302-
Configuration is validated before credentials or network setup. Use native
303-
JSON/TOML booleans such as `false`, a positive integer `timeout`, and an array of
304-
file paths for `files`. Invalid or unreadable configuration exits `2` even when
305-
credentials are missing or blocking is disabled.
306-
307-
For a compact comparison of failure-handling policies, see
308-
[Exit codes in CI](docs/ci-cd.md#exit-codes-in-ci).
271+
### Upgrading from 2.12 or earlier
272+
273+
2.13 and 2.14 change exit codes and what `--strict-blocking` checks:
274+
275+
- **Exit codes:** invalid flags or configuration exit `2`, Ctrl+C exits `130`,
276+
and setup failures such as a missing token use the infrastructure-error code
277+
(`3` by default). Blocking findings still exit `1`. See
278+
[Exit codes in CI](docs/ci-cd.md#exit-codes-in-ci).
279+
- **Config files** are validated before credentials or network setup. Use native
280+
JSON/TOML booleans, a positive integer `timeout` and an array for `files`.
281+
- **`--strict-blocking`** fails on existing Block alerts, counts each advisory
282+
separately, and compares code-only changes too, so pipelines can fail on
283+
alerts they used to pass. Without `--scm github` or `--scm gitlab`, that
284+
includes default-branch pushes, which need the `full-scans:list` and
285+
`repo:list` token scopes; see
286+
[API token permissions](docs/troubleshooting.md#api-token-permissions).
287+
- **GitHub Actions example:** if you copied it, put the
288+
[PR workflow](workflows/github-actions.yml) at the existing path and add the
289+
[push workflow](workflows/github-actions-push.yml) in the same change. See
290+
[Required GitHub checks](docs/ci-cd.md#required-github-checks).
291+
292+
GitLab report findings get new IDs once. The [release notes](CHANGELOG.md) have
293+
the details.
309294

310295
## Common gotchas
311296

‎docs/ci-cd.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ SCM event filters can also skip unsupported events with exit `0`; confirm a repo
8888
was created when validating a new workflow.
8989
`--strict-blocking` also checks existing blocking alerts; an incomplete comparison
9090
or incomplete existing-alert data is an infrastructure failure. See the
91-
[2.13.0 migration table](../README.md#upgrading-to-2130) when updating existing CI rules.
91+
[upgrade notes](../README.md#upgrading-from-212-or-earlier) when updating existing CI rules.
9292

9393
## Config file usage in CI
9494

‎docs/troubleshooting.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
| Exit `0` despite expected blockers | Check `--disable-blocking`, remapping to `0`, and whether the run produced a full scan instead of a diff. Full scans do not gate on findings. |
1111

1212
See [Exit codes in CI](ci-cd.md#exit-codes-in-ci) for the flag combinations and
13-
[upgrade guidance](../README.md#upgrading-to-2130) for older pipeline rules.
13+
[upgrade notes](../README.md#upgrading-from-212-or-earlier) for older pipeline rules.
1414

1515
## Repository lookup or creation fails
1616

0 commit comments

Comments
 (0)