Skip to content

Fix CI pipeline and resolve security advisories#212

Merged
YASSERRMD merged 7 commits into
mainfrom
phase_14
May 30, 2026
Merged

Fix CI pipeline and resolve security advisories#212
YASSERRMD merged 7 commits into
mainfrom
phase_14

Conversation

@YASSERRMD

Copy link
Copy Markdown
Owner

Summary

  • Fix the failing CI pipeline (fmt, clippy, build, test) across the Rust workspace, leaving the frontend job untouched
  • Enable the rhai sync feature so Engine/AST are Send+Sync, and repair the expression engine $item/$items helpers (register StandardPackage for len(), rewrite reserved $-prefixed tokens, stop double-wrapping cached items)
  • Add a Postgres service + DATABASE_URL to the CI test job so the sqlx::test integration tests run, and seed an encryption key in the graceful-shutdown test
  • Resolve cargo audit advisories (Cargo.lock update) and ignore the unfixable rsa Marvin Attack advisory with justification
  • Add HMAC-SHA256 signature verification on incoming webhook requests

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo build --all-features
  • cargo test --all-features against a Postgres instance (all crates green)

YASSERRMD and others added 7 commits May 16, 2026 13:43
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
@YASSERRMD YASSERRMD merged commit 1ecf40f into main May 30, 2026
8 checks passed
@YASSERRMD YASSERRMD deleted the phase_14 branch May 30, 2026 19:08
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.

1 participant