Repository navigation
Conversation
…lts for provider types Auth fields (webhook_secret_key, header_key, ...) at the top level of source config were dropped by the API, creating an unverified source with exit 0. Fail with the corrected JSON instead. The webhook-secret shorthand now sends only the secret for provider source types so the API applies their own header/algorithm/encoding defaults (e.g. VAPI x-signature); WEBHOOK/HTTP keep x-webhook-signature/sha256/hex. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Auth fields placed at the top level of
--config/--source-configwere silently dropped by the API, so this exited 0 and created a source with no signature verification:The CLI forwards config JSON unchanged except four legacy keys (
webhook_secret,api_key,basic_auth,hmac), and the API validates withstripUnknown: true, so nothing reported the problem.Changes
validateSourceConfigAuthShaperejectswebhook_secret_key,algorithm,encoding,header_key,trim_payload,api_key,usernameandpasswordat the top level of source config, names them, and prints the corrected JSON with secrets as<placeholder>. Applies tosource create/upsert/update(--config,--config-file) andconnection create/upsert(--source-config,--source-config-file).--webhook-secret,--source-webhook-secretand the legacywebhook_secretkey send onlywebhook_secret_keyfor provider types (e.g. VAPI, STRIPE), so the API applies the type's own defaults (VAPI:x-signature). WEBHOOK, HTTP and an empty type keepx-webhook-signature/sha256/hex, since they have no server-side defaults.pkg/cmd/source_common_test.go.go build ./...,go test ./...andgofmtpass.Unfinished (for whoever takes this to completion)
auth, so this needs one test against a real API to see what can be detected.Related: #341 (CLI-side auth validation is inert), #412 (source update config rejected), #466 (success reported while a change is ignored). The API side is in hookdeck/core.
🤖 Generated with Claude Code