Skip to content

ci: verify the InRelease signature before trusting its freshness#27

Merged
Jaro-c merged 1 commit into
mainfrom
ci/health-check-verify-signature
Jun 25, 2026
Merged

ci: verify the InRelease signature before trusting its freshness#27
Jaro-c merged 1 commit into
mainfrom
ci/health-check-verify-signature

Conversation

@Jaro-c

@Jaro-c Jaro-c commented Jun 25, 2026

Copy link
Copy Markdown
Member

What

The scheduled health check now verifies the InRelease GPG signature against the committed archive public key (keyring/glyndor-apt-key.asc) before reading the Date field, and reads that field from the cryptographically verified body rather than the raw download.

Why

The check read Date: straight from the downloaded InRelease. An attacker able to serve a response, or a poisoned cache, could present an unsigned body with a fresh Date and the staleness alert would pass — the freshness signal was spoofable. This does not weaken what apt clients trust (they verify the index themselves), but the monitor that guards against a silent stale archive must gate on the same anchor. A missing or untrusted signature now fails the check loudly.

Notes

  • Adds a checkout step so the workflow can reach the committed public key.
  • Verifies in a throwaway GNUPGHOME, cleaned up on exit.
  • I tested the clearsign flow locally: valid admitted, tampered rejected, untrusted-key rejected.

The health check read the Date field straight from the downloaded
InRelease body, so an attacker or a poisoned cache could serve an
unsigned response with a fresh Date and the staleness alert would pass.

I now import the committed archive public key and gpg --decrypt the
InRelease before reading anything from it, so the Date comes from the
cryptographically verified body — the same trust anchor apt clients use.
A missing or untrusted signature now fails the check loudly.

Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
@Jaro-c Jaro-c added area:ci Subsystem: ci effort:XS Extra small prio:P2 Medium priority status:review In review type:security Security-relevant change labels Jun 25, 2026
@Jaro-c Jaro-c merged commit 718d3cf into main Jun 25, 2026
3 checks passed
@Jaro-c Jaro-c deleted the ci/health-check-verify-signature branch June 25, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Subsystem: ci effort:XS Extra small prio:P2 Medium priority status:review In review type:security Security-relevant change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant