Repository navigation
Feat(sonatype): Expose scan results from the lane - #228
ModeSevenIndustrialSolutions merged 1 commit into
Conversation
Carry what sonatype-lifecycle-scan-action v0.3.0 reports through the
sonatype-lifecycle.yaml lane, so a caller's vote or comment step can
link to the scan:
- Pin the action at v0.3.0 by commit SHA.
- Add a scan_summary input ('outcome', 'full' or 'none', default
'outcome'), validated in gerrit-validate and passed to the action
as summary. Its description says what 'full' costs: the result
file becomes a run artifact, and a failed upload fails the scan.
- Give the scan step an id and expose scan_id, report_url and
result_category (the action's cli_exit_category) as workflow
outputs. Their descriptions mark them as Nexus IQ data, to pass
through env: and never expand in a run: block.
- On scan_mode 'sbom', which skips the action, write a short job
summary section: the SBOM was uploaded for the application, Nexus
IQ evaluates it asynchronously and the result is on the server.
The three outputs are empty on that path.
tests/scan-summary-steps.sh covers the validation, the wiring and the
sbom summary. It sits beside tests/workflow-steps.sh, which is an
executable file this change could not edit, and workflow-tests.yaml
runs it. The README documents the input and outputs.
Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The new scan_summary: full IQ artifact uploads and downloads still need credentialed end-to-end validation against the organization’s effective egress policy in the block-mode hardened scan job.
No open issues 🎉
What changed in this PR
Exposes Sonatype Lifecycle scan results through the reusable workflow so callers can link to Nexus IQ reports in votes or comments, addressing #226.
Changes:
- Updates the scan action to v0.3.0 and adds validated
scan_summarycontrol. - Exposes
scan_id,report_url, andresult_categoryoutputs, plus a separate summary for asynchronous Go SBOM uploads. - Documents result handling and adds automated validation and wiring checks.
| File | Description |
|---|---|
tests/scan-summary-steps.sh |
Adds checks for input validation, action wiring, outputs, and SBOM summaries. |
README.md |
Documents summary options, outputs, visibility, and safe handling. |
.github/workflows/workflow-tests.yaml |
Runs the new scan-result tests in CI. |
.github/workflows/sonatype-lifecycle.yaml |
Updates the action pin and adds summary control, result outputs, and SBOM reporting. |
Review effort: Balanced
There was a problem hiding this comment.
🤖 Antagonistic review by agent: no line-level findings; the summary below is the verdict.
No concrete defects found in the supplied diff: input validation, output wiring, and SBOM summary behavior match the documented change. The external action's implementation and artifact-upload compatibility with the egress allow-list could not be verified from the offline materials.
Antagonistic round 1 of 3.
Automated antagonistic review by lf-releng-antagonistic-review-bot[bot] using model gpt-6-astra; see the run. This is not a human review and never an approval: a maintainer must still review and approve this pull request.
7068945
into
lfreleng-actions:main
Closes #226
Authored by an AI agent; human review required
claude-opus-5.5via GitHub Copilot CLIa2c5ea848360155fe91447e5e4a7fac11f159eddbash tests/scan-summary-steps.shtests/workflow-steps.shprek run --files .github/workflows/sonatype-lifecycle.yaml .github/workflows/workflow-tests.yaml README.md tests/scan-summary-steps.shprek run --files .github/workflows/sonatype-lifecycle.yaml .github/workflows/workflow-tests.yaml README.md tests/scan-summary-steps.shuvx zizmor --offline --persona auditor .github/workflows/sonatype-lifecycle.yaml .github/workflows/workflow-tests.yamlAISLOP_NO_TELEMETRY=1 aislop scan --base a2c5ea848360155fe91447e5e4a7fac11f159edd --jsongit commit -s (pre-commit and commit-msg hooks incl. gitlint)bash tests/scan-summary-steps.shtests/workflow-steps.shbash tests/python-warning-steps.shprek run --files .github/workflows/sonatype-lifecycle.yaml .github/workflows/workflow-tests.yaml README.md tests/scan-summary-steps.shThe
github-code-monkey-botworkflow opened this pull request.Nobody has merged it; a maintainer must review it first.
Review findings on this pull request are answered by a later revision round of this workflow, up to ten rounds per antagonistic review round; after that a maintainer, or the next antagonistic review, takes on any finding that remains, and a maintainer reviews every round before merge.
Carries what
sonatype-lifecycle-scan-actionv0.3.0 reports through thesonatype-lifecycle.yamllane, so a caller's vote or comment step can link to the scan.What changed
Sonatype Lifecycle scanstep now pinslfreleng-actions/sonatype-lifecycle-scan-action@e457b6bf235973c91888b7ab645593f635209875 # v0.3.0(the release commit, not the annotated tag object).scan_summaryinput:outcome(default),fullornone, passed to the action assummary. A newValidate scan_summary inputstep ingerrit-validaterejects anything else. The description says whatfullcosts: the result file becomes a run artifact, and a failed upload fails the scan.id: scan;jobs.scan.outputsand the workflow'soutputsgainscan_id,report_urlandresult_category(the action'scli_exit_category), in the style ofgo_version. Each description says the value is Nexus IQ data to pass throughenv:and never expand in arun:block, and that it is empty withscan_mode: 'sbom'.Summarise Go SBOM uploadstep, gated exactly like the upload step, writes a short job-summary section: the SBOM was uploaded for the application, Nexus IQ evaluates it asynchronously, and the result is on the server. It receives only the application id, notnexus_iq_password.full, that the job summary is as visible as the run, and theenv:rule for the outputs.tests/scan-summary-steps.sh(33 cases) runs the validation and SBOM-summary steps lifted from the lane and checks the wiring (step id, SHA pin form,summaryinput, outputs climbing step → job → workflow). It followstests/workflow-steps.sh, but sits in its own file because that harness is executable and this workflow cannot edit executable files.workflow-tests.yamlruns it.Checks run
bash tests/scan-summary-steps.sh: 33/33 passedtests/workflow-steps.sh: 119/119 passed;bash tests/python-warning-steps.sh: passedprek run --files <changed files>: all hooks passed (including actionlint, zizmor, shellcheck, markdownlint, reuse, gitlint at commit)uvx zizmor --offline --persona auditoron both changed workflows: no findingsaislop scan --base <base>with telemetry off: emptydiagnosticsFor reviewers
result_categoryand mapped it to the action'scli_exit_category. Rename tocli_exit_categoryif mirroring the action's name is preferred.fulland egress: withscan_summary: fullthe action uploads an artifact from inside the hardened scan job. I could not check whether the organisation egress allow-list covers the artifact upload endpoints; if it does not,fullwill fail under block mode.iq_cli_versiondefault (2.13.0-01) says it mirrors the action's default. I could not read v0.3.0'saction.yamlfrom here, so please confirm the default did not change in this release.docs/BRIEF.mdand the example callers are unchanged; the examples could later show a vote/comment step consumingreport_urlthroughenv:.