Repository navigation
Description
Friction
Part of the tracker #772 (Part D: "The ruleset digest of osv-scanner and the Ruff config digest are settled here"; criterion 5: each ToolRun records its config and ruleset digests). The ToolRun of an osv-scanner run records no digest of its advisory database, and the ToolRun of a Ruff run records no digest of the Ruff configuration that it read. On 2026-10-24 the PyPI database of osv-scanner was 36 MB, above the file-size cap of the record's digest step, so the digest is not a plain file hash.
What should happen
The ToolRun of osv-scanner records a digest that names the database it used (for example, the database's own modified time and the digest of its index, or a streamed hash of the files), and the ToolRun of Ruff records the digest of the configuration that Ruff resolved for the target.
Evidence
- The feat(review): a review runs its tools in the network-less sandbox by default #2096 delivery (2026-10-24): the 36 MB database and the file-size cap.
- feat(review): the SARIF export of a review carries the ToolRun of each scan under its SARIF 2.1.0 names #1983 put the ToolRun records in the SARIF run's property bag.
Acceptance criteria
- The ToolRun of an osv-scanner run changes when its database changes, and stays the same when it does not.
- The ToolRun of a Ruff run changes when the Ruff configuration of the target changes.
Source: #772
Proposed design
Problem statement
The ToolRun record of an osv-scanner run does not capture a digest of the advisory database it used. The ToolRun record of a Ruff run does not capture a digest of the Ruff configuration it resolved. Without these digests, a user cannot verify which database version or configuration produced a given scan result. The osv-scanner PyPI database is 36 MB, above the file-size cap of the record's digest step, so a plain file hash is not possible.
Acceptance criteria
- Criterion 1: The ToolRun of an osv-scanner run records a digest that changes when the database changes and stays the same when it does not.
Verification: Run osv-scanner twice with the same database and confirm the ToolRun digest is identical. Update the database and run again, then confirm the digest differs. - Criterion 2: The ToolRun of a Ruff run records a digest of the configuration that Ruff resolved for the target.
Verification: Run Ruff twice with the same configuration and confirm the ToolRun digest is identical. Modify the Ruff configuration and run again, then confirm the digest differs.
Key questions
- What digest method should the osv-scanner ToolRun use for its database, given that the 36 MB PyPI database exceeds the file-size cap for a plain file hash?: Use a streamed hash of the database files, or the database's modified time combined with a digest of its index. The exact method is a design choice for the implementer. (proposed)
- What does 'the configuration that Ruff resolved for the target' mean for the digest?: It is the final Ruff configuration after Ruff merges its defaults with the project's ruff.toml or pyproject.toml section. The digest covers the resolved configuration, not the raw file. (proposed)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 24, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate adds new functionality to record digests in ToolRuns.This change improves traceability and reproducibility of scan results.The failed run 2096 does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 on the board.Users can verify which version of a tool's database or config was used in a scan.Requires modifying ToolRun to capture and store digest information for osv-scanner and Ruff.Both items are about ToolRun records in SARIF exports, but the candidate adds digest recording while #1983 introduced the SARIF export of ToolRuns.feat(review): a review runs its tools in the network-less sandbox by …
dan-petty commentedon Oct 28, 2026
Status set to Ready at bb46660 (see proposed design in issue body).
devops-cli-service commentedon Nov 1, 2026
Staged: branch
feat/2130-the-toolrun-of-osv-scanner-and, draft pull request #2978. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
These paths of the plan are no file on the default branch, and no group creates them:
src/devops_cli/review/scanners/osv_scanner.py,tests/test_review_tool_runs.py,src/devops_cli/review/scanners/ruff.py. A person checks that the plan names them right.docs(openspec): plan #2130 add osv-scanner and ruff toolrun digests (#…
docs(openspec): fix plan #2130 osv-scanner database digest (#3018)