Repository navigation
chore(deps): update barbacane-libinjection to 0.1.2 - #263
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 1
Please check the settings in the CodeRabbit UI or the
|
The WAF's libinjection classifiers follow libinjection 4.0.1: `1.e`-style numbers produce no SQLi token, `LIKE (` after an operand is not a function, a 0xFF byte no longer ends HTML5 tokenizing, and the XSS event-handler list has 432 entries. barbacane-waf 0.1.1 already admits 0.1.2, so only Cargo.lock changes.
ndreno
force-pushed
the
chore/libinjection-0.1.2
branch
from
November 4, 2026 09:09
3904d94 to
46b2db4
Compare
Merged
ndreno
added a commit
that referenced
this pull request
Nov 8, 2026
* chore(deps): update spin from yanked 0.9.8 to 0.9.9 (#252) spin 0.9.8 is yanked from crates.io, and `cargo deny check` warns about it. It comes in through multer, axum's multipart parser in barbacane-control; 0.9.9 is within multer's range, so only the lockfile changes. Signed-off-by: Nicolas Dreno <nicolas.dreno@barbacane.dev> (cherry picked from commit 04a0f82) * chore(deps): replace serde_yaml with yaml_serde (#255) serde_yaml 0.9 is deprecated, and its parser unsafe-libyaml is unmaintained (RUSTSEC-2024-0449, ignored in deny.toml since #249). yaml_serde is serde_yaml continued by the YAML Organization, with the same API, and its parser libyaml-rs is unsafe-libyaml under the YAML Organization's maintenance. The swap is a rename at each call site and the advisory ignore is removed. Compared with serde_yaml 0.9 on 151 YAML and JSON files from this repository and the playground, 11 published specs (GitHub JSON and YAML, Stripe JSON and YAML, Box, Asana, Kubernetes, AsyncAPI examples) and 36 edge cases (YAML 1.1 booleans, leading-zero and underscore numbers, non-finite floats, merge keys, duplicate keys, tags, alias bomb, nesting past 128), yaml_serde produces the same values and the same errors, at the same speed. libyaml-rs is still the c2rust translation of libyaml. Moving to a parser written in safe Rust is tracked in #254. fuzz/Cargo.lock is left as is: it has not followed the workspace since June, and resolving it changes 78 packages. Signed-off-by: Nicolas Dreno <nicolas.dreno@barbacane.dev> (cherry picked from commit 27a9b10) * test(s3): accept a failed write when an oversize upload is refused a_body_over_the_limit_is_refused_before_the_plugin failed on #257's integration shard 3 with reqwest::Error { kind: Request, ... BrokenPipe }. The gateway answers 413 from the declared Content-Length without reading the body (main.rs, the content-length check before the body is read), and closes the connection while the client is still writing the MAX_BODY + 1 bytes; whether the client reads the 413 or fails its write depends on timing. The test accepts either outcome and still asserts that nothing reaches S3. Signed-off-by: Nicolas Dreno <nicolas.dreno@barbacane.dev> (cherry picked from commit 7e39ae3) * fix(deps): update for 29 advisories published since 0.12.3 (#262) cargo deny failed on main's CI from 2026-11-01 with 29 advisories. Fixed by updates within the existing requirements: - wasmtime 48.0.5 -> 48.0.8 (cranelift 0.135.8): 17 advisories. The one reaching the gateway with arbitrary code is RUSTSEC-2026-0379 (aarch64 Cranelift miscompiles a large br_table, letting a plugin jump to arbitrary code), which affects the linux/arm64 images and the aarch64 binaries. RUSTSEC-2026-0364 (exceptions) and -0359 (GC recursive types) concern features left on; the rest are component-model only or need i31/nullref arguments on host-to-guest calls. - rustls 0.23.46, rustls-webpki 0.103.16, webpki-roots 1.0.11: six. - tokio 1.54.1: RUSTSEC-2026-0386. - zstd-sys 2.1.2: RUSTSEC-2026-0410. p256 0.13 -> 0.14 in barbacane-test (test-only) moves crypto-bigint to 0.7 (RUSTSEC-2026-0387); `to_encoded_point` is `to_sec1_point` there. Ignored, with the reason in deny.toml: RUSTSEC-2026-0391, -0398, -0403 in zstd 0.13 / zstd-safe 7. rskafka 0.6 (latest) and wasmtime-internal-cache (through 50.0.1) still require zstd ^0.13. The gateway produces Kafka records with Compression::NoCompression and never consumes, does not enable the Wasmtime cache, and builds zstd-safe without `seekable`. Signed-off-by: Nicolas Dreno <nicolas.dreno@barbacane.dev> (cherry picked from commit e775fa6) * chore(deps): update barbacane-libinjection to 0.1.2 (#263) The WAF's libinjection classifiers follow libinjection 4.0.1: `1.e`-style numbers produce no SQLi token, `LIKE (` after an operand is not a function, a 0xFF byte no longer ends HTML5 tokenizing, and the XSS event-handler list has 432 entries. barbacane-waf 0.1.1 already admits 0.1.2, so only Cargo.lock changes. (cherry picked from commit 2f8a3f4) * fix(auth): keep group names with commas whole in the group list (#270) Auth plugins publish groups in x-auth-consumer-groups and auth.groups joined with commas, and acl splits on commas, so a group name containing a comma (an LDAP DN with group_name_from_dn off, an RDN value with an escaped comma, a single-group oidc claim, a scope or array element) was read as several groups. barbacane_plugin_sdk::groups encodes the list losslessly: names joined with `,`, and inside a name `,` written as %2C and `%` as %25. Names without either character are unchanged. apikey-auth, basic-auth, jwt-auth, ldap-auth, oauth2-auth and oidc-auth encode with it, and acl decodes with it. Each plugin keeps its rule for what counts as one group (a jwt-auth string claim with commas is still a list). The acl fixture gains two operations whose basic-auth user has a DN as its role: a deny rule naming the DN, and an allow rule naming a part of it. The access_control tests check both are refused. (cherry picked from commit 35665a1) * fix(control): compile with the capabilities plugins embed (#268) Control-plane compilations built every plugin bundle with empty capabilities and through barbacane_compiler::compile, so their artifacts carried capabilities_enforced: false. The worker now reads each registry plugin's body_access and host_functions from the plugin.toml embedded in its WASM (barbacane_compiler::embedded_capabilities) and compiles with compile_with_capabilities, which marks the artifact capability-authoritative like compile_with_manifest. A plugin without an embedded manifest is refused with E1041, since its capabilities are unknown. The worker also derives secret_fields from the embedded config schema, so the plaintext-secret warning (E1070) applies to control-plane builds, and the E1040 message no longer points at a UI page. Bundle construction moves into registry_bundle, a pure function with unit tests; with the previous behaviour restored, both worker tests and the compile_with_capabilities test fail. (cherry picked from commit c4baef4) * fix(control): end data-plane sessions when their API key is revoked (#271) A data plane's WebSocket session is authenticated once, at registration. The connection manager now records the API key each session registered with, and the revoke endpoint signals that key's sessions, which send a disconnect message and a policy-violation close frame. Each session also rechecks its key at the heartbeat interval (ApiKeysRepository::is_active), so a key that expires, or one revoked through another control-plane instance, ends the session within one interval. The authz security test registers a data plane over the WebSocket, revokes its key through the API and checks the socket closes within five seconds. (cherry picked from commit 1f1500d) * fix(ldap): refuse an empty password in host_ldap_bind (#269) A simple bind with a DN and an empty password is an unauthenticated bind (RFC 4513 §5.1.2), which a directory may accept without checking the DN. host_ldap_bind is the host's credential check, so it now returns invalid_credentials for an empty password before connecting. ldap-auth already refused it itself; the host now does for any plugin with the ldap capability. The test listens on a local port standing in for the directory and checks that the bind is refused without a connection being made. (cherry picked from commit ca449bf) * fix(artifact): check every archive member against the manifest on load (#267) The data plane reads a .bca once (ArtifactArchive::read), refusing a member path that appears twice, and verifies it before using any of it (ArtifactArchive::verify): artifact_hash, then every member against the checksums the hash covers (the checksum table and source_specs), then parses routes, specs, plugins and the WAF rule set from the verified bytes. A member the manifest does not list, or a listed member the archive lacks, is refused. Each plugin is read only from plugins/<name>.wasm, and its plugins[].sha256 must agree with the checksum table. The signature check runs before the members are parsed. load_specs, load_plugins, load_waf_rules, verify_plugin_checksum and verify_waf_rules are replaced by this path; the WAF stage takes the verified rule set. The compiler refuses two specs with the same file name (E1058), since the archive stores specs by file name. The artifact integrity security tests rewrite artifacts so that every member stays well formed (valid routes JSON, a valid module with its manifest digest updated, a plugin entry pointed at another member, a rewritten spec, a duplicated member) and check that the gateway refuses each one. (cherry picked from commit 04fe9f1) * fix(data-plane): parse a served spec with the compiler's parser (#284) /__barbacane/specs/{file} reads every spec with yaml_serde, as the compiler and the merged spec endpoints do, whatever its file name, strips the x-barbacane-* extensions, and answers 500 for a spec that does not parse. The specs tests gain a spec written in YAML under a .json file name, served parsed and without its extensions. (cherry picked from commit 17c7e88) * fix(response-transformer): refuse a response whose fields cannot be removed (#285) With `body.remove` configured, a response is answered 502 problem+json (urn:barbacane:error:response-transform-failed) when its body is not JSON or a remove pointer does not parse. `body.allow_non_json: true` lets a body that is not JSON through unchanged, for operations whose upstream also returns other content types. Without `remove`, a body that is not JSON passes through as before. The config schema requires every body pointer (add and rename keys, rename targets, remove items) to start with `/`, so a mistyped pointer fails compilation with E1023. The plugin tests cover both refusals, `allow_non_json` and the passthrough without removals; plugin_schemas covers the pointer pattern. (cherry picked from commit 4880fee) * fix: bound metric method labels and encode mock placeholder values (#292) telemetry: every recorder labels the method as itself when it is GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH or QUERY, and as OTHER otherwise, so the series count does not depend on what clients send. Paths were already route templates or one unmatched label. mock: placeholder values come from the request and are encoded for the configured content_type: as the inside of a JSON string for application/json and +json types (with <, > and & escaped too), as HTML text for any other type. The observability and dispatchers guides document both. (cherry picked from commit 73ddb4f) * chore(release): 0.12.4 --------- Signed-off-by: Nicolas Dreno <nicolas.dreno@barbacane.dev>
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
Updates
barbacane-libinjectionfrom 0.1.1 to 0.1.2, which tracks libinjection 4.0.1.barbacane-waf0.1.1 requires0.1.1, which admits 0.1.2, so onlyCargo.lockchanges (plus a CHANGELOG entry).Detection changes in the WAF's
@detectSQLiand@detectXSS:1.e, which MySQL ignores, produces no SQLi token, so1' or 1.e(1)is flagged.LIKE (after an operand is read as an operator, not a function call.SQLi and XSS verdicts still match the C library over the port's 163,275-input differential corpus.
Testing
cargo check -p barbacane --locked: clean.cargo test -p barbacane waf: 17 passed.cargo deny check: advisories, bans, licenses and sources ok.