Skip to content

fix(images): refresh ca-certificates in scratch runtime images - #3678

Merged
migmartri merged 1 commit into
mainfrom
matias/eng-515-refresh-ca-certificates-in-scratch-images-to-distrust
Oct 21, 2026
Merged

migmartri merged 1 commit into
mainfrom
matias/eng-515-refresh-ca-certificates-in-scratch-images-to-distrust

Conversation

@matiasinsaurralde

@matiasinsaurralde matiasinsaurralde commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The control-plane, CAS, and CLI images are built FROM scratch and copy the Debian ca-certificates bundle out of the digest-pinned golang builder without refreshing it. That freezes the trust store at whatever shipped in the pinned builder, so the images keep trusting roots that have since been distrusted upstream (such as the compromised emSign ECC Root CA - G3).

This refreshes ca-certificates in each builder stage before it is copied into the scratch stage, so every rebuild ships the current distrust list regardless of the base-image digest. The migrations image is unaffected as it carries no CA bundle.

Closes ENG-515

View guided diff

The control-plane, CAS, and CLI images are built FROM scratch and copy the
Debian ca-certificates bundle out of the digest-pinned golang builder without
refreshing it, which freezes the trust store at whatever shipped in the pinned
builder. The images therefore keep trusting roots that have been distrusted
upstream, such as the compromised emSign ECC Root CA - G3.

Refresh ca-certificates in each builder stage before copying it into the
scratch stage, so every rebuild ships the current distrust list regardless of
the base-image digest. The migrations image is unaffected as it carries no CA
bundle.

Chainloop-Trace-Sessions: bebfb52d-8100-43df-bd87-a23b8013317b

Signed-off-by: Matías Insaurralde <matias@chainloop.dev>
@chainloop-platform

chainloop-platform Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

PR validation — ✅ 3 passing

Status Policy Material Messages
✅ Passed pr-min-approvals pr-info -
✅ Passed pr-description-required pr-info -
✅ Passed pr-user-story-linked pr-info -

View attestation ↗

AI Session Checks — 🟢 83% · ✅ 0 failing

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟢 83% 1 ✅ 0 100% AI / 0% Human 3 +18 / -1 2h2m57s

🟢 83% — 100% AI — ✅ All policies passing

Oct 20, 2026 22:39 UTC · 2h2m57s · $35.63 · 332 in / 490.5k out · claude-code 2.1.305 (claude-opus-4-8)

View session details ↗

Change Summary

  • Adds apt-get-based ca-certificates refreshes to the control-plane and artifact-cas builder stages.
  • Folds the same refresh into the CLI builder's existing RUN while preserving /rootfs/tmp permissions.
  • Validates main versus fix images with Docker bundle extraction and a SystemCertPool probe.

AI Session Overall Score

🟢 83% — Well-scoped fix with strong local validation; released-image verification remains unproven.

AI Session Analysis Breakdown

🟢 90% · scope-discipline

🟢 Only the three target Dockerfiles were committed; adjacent files stayed untouched. · High Impact

🟢 90% · user-trust-signal

🟢 The user kept delegating instead of correcting, ending with a push-ready next step. · High Impact

🟢 88% · solution-quality

🟢 Kept digest pinning while moving trust freshness into the builder stage. · High Impact

🟢 84% · alignment

No notes.

🟢 83% · context-and-planning

No notes.

🟡 72% · verification

🟠 The session proved local main-vs-fix behavior, not the ticket's published-image grep ... == 0 acceptance checks. · Medium Severity

💡 When the ticket names a published-image check, rerun that exact command on the released image before closing verification.


File Attribution

████████████████████ 100% AI / 0% Human

Status Attribution File Lines
modified ai app/cli/Dockerfile.goreleaser +6 / -1
modified ai app/artifact-cas/Dockerfile.goreleaser +6 / -0
modified ai app/controlplane/Dockerfile.goreleaser +6 / -0

Policies (5)

Status Policy Material Messages
✅ Passed ai-session-no-auto-pr ai-coding-session-bebfb5 -
✅ Passed ai-config-ai-agents-allowed ai-coding-session-bebfb5 -
✅ Passed ai-config-no-dangerous-commands ai-coding-session-bebfb5 -
✅ Passed ai-config-no-secrets ai-coding-session-bebfb5 -
✅ Passed ai-config-mcp-servers-allowed ai-coding-session-bebfb5 -

Security Checks — ✅ 5 passing

✅ secret-scan

Status Policy Messages
✅ Passed secrets-detection -

✅ sast-scan

Status Policy Messages
✅ Passed owasp-top10-2025 -
✅ Passed sast -
✅ Passed cwe-top25 -
✅ Passed cwe-top26-40-cusp -
Scans not applied (3)
Scan Reason
vulnerability-scan no manifest/lockfile changed
github-actions-scan no workflow files changed
iac-scan no IaC files changed

View attestation ↗

Security context

✅ Nothing this change touches has a recorded security-fix history.

View in Chainloop ↗ · How this works ↗


Powered by Chainloop and Chainloop Trace

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

View guided diff | Re-trigger cubic

@matiasinsaurralde
matiasinsaurralde requested a review from a team October 21, 2026 00:48
@javirln

javirln commented Oct 21, 2026

Copy link
Copy Markdown
Member

We would have to check dagger as well

@migmartri
migmartri merged commit a1c0166 into main Oct 21, 2026
17 checks passed
@migmartri
migmartri deleted the matias/eng-515-refresh-ca-certificates-in-scratch-images-to-distrust branch October 21, 2026 06:21
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.

3 participants