Skip to content

fix(govulncheck): capture resource evidence for interrupted scans - #946

Merged
devantler merged 1 commit into
mainfrom
codex/govuln-resource-evidence-671-8282
Nov 15, 2026
Merged

devantler merged 1 commit into
mainfrom
codex/govuln-resource-evidence-671-8282

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Agentic Engineer

Why

Go validation sometimes loses its hosted runner before the vulnerability scan finishes. This blocks delivery without enough evidence to explain the interruption.

What

Records bounded Linux resource diagnostics while scans run and preserves their actual failure results. Diagnosing the original interruptions and verifying the repair in affected products remain follow-up work.

Part of #671

Stream bounded Linux host pressure and record scanner resource usage while preserving scan status and failure gates. Part of #671.
@github-code-quality

github-code-quality Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: Go, C#

Go / code-coverage/test

main 3cab796 codex/govuln-resourc... 3c136fc +/-
50% 50% 0%

C# / code-coverage/dotnet

main 3cab796 codex/govuln-resourc... 3c136fc +/-
100% 100% 0%

Go / code-coverage/go

main 3cab796 codex/govuln-resourc... 3c136fc +/-
50% 50% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 15, 2026 09:38 UTC

@devantler

devantler commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Validation and evaluation at 3c136fc475250bdb72b810d29e350864f4edd51d:

  • RED: the Linux evaluator test failed because resource sampling was absent. GREEN: the updated evaluator passes on macOS and in an Ubuntu 26.04 container with networking disabled. The Linux run exercises native vmstat and GNU time, checks that the sampler ends with a short scanner, and preserves the raw JSON report.
  • A scanner exiting 137 and a genuinely killed scanner both fail without publishing a clean verdict. Reachable findings, allowlist boundaries, malformed streams and unsupported scan levels retain their existing outcomes.
  • Download/wiring, default-branch coverage, CI selection/scope and all 16 repository baseline checks pass. Timeout-only retry and its refusal controls pass on Linux; their existing process-name stand-in cannot be discovered on macOS. The 24-minute attempt and 60-minute job limits are unchanged.
  • ShellCheck passes for the scanner and evaluator. The download test retains its existing literal-expression SC2016 informational diagnostics; no suppression was added.
  • A forge read of all 26 active repositories completed the consumer census after the local helper reported unpopulated checkouts. Direct callers are the shared workflow and its native fixtures, plus Platform’s dedicated scanner workflow; Platform, KSail, Go template and Bookkeeper call the shared workflow at immutable revisions. Interfaces and those consumer pins are unchanged.
  • Correctness and simplification review: diagnostics stay on stderr, the scanner executes once, its actual status is retained, and the sampler has a finite 49-sample bound. Only aggregate host pressure and scanner resource numbers are printed. No process list, environment, or credential is logged.

This exercises the diagnostic path with controlled scanner processes. The complete hosted CI result, consumer adoption, and attribution of an actual runner interruption remain unverified. The PR stays draft while CI runs; #671 and KSail #8391 remain open.

Hosted user-path observation: native Go 1.27.2 allowlisted fixture job 132768480924 completed successfully at this exact head. Its real scanner log carries native vmstat data, GNU time elapsed/peak-memory output, scanner_exit=0, and the expected accepted-advisory verdict. This proves the diagnostic path with a real Go scan; it does not reproduce or attribute the original runner losses.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The scan script adds optional Linux resource sampling with vmstat and timing metrics with GNU /usr/bin/time. It runs the scanner through a command array, preserves its exit status, and stops the monitor during cleanup. Tests cover resource and timing output, nonzero and killed scanner exits, and the absence of a clean verdict after a killed scan.

Possibly related issues

  • Issue 671 — The scan adds Linux host-pressure and scanner-resource sampling, which supports gathering evidence about premature runner shutdowns. It does not attribute the cause of an interruption.

Possibly related PRs

  • devantler-tech/.github#746 — Both changes affect the govulncheck download and scan flow, including how failures are classified and tested.
Merge Risk: Minimal · up to 3c136

This change adds bounded Linux resource diagnostics to vulnerability scans and keeps scanner results and failure outcomes unchanged. No actionable merge-blocking risk is identified. Whether the diagnostics explain the original runner interruptions is still to be seen after merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the govulncheck workflow now records resource evidence (host pressure and scanner resource data) for scans that get interrupted. The scan.sh and test changes match thi…
Description check Passed The description states the purpose (runner losses before the vulnerability scan finishes) and the change (bounded Linux resource diagnostics and preserved failure results in the govulncheck scan). It …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the govulncheck workflow now records resource evidence (host pressure and scanner resource data) for scans that get interrupted. The scan.sh and test changes match this. The title uses the conventional commit form and is 65 characters long.

Full details: Description check

Explanation

The description states the purpose (runner losses before the vulnerability scan finishes) and the change (bounded Linux resource diagnostics and preserved failure results in the govulncheck scan). It also names the follow-up work and links the issue, so it relates directly to the changeset.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3cab796 and 3c136fc.

Files selected for processing: 3

  • .github/actions/govulncheck/scan.sh
  • .github/tests/test-govulncheck-download.sh
  • .github/tests/test-govulncheck-scan.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 1

  • GitHub Check: CodeRabbit
Additional context used

Code guidelines: 2

actions/CONTRIBUTING.md — auto-discovered
CONTRIBUTING.md — auto-discovered
Path-based instructions: 2

Applicability reference: AGENTS.md: # AGENTS.md — devantler-tech/.github (GitHub-as-code) Full detail in [actions/CONTRIBUTING.md](actions/CONTRIBUTING.md).

CodeRabbit inference engine (actions/CONTRIBUTING.md)

Files:

  • .github/tests/test-govulncheck-download.sh
  • .github/tests/test-govulncheck-scan.sh
Applicability reference: AGENTS.md: # AGENTS.md — devantler-tech/.github (GitHub-as-code) Three things share one repo: **The org's public profile** — `profile/README.md` (rendered on the org page), plus the org-wide community health files i...

CodeRabbit inference engine (CONTRIBUTING.md)

Files:

  • .github/actions/govulncheck/scan.sh
  • .github/tests/test-govulncheck-download.sh
  • .github/tests/test-govulncheck-scan.sh

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Readiness at 3c136fc475250bdb72b810d29e350864f4edd51d:

  • Required CI and every readable required gate pass. The complete check rollup has no failure or pending work.
  • CodeRabbit’s substantive summary was posted after this head’s authenticated request, carries the full matching review range, and is GREEN under the reviewed summary classifier. There are zero unresolved threads and no outstanding body or ancillary findings.
  • User-path evaluation is the successful real Go scan and resource-output readback, in addition to the offline Linux refusal controls and the recorded local validation.
  • The base is current, the signed head is unchanged, no competing writer or human steering is present, and GitHub reports CLEAN / MERGEABLE.

The only unreadable rule is configured code quality. The reviewed merge policy leaves that rule to the normal protected merge API; this receipt does not call its analysis verified. I will use the ordinary squash merge pinned to this head, with no bypass. #671 remains open for consumer adoption and actual interruption attribution.

@devantler
devantler marked this pull request as ready for review November 15, 2026 10:03
@devantler
devantler merged commit ac1f346 into main Nov 15, 2026
241 checks passed
@devantler
devantler deleted the codex/govuln-resource-evidence-671-8282 branch November 15, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant