Repository navigation
Closed
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard workscope/reviewMulti-persona code review engine, verification, and findingssource/agentFiled by an agenttype/featureType feature: a new functionvalue/mediumValue Medium
Description
Friction
The SARIF export of a review (#1983) writes no versionControlProvenance. SARIF 2.1.0 says it SHALL have a repositoryUri (section 3.23.3), and a ToolRun names the commit but not the repository. A -dirty commit is not a revision of the scanned files (section 3.23.4).
What should happen
- A
ToolRunnames the repository URI of the checkout, read from git, with no credential in it. - The SARIF export writes
versionControlProvenancewithrepositoryUriandrevisionIdfor a commit that is not dirty, and writes none for a dirty one.
Evidence
- OASIS SARIF 2.1.0 Errata 01, sections 3.23.3 and 3.23.4.
src/devops_cli/security/tool_executor.py:ToolRunholdscommitand no repository.
Source: #1983
Proposed design
Problem statement
The SARIF export of a review writes no versionControlProvenance. SARIF 2.1.0 requires a repositoryUri in that object (section 3.23.3). The ToolRun record holds the commit but not the repository. A commit that ends with -dirty is not a valid revision of the scanned files (section 3.23.4). This issue adds the repository URI to ToolRun and makes the SARIF export write versionControlProvenance for clean commits.
Acceptance criteria
- Criterion 1: ToolRun has a repository_uri field of type str | None.
Verification: Inspect the ToolRun class in src/devops_cli/security/tool_executor.py and confirm the field exists with the correct type. - Criterion 2: The repository URI is read from git and has no credential in it.
Verification: Run a tool on a checkout whose remote URL contains a token. Confirm ToolRun.repository_uri has no user:password@ part. - Criterion 3: The SARIF export writes versionControlProvenance with repositoryUri and revisionId when the commit is not dirty.
Verification: Run a review on a clean checkout. Parse findings.sarif and confirm versionControlProvenance has both repositoryUri and revisionId. - Criterion 4: The SARIF export writes no versionControlProvenance when the commit is dirty or None.
Verification: Run a review on a checkout with uncommitted changes in a target. Parse findings.sarif and confirm versionControlProvenance is absent. - Criterion 5: When the checkout has no remote, repository_uri is None and no versionControlProvenance is written.
Verification: Run a tool on a git checkout with no remote configured. Confirm ToolRun.repository_uri is None and the SARIF has no versionControlProvenance.
Key questions
- Which git command reads the repository URI?: Use git remote get-url origin, run through the existing _git helper. When no remote is configured, the field is None. (proposed)
- Where is the SARIF export code?: The export is devops_cli.security.sarif.to_sarif, as stated in the module docstring of tool_executor.py. [sources: src/devops_cli/security/tool_executor.py]
- Does the SARIF schema require repositoryUri in versionControlDetails?: Yes. The vendored schema lists repositoryUri as a required property of versionControlDetails. [sources: tests/fixtures/sarif-schema-2.1.0.json:2941]
- What happens when the checkout has no remote?: repository_uri is None, and the SARIF export writes no versionControlProvenance. (proposed)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard workscope/reviewMulti-persona code review engine, verification, and findingssource/agentFiled by an agenttype/featureType feature: a new functionvalue/mediumValue Medium
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 proposes a new feature to improve SARIF export capabilities.The change improves compliance with SARIF standards but does not fix a defect or security issue.The change helps users better understand where findings came from and ensures standard compliance.The change requires modifying how ToolRun handles repository information and updating SARIF export logic.Both items work on SARIF export but the first adds version control provenance while the second adds invocation information.feat(review): the SARIF export of a review carries the ToolRun of eac…
dan-petty commentedon Oct 28, 2026
Status set to Ready at bb46660 (see proposed design in issue body).
feat(review): the SARIF export writes how each tool run ended (#2620)
3 remaining items
docs(openspec): handle a malformed remote in the #2101 plan
docs(openspec): name the tests that the repository read breaks in the #…
docs(openspec): plan #2101 Add repo URI to ToolRun and SARIF (#3149)
[-]feat(review): a tool run names the repository of the checkout, and the SARIF export writes its version control provenance[/-][+]feat(review): Add repository URI to SARIF versionControlProvenance[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 107 characters, and the limit is 60. The type and the scope stay.
feat(review): a tool run names the repository of the checkout, and the SARIF export writes its version control provenancefeat(review): Add repository URI to SARIF versionControlProvenancedevops-cli-service commentedon Nov 6, 2026
Released in v0.70.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.70.0
devops-cli-service commentedon Nov 6, 2026
Live since 2026-11-06 16:15 UTC