fix: add Ed25519 detached-signature verification to manifest/skill fetch (PILOT-111)#3
Merged
Merged
Conversation
…tch (PILOT-111) manifest.go: add ManifestPublicKey to fetcher, getOrVerify() fetches <url>.sig alongside each resource and verifies before accepting. Nil key preserves backward-compatible behavior (no verification). skillinject.go: add ManifestPublicKey ed25519.PublicKey to Config. zz_extra_branches_test.go: three tests covering valid-sig, wrong-key, and missing-.sig paths.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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 optional Ed25519 detached-signature verification to the skillinject fetcher. When
ManifestPublicKeyis set inConfig, the fetcher retrieves<url>.sigalongside each resource and verifies before accepting. When nil, behavior is unchanged (full backward compatibility).Why
The manifest and skill files are fetched over HTTPS without any payload integrity check beyond the TLS chain. A compromised or mis-issued CA (corporate proxy, captive portal, rogue CDN edge) could serve a forged manifest that installs arbitrary plugin code running with full daemon trust. This adds a cryptographic second factor independent of the TLS PKI.
Changes
fetchergets apublicKeyfield; newgetOrVerify()method fetches<url>and<url>.sig, verifies viaed25519.Verify. Backward compatible when key is nil.ManifestPublicKey ed25519.PublicKey.3 files changed, +128/-3 lines.
Ticket
🔗 https://vulturelabs.atlassian.net/browse/PILOT-111
Test plan
All existing tests pass. Three new tests cover the signature verification path.