Repository navigation
Closed
Labels
Description
Friction
- A review keeps the
ToolRunof every scan in its profile and inreview.md, but its SARIF export does not carry these records. A consumer offindings.sarifcannot see which version, binary, config or ruleset gave a result.
Evidence
Checked at main 4bb052c.
src/devops_cli/security/sarif.pywritestool.driver.name,tool.driver.versionand an invocation withexecutionSuccessfuland the start and end times. It writes no binary hash, no artifacts and noversionControlProvenance.- The module docstring of
src/devops_cli/security/tool_executor.pymaps eachToolRunfield to its SARIF 2.1.0 name. - SARIF requires
invocation.executionSuccessful, but aToolRunholds no exit code. SARIF requiresversionControlProvenance.repositoryUri, but aToolRunholds no repository. - With the outcomes of the scanners,
to_sarifgives a run to each scanner that ran, a clean scanner too.docs/agent/tasks/task-772-the-review-records-each-tool-run.mdsays that a person decides whether a clean tool gets a run, because a run for a clean tool closes the open alerts of that tool in code scanning. - feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772 lists this change as its later part 5 of six. After the split, feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772 only tracks its child issues, and no pull request closes feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772 itself. So this candidate asks for a change that no other issue holds.
Existing tool considered
- No SARIF library is a dependency, and
to_sarifbuilds the dictionaries itself. This part uses the names of the SARIF 2.1.0 schema. jsonschemais already a dependency (pyproject.toml:30). A test checks the document against the published SARIF 2.1.0 JSON schema with it.
Proposed remedy
- A person first decides whether a clean tool gets a run.
- The
ToolRunrecords the exit code of the run. - The SARIF export writes each record under its SARIF 2.1.0 names: the binary hash as an artifact with the role
driver, the config, ruleset and target groups asrun.artifactswithhashesandroles, the argument template as the command line of the invocation, and the commit as therevisionIdofversionControlProvenance, with therepositoryUriof the reviewed checkout.
Acceptance criteria
- A
ToolRunholds the exit code of its run. - Each SARIF run of a scanner carries the facts of its
ToolRununder the SARIF 2.1.0 names that the module docstring oftool_executor.pylists. - The document validates against the SARIF 2.1.0 JSON schema in a test.
- Tests run offline with fakes and recorded tool output: no network, no real scanner, no model. Each new test runs under 1 s.
-
uv run devops cipasses. - Pending a person: decide whether a clean tool gets a SARIF run.
Source: #772
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 23, 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 the SARIF export of a review.The change improves the information available in SARIF exports but does not fix a critical issue.Users benefit from more detailed information about tool runs in SARIF exports.The change requires modifications to multiple components and extensive testing.feat(review): the SARIF export of a review carries the ToolRun of eac…