← Back to Pull requests

Add Prow evidence and proof-gated AWS leak cleanup #4

Closed
unknown closed this pull request without merging on Nov 26, 2026 12:33 UTC
View on GitHub
unknown unknown commented on Nov 25, 2026 15:15 UTC
Author

What changed

  • Save a versioned AWS inventory, then inspect only LEAKED and UNCERTAIN candidates against archived HyperShift Prow periodics. Match by Prow tag or by the SHA-256 of PROW_JOB_ID, and link exact VPC or endpoint creation evidence when available.

  • Add a standalone Tokyo Night HTML report and cleanleaked flow / make flow to save the scan, proof, and HTML together without deleting anything.

  • Refresh inventory before cleanup and require proof by default. Only infra sets still classified as LEAKED can be deleted. The proof must match the current region, VPC IDs, and owners. A 10-character hash without a matching tag also needs a creation-log resource match for every VPC.

  • Update both READMEs with the workflow, coverage limits, and cleanup behavior.
  • Operational impact

    --confirm skips prompts, not proof or classification. --require-proof=false is an explicit override for operators who have reviewed the inventory manually. Cleanup can return exit status 2 after deleting proven candidates if other leaks were skipped for insufficient proof. Prow proof establishes provenance, not that every associated resource is unused or exclusively owned. The public archive lookup does not cover presubmits.

    Validation

  • GOTOOLCHAIN=go1.26.3 make verify and GOTOOLCHAIN=go1.26.3 go test -race ./....

  • Ran the investigation flow with simulated AWS and the public Prow archive. It matched a failed run and corroborated an exact VPC ID in its creation log.

  • Exercised the real CLI against a simulated AWS inventory with seven infra sets. Both --confirm and an accepted interactive prompt sent deletion requests only for the proved leak and its associated fixtures. Dry-run, missing proof, and a declined prompt sent zero deletion requests. No live AWS cleanup was run.
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Added a guided AWS leak-investigation flow that scans resources, checks archived Prow runs for provenance, saves reports, and suggests cleanup steps without deleting resources.
    Added HTML reports with verdict summaries, AWS inventory links, and available Prow evidence.
    Added proof-based cleanup: deletion requires eligible LEAKED findings and sufficient evidence from an unsuccessful archived Prow run. Interactive cleanup displays proof details before confirmation.
    Improvements
    Scan and proof results can be saved as JSON, and targeted cleanup verifies the full VPC inventory before proceeding.
    * Updated setup and command guidance for investigation, reporting, and cleanup workflows.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 344 lines (+258 / -86) across 4 files Reviewer: sdminonne Review duration: 1278m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 344 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.350
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.4% (MEDIUM) · Higher = larger blast radius
    42.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.7% · Safe to merge
    16.7%