Skip to content

ci: pin regctl release + widen toolchain freshness-guard bats coverage (#1304) - #1313

Merged
Wikid82 merged 2 commits into
mainfrom
ci/toolchain-followups-1304
Sep 8, 2026
Merged

Wikid82 merged 2 commits into
mainfrom
ci/toolchain-followups-1304

Conversation

@Wikid82

@Wikid82 Wikid82 commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

Small non-blocking follow-ups from the prebuilt-toolchain-image work (#1300), tracked in #1304.

Item A — pin the regctl release version

.github/workflows/quality-checks.yml verify-toolchain-pin job installed regctl via iarekylew00t/regctl-installer with the action's default regctl-release: latest, so a new regctl release could shift this required check's behavior with no repo change. Now pinned to regctl-release: v0.11.6 (current stable, released 2026-09-02) with a comment explaining why.

Item B — widen the freshness-guard bats matrix

scripts/tests/verify-toolchain-pin.bats:

  • same-repo run where the pinned :$KEY tag does not resolve in the registry -> hard exit 1 (failure-closed). New tf_stub_regctl_unresolvable helper mock (image digest exits non-zero), reusing the existing PATH-stub pattern.
  • CHARON_TOOLCHAIN_DIGEST blank value and ARG line absent -> hard exit 1.

scripts/tests/toolchain-key.bats:

  • per-input sensitivity for the FROM tonistiigi/xx:... pin and ARG ALPINE_IMAGE — changing either flips the recomputed key; an unchanged re-emit keeps it stable. New TF_XX_PIN / TF_ALPINE_IMAGE fixture knobs.

Also hardened verify-toolchain-pin.sh arg_value(): a missing ARG line now yields empty output instead of aborting the script under set -e before the actionable CHARON_TOOLCHAIN_DIGEST not found error can print.

bats scripts/tests/ — 27/27 green. shellcheck --severity=error clean on all changed .sh/.bash. lefthook run pre-commit clean.

Not in scope

make build-offline CI coverage and the caddy-geoip2 pin (no upstream tag yet) remain parked in #1304.

The verify-toolchain-pin job installed regctl via regctl-installer with the
action's default 'latest' release, so a new regctl could change this
required check's behavior without any change in the repo. Pin it to an
explicit released version (v0.11.6) for reproducibility.

Claude-Session: https://claude.ai/code/session_01KXA4x9LrA2AsnLrvdHMZbS
verify-toolchain-pin.bats: add the branches flagged as uncovered in the
prebuilt-toolchain-image review —
  * same-repo run where the pinned :$KEY tag does not resolve in GHCR
    -> hard exit 1 (failure-closed)
  * CHARON_TOOLCHAIN_DIGEST blank / ARG line absent -> hard exit 1

toolchain-key.bats: add per-input sensitivity cases for the tonistiigi/xx
pin and the ALPINE_IMAGE pin (each change flips the recomputed key; an
unchanged re-emit keeps it stable).

Helper gains TF_XX_PIN / TF_ALPINE_IMAGE knobs and a
tf_stub_regctl_unresolvable mock (image digest exits non-zero), reusing
the existing PATH-stub pattern.

Also harden verify-toolchain-pin.sh's arg_value(): a missing ARG line now
yields empty output instead of aborting the script under 'set -e' before
the actionable CHARON_TOOLCHAIN_DIGEST error can print.

Claude-Session: https://claude.ai/code/session_01KXA4x9LrA2AsnLrvdHMZbS
@github-advanced-security

Copy link
Copy Markdown
Contributor

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

✅ Supply Chain Verification Results

✅ PASSED

📦 SBOM Summary

  • Components: 1769

🔍 Vulnerability Scan

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 0
🟢 Low 0
Total 0

📎 Artifacts

  • SBOM (CycloneDX JSON) and Grype results available in workflow artifacts

Generated by Supply Chain Verification workflow • View Details

@Wikid82
Wikid82 merged commit b174acc into main Sep 8, 2026
41 of 42 checks passed
@Wikid82
Wikid82 deleted the ci/toolchain-followups-1304 branch September 18, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants