Skip to content

Download a downloader that downloads a binary and doesn't verify hash before executing?! Trivial to MITM #1768

@clawclawclawlol

Description

@clawclawclawlol
  1. Add a release artifact like checksums.txt (all platform binaries) plus optional checksums.txt.minisig/checksums.txt.sig.
  2. In CI release workflow, generate checksums from built artifacts and publish them automatically.
  3. In CI, fail release if:
    • any expected platform artifact is missing,
    • checksum file does not match uploaded binaries,
    • signature verification step fails (if signing enabled).
  4. Change nix-installer.sh to fetch checksums.txt from the same tag and verify nix-installer-$arch against it (instead of hardcoded per-version hashes).
  5. Keep NIX_INSTALLER_EXPECTED_SHA256 as override, but make default path dynamic and tag-bound.
  6. Add a CI test matrix that runs the shell wrapper in dry-run mode for each supported arch mapping and asserts checksum verification logic passes/fails correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions