Skip to content

Use the pinned CA bundle for Maven artifact downloads - #55

Merged
Avimitin merged 4 commits into
masterfrom
fix/certificate-file-fallback
Jul 29, 2026
Merged

Avimitin merged 4 commits into
masterfrom
fix/certificate-file-fallback

Conversation

@Avimitin

@Avimitin Avimitin commented Jul 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • force Maven artifact builders to use the pinned cacert bundle from the Nix store
  • keep TLS certificate verification enabled for every cache-miss download
  • prevent a daemon-supplied NIX_SSL_CERT_FILE=/no-cert-file.crt from overriding the builder certificate path
  • retain the standard Nix fetcher proxy environment and recursive NAR-hash verification
  • run the Chisel integration workflow for pull requests again, while retaining its weekly schedule

Security model

Nixpkgs fetchurl can use /no-cert-file.crt and curl --insecure for a known fixed-output hash because Nix still verifies content integrity. MIF does not need that tradeoff: cacert is an explicit builder input and Maven repositories are expected to use authenticated HTTPS.

A missing artifact therefore receives two checks:

  1. curl authenticates the Maven server with the pinned CA bundle.
  2. Nix verifies the complete artifact directory against its recursive NAR hash.

If the derivation output already exists, the downloader does not run.

Validation

  • rebuilt a real Maven fixed-output derivation while exporting NIX_SSL_CERT_FILE=/no-cert-file.crt
  • confirmed the generated derivation uses the cacert store path and contains no --insecure option
  • nix build .#checks.x86_64-linux.maven-fetch-environment --no-link
  • nix flake check --no-build
  • nix develop .#ci --command mill --no-daemon mif.test (137/137)

The Chisel integration job is enabled on pull_request so this PR runs the clean-runner integration coverage.

@Avimitin Avimitin changed the title Fall back when the Nix certificate path is unavailable Match fetchurl TLS handling for artifact downloads Jul 29, 2026
@Avimitin Avimitin changed the title Match fetchurl TLS handling for artifact downloads Use the pinned CA bundle for Maven artifact downloads Jul 29, 2026
@Avimitin
Avimitin merged commit e9cef46 into master Jul 29, 2026
11 checks passed
@Avimitin
Avimitin deleted the fix/certificate-file-fallback branch July 29, 2026 04:49
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