Skip to content

fix(ingress): make certbot dependencies measured - #117

Merged
kvinwang merged 4 commits into
mainfrom
fix/ingress-build-time-deps
Sep 2, 2026
Merged

fix(ingress): make certbot dependencies measured#117
kvinwang merged 4 commits into
mainfrom
fix/ingress-build-time-deps

Conversation

@kvinwang

@kvinwang kvinwang commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Install certbot and DNS plugins at image build time with hash-pinned requirements. Remove runtime PyPI installation paths so TLS key-generation code is covered by image measurement. Verified two clean linux/amd64 OCI builds produce identical archive digest.

Copilot AI lite review requested due to automatic review settings September 2, 2026 06:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The Dockerfile timestamp normalization can unintentionally mutate symlink targets (hurting reproducibility), and certman.py’s new failure mode can surface as a generic “Unexpected error” rather than a clear, boolean failure.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR moves certbot (and DNS plugin) dependency installation from runtime to image build time, using hash-pinned Python requirements so certificate-related code paths are included in the measured image.

Changes:

  • Removed runtime pip install bootstrapping in ingress scripts and replaced it with “measured env must already contain deps” checks.
  • Simplified certman.py to stop attempting runtime plugin/certbot installation.
  • Added hash-pinned requirements.txt/requirements.in and installed them during the Docker build for reproducible, measured layers.
File summaries
File Description
custom-domain/dstack-ingress/scripts/tlsalpn.sh Removes runtime pip bootstrapping; validates the venv already contains required modules.
custom-domain/dstack-ingress/scripts/dns01.sh Removes runtime pip bootstrapping; validates certbot + AWS deps are present in the measured venv.
custom-domain/dstack-ingress/scripts/certman.py Removes runtime installation logic and shifts toward “dependency must already exist” behavior.
custom-domain/dstack-ingress/requirements.txt Adds hash-pinned Python dependency lock for deterministic installs.
custom-domain/dstack-ingress/requirements.in Adds the high-level dependency input list for generating the pinned lock.
custom-domain/dstack-ingress/Dockerfile Installs Python deps into /opt/app-venv at build time and normalizes timestamps for reproducibility.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread custom-domain/dstack-ingress/Dockerfile Outdated
Comment thread custom-domain/dstack-ingress/Dockerfile Outdated
Comment thread custom-domain/dstack-ingress/scripts/certman.py
Comment thread custom-domain/dstack-ingress/scripts/deterministic_key.py Fixed
@kvinwang
kvinwang merged commit 979bcfc into main Sep 2, 2026
6 checks passed
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