helpfulengineering / helpfulengineering/supply-graph-ai
Cryptographic package signing for OKH packages
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15
- Forks
- 6
- Avg merge
- 1h 12m
- Merged PRs (30d)
- 108
Description
Context
OKH package integrity is currently based on SHA-256 checksums in metadata/file-manifest.json. The federation layer already has cryptographic signing infrastructure (identity.sign_json in src/core/federation/) and signs catalog records per-manifest, but built packages are not signed.
This is listed as a planned future enhancement in docs/packaging/okh-packages.md.
What to change
- Wire the existing
NodeIdentity.sign_jsonfrom the federation layer to package signing - When a package is built, generate a
metadata/package-signature.jsoncontaining:signed_by: the node's DIDsignature: hex signature over the canonicalfile-manifest.jsoncontentsigned_at: ISO timestampalgorithm:"ed25519"(matching existing federation identity)
- Add
ohm package verify-signature <org/name> <version>to validate the signature against the known public key - Include signature in push/pull workflow (pushed packages carry their signature; pulled packages can be verified)
Acceptance criteria
- Built packages include
metadata/package-signature.json -
ohm package verify-signaturevalidates the signature and reports pass/fail - Packages built without an identity (no federation config) skip signing gracefully with a warning
- Signature is preserved through push/pull round-trips
- Unit tests cover signing and verification; tampered-manifest detection
Dependencies
Depends on federation identity infrastructure in src/core/federation/identity.py (already implemented).
Notes
The federation layer's existing signing scheme uses Ed25519 via the node's DID key. Reuse this directly — do not introduce a second signing mechanism.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/core/federation/identity.py and docs/packaging/okh-packages.md, then trace the package build, push, pull, and command entry points. Reuse the existing Ed25519 signing flow and add tests for signing, verification, tampered manifests, missing identities, and push/pull preservation. Done means signed packages verify through the new command and unsigned builds warn and continue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, security, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100