Summary
--ratchet and baseline suppression (.cve-lite/baseline.json) work in single-folder scans but are silently ignored in multi-folder mode. Monorepos without a root lockfile — the path that auto-enters multi-folder mode — cannot adopt the documented ratcheting CI gate.
Motivation
Ratcheting docs describe --ratchet as the way to land a hard CI gate on existing debt. Multi-folder is the natural scan path for npm/yarn/pnpm workspaces without a root lockfile. Today those repos get full historical noise every run, and --ratchet is a no-op (only referenced to skip the override hint).
Related gap: multi-folder already has JSON + HTML + maintenance/--fail-on partial parity with single-folder; baseline/ratchet is the biggest remaining CI feature hole.
Proposed behaviour
- First
--ratchet run in multi-folder: write a baseline that covers all scanned subfolders (either one repo-root manifest keyed by subfolder path, or per-subfolder .cve-lite/baseline.json — open to maintainer preference).
- Subsequent runs: suppress known findings per subfolder; only new findings (and
--fail-on / override / maintenance thresholds) fail CI.
- Exit-code policy should match single-folder: ratchet regressions + CVE/
--fail-on + override + maintenance.
- Docs: note multi-folder support in
ratcheting.md and CLI reference; today --ratchet is accepted without error despite doing nothing.
Non-goals
- Multi-folder
--fix / --sarif / --cdx (already explicitly rejected with a message)
- Changing single-folder baseline format unless needed for the keyed multi-folder layout
Acceptance criteria
cve-lite /monorepo --ratchet creates a baseline and exits 0 on first run
- Second run with the same findings exits 0 (suppressed); introducing a new finding fails
- Unit/e2e coverage for save + gate paths
- Docs updated
Happy to take this if maintainers agree on the baseline shape (single keyed file vs per-subfolder).
Summary
--ratchetand baseline suppression (.cve-lite/baseline.json) work in single-folder scans but are silently ignored in multi-folder mode. Monorepos without a root lockfile — the path that auto-enters multi-folder mode — cannot adopt the documented ratcheting CI gate.Motivation
Ratcheting docs describe
--ratchetas the way to land a hard CI gate on existing debt. Multi-folder is the natural scan path for npm/yarn/pnpm workspaces without a root lockfile. Today those repos get full historical noise every run, and--ratchetis a no-op (only referenced to skip the override hint).Related gap: multi-folder already has JSON + HTML + maintenance/
--fail-onpartial parity with single-folder; baseline/ratchet is the biggest remaining CI feature hole.Proposed behaviour
--ratchetrun in multi-folder: write a baseline that covers all scanned subfolders (either one repo-root manifest keyed by subfolder path, or per-subfolder.cve-lite/baseline.json— open to maintainer preference).--fail-on/ override / maintenance thresholds) fail CI.--fail-on+ override + maintenance.ratcheting.mdand CLI reference; today--ratchetis accepted without error despite doing nothing.Non-goals
--fix/--sarif/--cdx(already explicitly rejected with a message)Acceptance criteria
cve-lite /monorepo --ratchetcreates a baseline and exits 0 on first runHappy to take this if maintainers agree on the baseline shape (single keyed file vs per-subfolder).