Skip to content

feat: implement Ed25519 signing, commit uv.lock - #29

Merged
Patel230 merged 2 commits into
mainfrom
fix/audit-sweep-2026-08
Aug 16, 2026
Merged

Patel230 merged 2 commits into
mainfrom
fix/audit-sweep-2026-08

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Summary

  • Ed25519 signingsign_manifest.py now supports --ed25519 mode (additive, alongside HMAC; CI stays green). Key sourcing mirrors HMAC: env SKILLS_ED25519_PRIVATE_KEY or --key (PEM literal/file path). keygen subcommand writes keypair (private chmod 0600). 23 tests, 95% file coverage.
  • uv.lock committed for reproducible builds.
  • Docstring fixed to describe actual implementation (was: "HMAC-SHA256 or Ed25519").

Test plan

  • pytest tests/test_sign_manifest.py — 23 pass
  • ruff check . clean
  • Full suite: 371 tests, 90% coverage (gate: 88%)

The docstring promised Ed25519 but only HMAC-SHA256 with a shared secret
existed — anyone holding the secret (every verifier) could forge
signatures. Implement Ed25519 as an additive mode:

- keygen subcommand generates an Ed25519 keypair (private PEM chmod 0600,
  public PEM safe to commit/pin)
- sign/verify gain --ed25519; --key accepts literal PEM or a PEM file path
- keys fall back to SKILLS_ED25519_PRIVATE_KEY / SKILLS_ED25519_PUBLIC_KEY
  env vars, mirroring how the HMAC secret is sourced from CI secrets
- sign output now records its algorithm (hmac-sha256 or ed25519)
- publish-registry workflow prefers Ed25519 when the
  SKILLS_ED25519_PRIVATE_KEY secret exists, else falls back to legacy HMAC
  so CI keeps working; making Ed25519 mandatory is a follow-up
- fix the docstring to describe both schemes accurately
- cryptography added to dependencies (lazy-imported, HMAC path stays
  stdlib-only)

Legacy HMAC functions keep their signatures; existing tests unchanged.
The repo ships a Dockerfile and pyproject.toml, so dependency resolution
should be pinned for reproducibility; uv.lock was listed under a
'Temporary' section of .gitignore and never committed. uv lock --check
verifies the lockfile matches pyproject (including the new cryptography
dependency).
@Patel230
Patel230 merged commit 3631a79 into main Aug 16, 2026
5 checks passed
@Patel230
Patel230 deleted the fix/audit-sweep-2026-08 branch August 16, 2026 15:53
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