Skip to content

ci: allow apt HTTPS SRV lookups and sigstore TUF in harden-runner - #2727

Open
stevebeattie wants to merge 1 commit into
chainguard-dev:mainfrom
stevebeattie:harden-runner/allow-apt-srv-and-sigstore-tuf
Open

stevebeattie wants to merge 1 commit into
chainguard-dev:mainfrom
stevebeattie:harden-runner/allow-apt-srv-and-sigstore-tuf

Conversation

@stevebeattie

Copy link
Copy Markdown
Member

Summary

Follow-up to #2715. Since it merged, the apt jobs pass, but the StepSecurity Harden-Runner summary check is still red on most PRs because of two kinds of blocked DNS lookup.

1. apt SRV lookups for the HTTPS fallback mirrors

#2715 allowed archive.ubuntu.com:443 and security.ubuntu.com:443, the HTTPS fallbacks in the runner image's /etc/apt/apt-mirrors.txt. The fallback works: on #2715's own CI, the Azure mirror failed mid-install and apt downloaded qemu-system-x86 from https://archive.ubuntu.com instead (job log).

Before connecting, apt's https method looks up an SRV record for _https._tcp.<host>. harden-runner drops that lookup and flags it. apt carries on with a normal DNS lookup, so nothing fails, but the alert appears whenever the Azure mirror flakes: on #2715, #2716, #2718, #2719 and #2722. The original failing trace on #2714 shows the same dropped lookup for _https._tcp.security.ubuntu.com.

This adds both SRV names, matching the existing _https._tcp.esm.ubuntu.com and _https._tcp.motd.ubuntu.com entries.

2. tuf-repo-cdn.sigstore.dev in wolfi-presubmit

wolfi-dev/os@208e4a2c1f (2026-10-24, "ci: run upstream go tests for 9 packages") added upstream-tests/go-test to gitsign.yaml. The Build packages (qemu, gitsign) leg of wolfi-presubmit builds wolfi-dev/os at HEAD, so it now runs gitsign's own Go test suite, and that suite fetches the sigstore TUF trust root. The timing matches: runs before 10-24 (#2718, #2719) don't show this lookup, and runs after it do (#2662, #2716, #2722, #2723). The tests currently pass with it blocked.

Approved endpoints

Endpoint Jobs Rationale
_https._tcp.archive.ubuntu.com:443 test-packages, build-packages SRV lookup apt does before using the archive.ubuntu.com HTTPS fallback
_https._tcp.security.ubuntu.com:443 test-packages, build-packages SRV lookup apt does before using the security.ubuntu.com HTTPS fallback
tuf-repo-cdn.sigstore.dev:443 build-packages (wolfi-presubmit) sigstore TUF trust root, fetched by gitsign's upstream Go test suite

Normalization notes

Entries are inserted in the existing alphabetical order. No existing entries were changed or removed.

Links

🤖 Generated with Claude Code

Follow-up to chainguard-dev#2715. The HTTPS apt fallbacks now work, but before
connecting to them apt's https method does an SRV lookup for
_https._tcp.<host>, which harden-runner drops and reports as an
anomalous call. The jobs still pass (apt falls back to A records), but
the StepSecurity Harden-Runner summary check stays red on every PR
where the Azure mirror flakes. Allow the SRV names for both fallback
hosts in test-packages and build-packages, matching the existing
_https._tcp.esm/motd.ubuntu.com entries.

Also allow tuf-repo-cdn.sigstore.dev:443 in wolfi-presubmit's
build-packages. wolfi-dev/os 208e4a2c1f (2026-10-24) added
upstream-tests/go-test to gitsign.yaml, so the gitsign leg now runs
gitsign's Go test suite, which fetches the sigstore TUF trust root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stevebeattie
stevebeattie force-pushed the harden-runner/allow-apt-srv-and-sigstore-tuf branch from f78a6b5 to f5aca0a Compare October 29, 2026 04:40
@stevebeattie

Copy link
Copy Markdown
Member Author

Force pushed to correct the gitsign signature.

@stevebeattie
stevebeattie enabled auto-merge (squash) October 29, 2026 04:42
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.

1 participant