← Back to Pull requests

Address the follow-ups of the provenance reviews #4594

Closed
unknown closed this pull request without merging on Oct 30, 2026 21:25 UTC
View on GitHub
unknown unknown commented on Oct 30, 2026 17:26 UTC
Author

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

The two follow-ups from the reviews of #4551 and #4550:

  • Looking for a bundle of the same statement on an image read every layer of every referrer with the predicate type annotation in full, so a large layer planted on a staged image could slow down the signing step or exhaust its memory, which the per-image timeout doesn't prevent. Only layers which the referrer manifest names as sigstore bundles (application/vnd.dev.sigstore.bundle…) of a known size of at most 4 MiB are read now, before anything is downloaded. They are read as stored, without decompressing them, since cosign writes bundles uncompressed: a small gzip layer can't expand past the limit, and the registry client checks the blob against the size and digest of the manifest. A limited reader backs that up. A bundle layer that can't be read, like one planted with a blob that doesn't match, is skipped with a warning instead of failing the step; at worst the bundle gets attached once more.

  • krel release takes the account to sign the final provenance as from the new --signing-account flag, which defaults to GOOGLE_SERVICE_ACCOUNT_NAME, instead of SignProvenance reading the environment. The account is part of ReleaseOptions now, so the release job, which sets the variable, behaves the same. The account is only needed when there is something to sign, so local mock runs without final attestations don't need it. The flag only applies to local runs (--submit=false); submitted jobs sign as the account of the release job, so setting it together with --submit logs a warning.
  • Which issue(s) this PR fixes:

    Part of #2616

    Special notes for your reviewer:

    The registry test plants our statement in a layer of another media type, in a bundle layer above the limit and in a gzipped bundle layer; none counts. A referrer whose bundle layers have an unknown size or a blob that was never pushed is skipped. Without the size check, or with the layers decompressed again, that test fails. The release tests pass the account through the options. The regenerated fake uses counterfeiter v6.12.2 like the existing one, so it only changes SignProvenance.

    Does this PR introduce a user-facing change?

    ``release-note
    krel release takes the Google service account to sign the provenance as from the new
    --signing-account flag, which defaults to GOOGLE_SERVICE_ACCOUNT_NAME.
    ``

    Diff: 308 lines (+231 / -77) across 3 files Reviewer: xmudrii Review duration: 239m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 308 lines diff across 3 files
    0.40
    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.343
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4594"
    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: 40.2% (MEDIUM) · Higher = larger blast radius
    40.2%
    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: 15.9% · Safe to merge
    15.9%