helpfulengineering / helpfulengineering/supply-graph-ai

Cryptographic package signing for OKH packages

Open
#175 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature priority-2
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_json from the federation layer to package signing
  • When a package is built, generate a metadata/package-signature.json containing:
    • signed_by: the node's DID
    • signature: hex signature over the canonical file-manifest.json content
    • signed_at: ISO timestamp
    • algorithm: "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-signature validates 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.