Repository navigation
feat(cli): allow CLI verify to accept a trusted public key - #183
Closed
Miracle778 wants to merge 1 commit into
Closed
Miracle778 wants to merge 1 commit into
Miracle778 wants to merge 1 commit into
Conversation
Signed-off-by: Miracle778 <37257176+Miracle778@users.noreply.github.com>
imran-siddique
approved these changes
Jun 22, 2026
imran-siddique
left a comment
Member
There was a problem hiding this comment.
LGTM — clean, well-scoped fix. Closes the keygen→sign→verify CLI loop, Ed25519-only is the right call for now, and the intentional non-goals are well-documented. Merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
--public-key PATHtomanifest verify, so the CLI can pass a trusted raw Ed25519 public key into the existing verifier and the documented localkeygen -> sign -> verifyworkflow can returnVALID.Why
Closes #182.
manifest keygenproducesprivate.hexandpublic.hex, andmanifest signcan sign with the private key — butmanifest verifypreviously had no way to consume the generatedpublic.hex. Because the verifier is fail-closed by design, a signed manifest without a trusted key correctly returned:{ "result": "UNVERIFIABLE", "signature_verified": false }The same manifest already verified as
VALIDthrough the SDK whenVerificationContext.trusted_keyswas provided, so the verifier capability existed — this was a CLI exposure gap, not a verifier gap.Before:
manifest keygen -d ./keys/ manifest sign draft.json --key keys/private.hex -o signed.json manifest verify signed.json # UNVERIFIABLEAfter:
manifest verify signed.json --public-key keys/public.hex # VALID{ "result": "VALID", "signature_verified": true }The CLI derives
key_id = sha256(public_key_bytes)andpublic_b64url = base64url(public_key_bytes, no padding), then passestrusted_keys={key_id: public_b64url}intoVerificationContext. It does not change verifier semantics, and it does not implicitly look uppublic.hex— the trust root stays explicit.Spec impact
None. SDK-only change; verifier semantics are unchanged.
Test plan
pytest -vpassestests/test_cli.py tests/test_public_api.py tests/test_verify.py-> 41 passedtests/test_examples.py-> 33 passedmypy src/agent_manifestpasses — not installed locally; left to CIruff check src/ tests/passes — not installed locally; left to CIpython/tests/test_cli.py:--public-keyremainsUNVERIFIABLE--public-keyreturnsVALID--public-keyreturnsMISMATCHCHANGELOG.mdupdated — N/A (no spec change)DCO
All commits in this PR are signed off (
git commit -s). By submitting this PR I certify the Developer Certificate of Origin.Notes / intentional non-goals
This first CLI option is intentionally Ed25519-only. It accepts the raw public key hex format already emitted by
manifest keygen, matching the existing CLIsign --keyEd25519 workflow.This PR intentionally does not add:
public.hexin the working directoryhybrid-Ed25519-ML-DSA-65) public key supportThe SDK and specification already account for
ML-DSA-65andhybrid-Ed25519-ML-DSA-65, but exposing those safely in the CLI needs a separate key-input / trust-store design (key file formats, whether the CLI should accept individual flags or a trust-store file, how key IDs map to algorithms, and how production issuer registries / PKI / KMS / transparency-log trust roots map into CLI inputs).That broader CLI/trust-store shape is a project-level interface decision, not something this small contributor PR should define implicitly. Multi-algorithm CLI support can follow once the maintainers decide the desired key/trust-store interface.
Files changed