Skip to content

fix(webhook): wire HMAC signing secret through daemon CLI flags (PILOT-90) - #439

Merged
TeoSlayer merged 1 commit into
mainfrom
openclaw/pilot-90-20260729-033253
Jul 29, 2026
Merged

fix(webhook): wire HMAC signing secret through daemon CLI flags (PILOT-90)#439
TeoSlayer merged 1 commit into
mainfrom
openclaw/pilot-90-20260729-033253

Conversation

@matthew-pilot

Copy link
Copy Markdown
Collaborator

Fix: Wire webhook HMAC signing secret through daemon CLI flags

The webhook library already supports WithSecret and X-Pilot-Signature-256 header output — this was implemented and merged in pilot-protocol/webhook#3. However, the daemon's main.go never added the --webhook-secret flag or threaded it through to webhook.WithSecret(), so the signing capability was inaccessible from the running daemon.

What changed

  1. Added --webhook-secret flag (env fallback: PILOT_WEBHOOK_SECRET) to cmd/daemon/main.go
  2. Wired it via webhook.WithSecret(*webhookSecret) in the NewService call

Verification

  • go build ./cmd/daemon/...
  • go vet ./cmd/daemon/...
  • Empty secret = no signature header (backward compatible, existing behavior)

Closes PILOT-90

…T-90)

The webhook.Client already supported WithSecret and X-Pilot-Signature-256
header output since PR #3 (merged). However, the daemon's main.go never
added the --webhook-secret flag or threaded it to webhook.WithSecret(),
so the signing capability was inaccessible from the running daemon.

This 2-line change adds:
- --webhook-secret flag (env: PILOT_WEBHOOK_SECRET)
- webhook.WithSecret(*webhookSecret) wiring in NewService call

Backward compatible: empty secret = no signature header (existing behavior).

Closes PILOT-90
@matthew-pilot
matthew-pilot requested a review from TeoSlayer as a code owner July 29, 2026 03:34
@TeoSlayer
TeoSlayer merged commit c9bafff into main Jul 29, 2026
14 checks passed
@TeoSlayer
TeoSlayer deleted the openclaw/pilot-90-20260729-033253 branch July 29, 2026 15:43
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.

2 participants