Assay PR Agentsingle-pass review
Pages

CI reports

AbstractHadolint, zizmor and OSV-Scanner can reuse a report your own CI produced for the reviewed commit, and Assay's Go lint report is imported the same way. The reviewer verifies each report against the source commit, and falls back file by file.

Why reuse a report

A CI job you control already runs the scanner on every pull request. Reusing its report spares the reviewer a local run.

The reviewer takes a report only when it is tied to the exact commit under review. Anything that does not match, or that the report does not mention, is scanned locally as before.

The defaults

On a requested GitHub or GitLab review, the reviewer first looks for a finished run at the reviewed source commit. These work on both forges with no extra configuration:

ToolGitHub workflowGitHub artifact, or GitLab jobReport file inside it
Hadolinthadolint.ymlhadolinthadolint.json
zizmorzizmor.ymlzizmorzizmor.sarif
OSV-Scannerosv-scanner.ymlosv-scannerosv-scanner.json

The GitHub reviewer App needs Actions: read to retrieve artifacts. The GitLab reviewer token needs access to the target project's CI jobs and artifacts.

Point at your own job

To reuse an existing job, add a scanner_ci entry to the project, in REVIEW_PROJECTS or in projects.json. Its keys are the three tools, and each tool takes these settings:

SettingGitHubGitLab
producerThe workflow file name, or its numeric IDThe job name
artifactThe artifact name. It may contain {attempt} for the run's attempt number.Not used
reportThe report's path inside the artifactThe report's path inside the job's artifacts
all_pathsWhether a successful run covers every applicable file. Default false.The same
source_rootThe absolute checkout directory, for a custom runnerThe same
One project's scanner_ci, reusing a workflow named lint.yml.
  1. "scanner_ci": {
  2. "hadolint": {
  3. "producer": "lint.yml",

    Comment 1, on line 3: The workflow that ran Hadolint, by file name.

  4. "artifact": "lint-results",

    Comment 2, on line 4: The artifact its job uploads.

  5. "report": "reports/hadolint.json",

    Comment 3, on line 5: Where the Hadolint JSON sits inside that artifact.

  6. "all_paths": true

    Comment 4, on line 6: Set only because this workflow checks every changed Dockerfile.

  7. }
  8. }

Tying the report to the commit

The reviewer accepts a report only for the commit it is reviewing.

On GitHub it reads the latest run of the workflow for the source SHA. The run must have completed, with a conclusion of success or failure, and must hold exactly one unexpired artifact of that name.

On GitLab it checks that the merge request's SHA and the head pipeline's SHA are both the reviewed head, and that the named job succeeded or failed on that same commit.

Paths in a report are mapped from the standard checkout directories of each forge. Set source_root for a runner that checks out somewhere else.

Which files a report covers

By default, only the paths a report evidences are taken from it.

An empty Hadolint JSON array, for instance, cannot say which files CI checked. Set all_paths to true only for a producer that checks every applicable changed file, and reports a scanner error as a job failure. A successful report from such a producer covers clean files too. A failed producer supplies only the paths that have findings.

Missing, stale, expired, malformed or incomplete evidence falls back per uncovered file.

Importing the Go analysis report

Assay's pinned analysis action produces a Go lint report with new and worsened findings. To import it on a requested review, enter the project's trusted Go analysis workflow or job during setup, or add the go_analysis field to its project entry.

ForgeExample settingWhat the job must do
GitHub"go_analysis": "go-lint.yml"Run the Assay action on the pull request's source head. The reviewer reads the latest run for that SHA, and the artifact go-analysis-lint-<sha>-<run-id>-<attempt> of that exact attempt.
GitLab"go_analysis": "go-lint"Run the Assay scanner against the merge request's source head with GITHUB_REPOSITORY="$CI_PROJECT_PATH", and publish the report as report.json at the artifact root with artifacts: {when: always, paths: [report.json]}.

The reviewer looks up the report only while handling an authorized /review. It accepts a completed scan from a lint job that failed, and checks the repository and the analyzed source SHA before importing the new and worsened findings for changed paths.

  • Findings inside the shown hunks join the prompt and its token budget.
  • Findings outside them are counted in the summary.
  • If CI is still running, or the report is missing, expired, unreadable, invalid or for another head, the summary marks Go analysis as could not check, and the rest of the review proceeds.
  • A fresh /review after CI finishes can pick the report up. Ordinary polls and CI completion never trigger a model call.