Repository navigation
Description
Problem
A checksum proves that a downloaded archive was not corrupted in transit, but it does not prove who published it. A Nexy module can edit nexyconfig.py, install packages and run migrations, so a developer needs a way to verify the identity of a release before nx add writes anything.
Proposed solution
Add nx sign (also available as nexy sign) that signs a module release before publishing:
- Sign the archive checksum, not the whole registry record, so the signature stays valid across metadata edits.
- Support a local key stored outside the project and a keyless CI signature. The choice and the key format must be documented before implementation.
- Embed the signer identity, the module name, the version and the checksum in the signature file.
- Let
nx publishcarry the signature with the release; letnx addverify it before writing files. - Add
nx verify <name>@<version>to check a release without installing it. - Refuse to verify when the signer does not match the namespace owner recorded by the registry.
- Keep private keys out of the archive, the repository and terminal output.
Acceptance criteria:
- A signed release verifies with
nx verifyand installs withnx add. - A changed archive fails verification before any file is written.
- A signature from a signer who does not own the namespace is refused.
- An unsigned release is clearly labelled as unsigned, and the project trust setting decides whether it may install.
- Tests cover signing, verification, tampering, namespace mismatch, key handling and unsigned releases.
- A docs page explains key storage, CI signing, verification and what the signature does not guarantee.
Alternative solutions
Publish checksums only and ask developers to compare them by hand. That detects corruption but not a replacement of both archive and checksum by the same attacker.
Additional context
This issue depends on NexyPy/nx-registry#1 for the registry data contract. nx publish in #687 carries the signature and nx add in #686 verifies it. This issue covers signing and verification only, not dependency installation or registry hosting.
Validation
- I have searched existing issues and this is not a duplicate.
- I would be willing to help implement this feature.
Activity