Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds `webhook_secret: Option<String>` to `WebhookEndpoint`. When set, every incoming request must carry an `X-Barqflow-Signature-256: sha256=<hex>` header whose value is `HMAC-SHA256(secret, raw_body)`. Verification uses constant-time comparison via the `hmac` crate to prevent timing attacks. Requests without or with an invalid signature are rejected with 403. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Five unit tests covering: valid signature passes, wrong secret rejected, missing header rejected, secret-less endpoint bypasses check, and tampered body rejected. All test the pure `verify_hmac_signature` function without requiring a database. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update transitive deps to patched releases: quinn-proto 0.11.14 (RUSTSEC-2026-0037), rustls-webpki 0.103.13 (RUSTSEC-2026-0049/0098/0099/0104), thin-vec 0.2.18 (RUSTSEC-2026-0103), rand 0.8.6/0.9.4/0.10.1 (RUSTSEC-2026-0097), and the wasm-bindgen/js-sys/web-sys family off yanked versions. Add .cargo/audit.toml ignoring RUSTSEC-2023-0071 (rsa Marvin Attack): no upstream fix exists, it is unavoidable via sqlx-mysql, and our only direct use is public-key signature verification, which is not exposed to the timing sidechannel on private-key operations.
Resolve the failing CI pipeline (all jobs except the frontend build): - Enable the rhai `sync` feature so Engine/AST are Send+Sync, fixing the 184 Send/Sync build errors in barqflow-exec. - Repair the expression engine `$item`/`$items` helpers: register the StandardPackage so `len()` and friends resolve, rewrite the reserved ` -prefixed tokens to plain identifiers, and return cached items verbatim instead of double-wrapping them. - Satisfy clippy `-D warnings` across exec, nodes, api and server (collapsible_if, manual_clamp, needless_range_loop, bool asserts, orphan-rule impl, too_many_arguments, derivable defaults, etc.). - Apply rustfmt across the workspace. - Add a Postgres service and DATABASE_URL to the test job so the sqlx::test integration tests run, and seed an encryption key in the graceful-shutdown test.
The set_var call added for the graceful-shutdown test exceeded rustfmt's call-arg wrapping threshold and broke the fmt CI job; format it across multiple lines.
# Conflicts: # crates/api/src/controllers/webhooks.rs
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.
Summary
syncfeature so Engine/AST are Send+Sync, and repair the expression engine$item/$itemshelpers (register StandardPackage forlen(), rewrite reserved$-prefixed tokens, stop double-wrapping cached items)DATABASE_URLto the CI test job so thesqlx::testintegration tests run, and seed an encryption key in the graceful-shutdown testTest plan
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo build --all-featurescargo test --all-featuresagainst a Postgres instance (all crates green)