Skip to content

verify: report E_SIG_INVALID_KEY when no runtime key is given#16

Merged
samjanny merged 1 commit into
mainfrom
fix/verify-no-key-diagnostic
Jun 3, 2026
Merged

verify: report E_SIG_INVALID_KEY when no runtime key is given#16
samjanny merged 1 commit into
mainfrom
fix/verify-no-key-diagnostic

Conversation

@samjanny
Copy link
Copy Markdown
Owner

@samjanny samjanny commented Jun 3, 2026

Fixes the low-severity audit finding: verifying a content/transaction without --expected-runtime-pubkey fabricated an all-zero RuntimePubkey, so the reject surfaced as E_SIG_VERIFICATION - indistinguishable from a genuinely bad signature, so automation could not tell 'manifest context omitted' from 'bad signature'.

A missing authorizing key is not a signature failure. Report it as E_SIG_INVALID_KEY before attempting verification, matching the entangled-core reference runner's handling. Confirmed: no key -> E_SIG_INVALID_KEY; valid key -> accept; wrong key -> E_SIG_VERIFICATION (the three are now distinct).

Add an integration test asserting the diagnostic (not just the exit code), and update the README and example wording. fmt, clippy -D warnings, build, and test green with --locked.

Verifying a content or transaction without --expected-runtime-pubkey
fabricated an all-zero RuntimePubkey and let the signature check fail, so
the reject surfaced as E_SIG_VERIFICATION - indistinguishable from a
genuinely bad signature. A missing authorizing key is not a signature
failure: report it as E_SIG_INVALID_KEY before attempting verification,
matching the entangled-core reference runner. Automation can now tell
'no manifest context' apart from 'bad signature'.

Add an integration test asserting the diagnostic, and update the README
and example wording.
@samjanny samjanny merged commit ae056d7 into main Jun 3, 2026
6 checks passed
@samjanny samjanny deleted the fix/verify-no-key-diagnostic branch June 3, 2026 14:47
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