Skip to content

feat(review): one command fetches the osv and trivy databases - #3543

Merged
dan-petty merged 3 commits into
mainfrom
feat/2131-fetch-review-tool-databases
Nov 4, 2026
Merged

dan-petty merged 3 commits into
mainfrom
feat/2131-fetch-review-tool-databases

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

devops review fetch-databases [PATH] fetches the databases that a sandboxed review binds read-only. It runs osv-scanner (--download-offline-databases, over the lockfiles of PATH) and Trivy (--download-db-only, and a config run for the checks bundle) outside the sandbox. Each tool writes the directory of OsvScanner.data_dirs() or TrivyScanner.data_dirs().

A scan with no database is a coverage gap that names the command. An osv-scanner scan on a database older than 24 hours is a gap that keeps its findings. The fetch renews the age of the files it confirmed, because osv-scanner rewrites a file only when upstream changed it.

OsvScanner takes a file as a lockfile only when its name is in CONST_LOCKFILE_NAMES. A file such as rules.lock made osv-scanner exit 127 with no report, which stopped the fetch in this repository. The review pipeline has the same suffix rule (#3536).

Closes #2131

Change: openspec/changes/archive/2026-11-04-2131-one-devops-command-fetches-the/

…tabases

devops review fetch-databases starts osv-scanner and Trivy outside the sandbox. They write the
directories that a review binds read-only. A review that lacks a database, or reads an
osv-scanner database older than 24 hours, reports a coverage gap that names the command.
A file is a lockfile for osv-scanner only when its name is in CONST_LOCKFILE_NAMES.
@dan-petty dan-petty added type/feature Type feature: a new function scope/review Multi-persona code review engine, verification, and findings labels Nov 4, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Local devops ci on the first commit: 18448 passed, 3 failed, 1 error. The failure in test_hermetic_floor was mine (a second tree fixture) and is fixed. The other two failures and the error depend on tools installed on this host (the popeye path in test_tool_executor_contract, the devcontainer status in test_devcontainer_install_tools_dry_run). They touch no file of this change.

Real run on 2026-11-04 in this checkout (osv-scanner 2.6.0, Trivy 0.75.0): the command fetched the PyPI and npm osv databases and the Trivy database and checks. A second run renewed the modified time of both osv files.

@dan-petty
dan-petty marked this pull request as ready for review November 4, 2026 23:23
@dan-petty
dan-petty merged commit 0d290b4 into main Nov 4, 2026
23 checks passed
@dan-petty
dan-petty deleted the feat/2131-fetch-review-tool-databases branch November 4, 2026 23:56
dan-petty pushed a commit that referenced this pull request Nov 5, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.57.0](v0.56.5...v0.57.0)
(2026-11-04)


### Features

* **review:** one command fetches the osv and trivy databases
([#3543](#3543))
([0d290b4](0d290b4))


### Bug Fixes

* **config:** find a plaintext secret at any depth in audit-keys
([#3546](#3546))
([19b740e](19b740e))
* **roadmap:** one failed item does not suspend the stage row
([#3539](#3539))
([0af847c](0af847c))
* **roadmap:** shorten a long item title before a job needs it
([#3541](#3541))
([910312e](910312e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/review Multi-persona code review engine, verification, and findings type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(review): one devops command fetches the osv-scanner and trivy databases that a sandboxed review binds read-only

1 participant