Skip to content

Add reqsig envelope package and driver sign/verify methods#34

Merged
TeoSlayer merged 4 commits into
mainfrom
feat/reqsig-envelope
Jul 3, 2026
Merged

Add reqsig envelope package and driver sign/verify methods#34
TeoSlayer merged 4 commits into
mainfrom
feat/reqsig-envelope

Conversation

@TeoSlayer

Copy link
Copy Markdown
Contributor

Summary

  • New reqsig package: canonical pilot-req-v1 request-signature envelopes (domain-separated, fixed-charset fields, ±300s freshness, strict canonical parsing) proving a request originates from a registered Pilot node
  • pilot-verdict-v1 registry verdicts with a build-embedded kid keyring (fail-closed, ldflags-overridable) for offline verification
  • Driver: SignEnvelope / VerifyEnvelope / VerifyEnvelopeMaxSkew mirroring daemon IPC commands 0x33–0x36

First of four PRs for the external signature-verification capability (registry HTTPS endpoint, daemon IPC, app-store origin/appkit follow). Spec lands in pilotprotocol docs/SIGNATURE-VERIFICATION.md.

Testing

  • go test ./reqsig/ ./driver/ — envelope/verdict round-trips, tamper/parse rejection tables, keyring fail-closed, driver wire-shape tests

🤖 Generated with Claude Code

- reqsig: canonical pilot-req-v1 request envelopes (domain-separated,
  fixed-charset fields, +/-300s freshness, strict canonical parsing) and
  pilot-verdict-v1 registry verdicts with a build-embedded kid keyring
  (fail-closed, ldflags-overridable)
- driver: SignEnvelope / VerifyEnvelope / VerifyEnvelopeMaxSkew mirroring
  daemon IPC commands 0x33-0x36
Comment thread driver/driver.go Fixed
Comment thread driver/driver.go Fixed
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.88538% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
reqsig/reqsig.go 91.07% 5 Missing and 5 partials ⚠️
reqsig/verdict.go 96.46% 2 Missing and 2 partials ⚠️
driver/ipc.go 33.33% 1 Missing and 1 partial ⚠️
ipcutil/ipcutil.go 0.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

teovl added 3 commits July 3, 2026 23:08
- SignEnvelope validates body hash length (64 hex) and audience (1-64)
  client-side; VerifyEnvelope bounds envelope (512) and signature (128)
  so request-frame allocation is independent of caller input
- error-path tests for reqsig envelope/verdict validation branches
Read already rejected oversized frames; Write now refuses them before
allocation instead of writing bytes the peer would drop.
@TeoSlayer TeoSlayer merged commit 3aba140 into main Jul 3, 2026
11 checks passed
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.

3 participants