diff --git a/Cargo.lock b/Cargo.lock index 6aa958eb8..3c321669f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -321,7 +321,7 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -359,7 +359,7 @@ dependencies = [ "manyhow", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -375,7 +375,7 @@ dependencies = [ "proc-macro2", "quote", "quote-use", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -563,7 +563,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 3.0.9", + "syn 3.0.10", "tempfile", "toml", ] @@ -865,7 +865,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -930,7 +930,7 @@ checksum = "fc0e56a716f1e132ff6bf4bdac1c944a3fcdc1cae65f70a4a2a1ac3b401d2d1f" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -1163,7 +1163,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -1232,7 +1232,7 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -1895,7 +1895,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -2107,7 +2107,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -2135,9 +2135,9 @@ checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fancy-regex" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20ed7f62ce0ae0da1a8b93c3c7104ab7e0760a74491e097c701fff966e945390" +checksum = "0a2e16b9a584b602f1e0e5e22c30ca0906786088c27500653e432d086def8b53" dependencies = [ "bit-set 0.8.0", "regex-automata", @@ -2329,7 +2329,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -2404,7 +2404,7 @@ checksum = "28f0daa179069133df60523e0f59d0a6bd2d3db9ccae01b630896d269c4a802e" dependencies = [ "attribute-derive", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -3428,7 +3428,7 @@ checksum = "77060ebe535362c3da75682cd17b0431017b6e7c5661e714fc69a7ad017d1301" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -3534,7 +3534,7 @@ dependencies = [ "manyhow-macros", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -3778,9 +3778,9 @@ checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" [[package]] name = "napi" -version = "3.16.1" +version = "3.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907ff7366fb7182e28edd0f08ef8ac5d6b13b8d65a3c0b3a10bf3ac092437d6b" +checksum = "567c62b9c2d0fae123713f766686ad66a2c75b45ba3ee01ed8b06a7e99bc435b" dependencies = [ "bitflags 2.13.2", "ctor", @@ -3801,29 +3801,29 @@ checksum = "b899b545d3aa6dca985939059f258c5488d34e4ecf39c274e20009748f4b846d" [[package]] name = "napi-derive" -version = "3.7.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32eb00f92f84cf462fc328f49082b29c2a7d2eebeb1d447d19c1f9fdd9f89ee" +checksum = "94c8098ed9d61a1bbd019519c637817531b0e24023ef4b5678f2f0cbe24bed9c" dependencies = [ "convert_case", "ctor", "napi-derive-backend", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] name = "napi-derive-backend" -version = "7.0.0" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1fe28c64d8fc12e69f9b817d0febdbe7914555760f1e353106281b8ff99cc90" +checksum = "314cd6ca42bd978fd8bae84b4137e1322bbf3e83552fca8dbd7d18034188ff3a" dependencies = [ "convert_case", "proc-macro2", "quote", "semver", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -4764,7 +4764,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bfe0f4c752e450fc2faf62654f1c134747922825d5b04ca717b8874f41a40c0" dependencies = [ "proc-macro2", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -4945,7 +4945,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -4957,7 +4957,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -5004,7 +5004,7 @@ dependencies = [ "proc-macro-utils", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -5190,7 +5190,7 @@ checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -5584,7 +5584,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -5642,7 +5642,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -5757,7 +5757,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -5931,7 +5931,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -5942,7 +5942,7 @@ checksum = "f852137cce035d6a4df67ccce505ff6b3e9fd3a10e3e52b24dc71e650bb1a9bd" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -6012,7 +6012,7 @@ checksum = "a22144e767da4ddd8416dbf383700542ffd8a5dc493dfecedfe1fe3ad03c98ae" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -6447,9 +6447,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.9" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" dependencies = [ "proc-macro2", "quote", @@ -6521,7 +6521,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -6595,7 +6595,7 @@ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -6667,7 +6667,7 @@ checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -7330,7 +7330,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", "wasm-bindgen-shared", ] @@ -7671,7 +7671,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -8066,7 +8066,7 @@ checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] diff --git a/crates/bashkit/tests/integration/python_integration_tests.rs b/crates/bashkit/tests/integration/python_integration_tests.rs index 7c65e184f..35a412d91 100644 --- a/crates/bashkit/tests/integration/python_integration_tests.rs +++ b/crates/bashkit/tests/integration/python_integration_tests.rs @@ -1668,6 +1668,7 @@ mod edge_cases { // 0.20 changed two things these cases pin: `\xHH` above 0x7F in Unicode mode // now matches the codepoint rather than the raw byte, and word boundaries // compile to one delegated engine instead of one branch per alternative. +// 0.20.1 then made positive lookaheads atomic, which is what CPython does. // Every expected value here is what CPython 3.11 prints for the same program. mod regex_semantics { use super::*; @@ -1717,6 +1718,16 @@ mod regex_semantics { let out = re_line(r"print(bool(re.search(r'(?<=ab)c', 'abc')))").await; assert_eq!(out, "True\n"); } + + #[tokio::test] + async fn positive_lookahead_is_atomic() { + // 0.20.1 made a positive lookahead atomic, as CPython's is: once it has + // matched, a later failure does not backtrack into it for another way of + // matching, so the group it captured stays what the first way captured. + // CPython 3.11 prints False; fancy-regex 0.20.0 matched here. + let out = re_line(r"print(bool(re.search(r'(?=x|(x))\1x', 'xx')))").await; + assert_eq!(out, "False\n"); + } } // ============================================================================= diff --git a/crates/bashkit/tests/integration/regex_limit_tests.rs b/crates/bashkit/tests/integration/regex_limit_tests.rs index 6f4358461..09f7cea7f 100644 --- a/crates/bashkit/tests/integration/regex_limit_tests.rs +++ b/crates/bashkit/tests/integration/regex_limit_tests.rs @@ -108,3 +108,48 @@ async fn awk_rejects_huge_regex_in_match() { } } } + +/// A backreference inside the group it refers to used to panic fancy-regex's +/// backtracking VM on the second iteration (slice index out of range in +/// `vm.rs`), which `catch_unwind` (TM-INT-001) turned into +/// `grep: builtin failed unexpectedly`. fancy-regex 0.20.2 reads the group's +/// previous capture instead, as PCRE and Perl do, so the pattern matches. +#[tokio::test] +async fn grep_perl_backref_inside_own_group_matches() { + let mut bash = Bash::new(); + let result = bash + .exec(r"printf 'abab\n' | grep -P '(?:(\1|a)b){2}'") + .await + .unwrap(); + assert_eq!(result.exit_code, 0, "stderr: {}", result.stderr); + assert_eq!(result.stdout.trim(), "abab"); + assert_eq!(result.stderr, "", "no internal error may be reported"); +} + +/// Same pattern, no match: the engine must report "not found", not an error. +#[tokio::test] +async fn grep_perl_backref_inside_own_group_without_match() { + let mut bash = Bash::new(); + let result = bash + .exec(r"printf 'ab\n' | grep -P '(?:(\1|a)b){2}'") + .await + .unwrap(); + assert_eq!(result.exit_code, 1, "stderr: {}", result.stderr); + assert_eq!(result.stdout, ""); + assert_eq!(result.stderr, "", "no internal error may be reported"); +} + +/// Positive lookaheads are atomic, as in Oniguruma and PCRE: once one has +/// matched, a later failure no longer backtracks into it for another way of +/// matching. `(?=x|(x))\1x` therefore no longer matches `xx`. +#[tokio::test] +async fn grep_perl_positive_lookahead_is_atomic() { + let mut bash = Bash::new(); + let result = bash + .exec(r"printf 'xx\n' | grep -P '(?=x|(x))\1x'") + .await + .unwrap(); + assert_eq!(result.exit_code, 1, "stderr: {}", result.stderr); + assert_eq!(result.stdout, ""); + assert_eq!(result.stderr, "", "no internal error may be reported"); +} diff --git a/knowledge/log.md b/knowledge/log.md index d8546af08..ce08f2bec 100644 --- a/knowledge/log.md +++ b/knowledge/log.md @@ -1,5 +1,9 @@ # Bashkit Knowledge Update Log +## 2026-11-17 + +* **fancy-regex 0.20.2, syn 3.0.10 and the napi group**: `fancy-regex` 0.20.0 -> 0.20.2, `napi` 3.16.1 -> 3.16.2, `napi-derive` 3.7.0 -> 3.7.1, `napi-derive-backend` 7.0.0 -> 7.0.1 and `syn` 3.0.9 -> 3.0.10, with five hand delta audits. Same shape as #2792 and the 2026-11-03 napi group: Dependabot cannot write supply-chain audits, so the bump failed `Audit` alone and every other job was green. fancy-regex is the half that reaches tenant input, since `grep -P`, `sed`, `awk`, `rg`, `find` and `jq` all compile caller-supplied patterns through it, and 0.20.1/0.20.2 are mostly semantics parity with Oniguruma and PCRE: a backref or conditional inside the group it refers to now sees that group's *previous* capture, which is also what stops `(?:(\1|a)b){2}` panicking on `abab` -- a panic a tenant could reach through any of those builtins, contained by the per-builtin `catch_unwind` (TM-INT-001) as `grep: builtin failed unexpectedly`; positive lookaheads became atomic; inline flags set inside a capturing, named, atomic, lookaround, conditional or absent group stop leaking past it; a conditional whose condition fails no longer leaves its entry on the VM stack for an enclosing atomic group to read. The parse changes that are Oniguruma-mode only (`{,}` literal, `a{3}?` as a second quantifier, `\cX` escapes) do not reach this tree: no builtin turns that mode on, not even `jq`, whose dialect is approximated with plain fancy-regex. The unsound KeepOut and trailing-lookahead optimizer rewrites moved behind an `OptimizeOptions.find_not_empty` tier, so `find_not_empty` patterns now get the safe rewrites instead of skipping the whole pass. `Expr::has_descendant` became recursive, bounded by the parser's `MAX_RECURSION` of 64. napi 3.16.2 is the per-env teardown release: every per-thread cache (the custom-GC handle, the class constructor table, the `Reflect` intrinsics) becomes an `EnvRegistration` keyed by env and released from that env's cleanup hook, which is what `bashkit-js` needs where one thread hosts several envs, and an `AsyncTask` promise no longer leaks its `napi_deferred` when a worker is terminated mid-task -- an env that does not die with its process now settles through a thenable whose resolving functions are deleted on every path, including a settlement the env refused. Its one new native capability is that mode detection: `dlsym(RTLD_DEFAULT, ...)` with no `dlopen`, `uv_default_loop()` called only in a host that exports `node::Buffer::Data`, and a presence-only read of `process.versions`; a faked one can only move an env to the other mode, which costs main-thread CPU or the old 16-byte-per-task leak. The derive backend stops generating a `NapiRefContainer` with its own `unsafe impl Send`/`Sync` and roots async arguments in the borrow scope instead (generated unsafe 67 -> 61 occurrences), and napi-derive 3.7.1 has no source change at all. syn 3.0.10 touches only `fixup.rs` precedence printing. The panic and the atomic lookahead are now pinned: `regex_limit_tests` runs both `grep -P` cases, and `python_integration_tests::regex_semantics` keeps the lookahead against what CPython 3.11 prints, since the same engine backs the Monty fork's `re`. See [Dependency Policy](operations/dependencies.md). + ## 2026-11-10 * **TypeScript `max_memory` enforced**: probing ZapCode builtins after the padStart fix found three more ways to abort the host: doubling a string with a template literal, and doubling an array with `concat` or spread. Root cause: ZapCode 1.5.1 never reads `memory_limit_bytes`; it only counts allocations and time. `ts` now runs each script under its own `vm_meter` window (the Monty meter, renamed from `python_meter`), checks live heap at every instruction, and sizes output-amplifying builtins (`join`, `JSON.stringify`, array `toString`, `console.log`, string `concat`, `repeat`, `split`, `replace`) before allocating, since shared strings make `[s, s, s].join()` cost pointers but produce copies. Native `ts` fails closed without `MeteredAllocator`. Fork edits moved to `zapcode_vendor/fork-edits.json`. See [ZapCode Runtime](runtimes/zapcode-runtime.md#memory-limit), TM-TS-026. diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml index cd97872c0..eb25e9cff 100644 --- a/supply-chain/audits.toml +++ b/supply-chain/audits.toml @@ -168,6 +168,19 @@ criteria = "safe-to-deploy" delta = "0.17.0 -> 0.18.0" notes = "Reviewed delta: adds Oniguruma-compatible syntax, absent repeater, CRLF/newline handling, and subroutine calls; no Rust unsafe added, parser nesting/backtracking limits remain, subroutine expansion is bounded and analysis rejects left/unbounded recursion." +[[audits.fancy-regex]] +who = "Mykhailo Chalyi " +criteria = "safe-to-deploy" +delta = "0.20.0 -> 0.20.2" +notes = ''' +Reviewed the complete published delta across 0.20.1 and 0.20.2: about 1300 changed lines over seven source files. No unsafe in either version, no dependency change, no build script, no host access of any kind. + +0.20.1 is a semantics-parity release and 0.20.2 fixes further unsound optimizer rewrites. What matters for this tree, which compiles caller-supplied patterns in grep/sed/awk/rg/find/jq: a backref or conditional inside the group it refers to now sees that group's previous capture, so `(?:(\1|a)b){2}` no longer panics on "abab". The optimizer's KeepOut and trailing-lookahead rewrites move behind a new `OptimizeOptions.find_not_empty` tier (plus a `RegexOptionsBuilder::optimize` switch), so find_not_empty patterns now get the safe rewrites instead of skipping the whole pass, and `start_bytes`/`required_bytes` analyze the same tree the compile path does. + +Behavior changes worth recording: positive lookaheads are atomic as in Oniguruma and PCRE; inline flags set inside a capturing, named, atomic, lookaround, conditional or absent group end with that group instead of leaking to the rest of the pattern; a conditional whose condition fails no longer leaves its entry on the VM stack for an enclosing atomic group; empty-matching bodies of `{n,}` repetitions run their required iterations; and in Oniguruma mode `{,}` is literal text, `a{3}?` and `a{3,2}?` parse as a second quantifier rather than a lazy marker, and `\cX`/`\C-X` control escapes are accepted. + +`Expr::has_descendant` moves from an explicit stack to recursion. Depth is bounded by the parser's MAX_RECURSION of 64, which also counts adjacent quantifiers, so the native stack stays bounded by nesting the parser already refuses. Parser nesting and backtrack limits are otherwise unchanged.''' + [[audits.fastrand]] who = "Mykhailo Chalyi " criteria = "safe-to-deploy" @@ -386,6 +399,23 @@ Registered-class teardown is tightened (#3666) by a REGISTERED_CLASSES_OWNER coo Source safety review of the delta, not a review of the whole crate. """ +[[audits.napi]] +who = "Mykhailo Chalyi " +criteria = "safe-to-deploy" +delta = "3.16.1 -> 3.16.2" +notes = """ +Reviewed the complete published delta: about 3200 changed lines, with two new modules (src/async_work/{promise,settle_mode}.rs and src/bindgen_runtime/env_registration.rs). Cargo.toml changes only the version, so no new dependency (libc and rustc-hash were already there), build.rs is byte-identical, neither version references std::fs or std::net, std::process is unchanged at 8 occurrences and std::env at none. Unsafe grows from 1831 to 1926 occurrences, all of it the existing NAPI FFI idiom. + +Per-env state is the half that matters here. Everything napi-rs cached per thread - the current custom-GC handle, the class constructor table, the cached Reflect intrinsics - moves into an EnvRegistration record keyed by env and released from that env's cleanup hook, and generated code's get_class_constructor becomes get_class_constructor_in_env(env, ...). Registration ids start at 1 and are never reused, and a record is always removed before its env is freed, so a new env that reuses a freed env's address cannot match a stale record. Two loads of this addon on one thread (worker, reload, hardlinked copy) can no longer hand each other a constructor reference or a custom-GC handle; FunctionRef and the stream Reader now gate on their own env's handle instead of the thread's. + +The other half removes the deferred leak: a worker terminated with a task in flight used to leak the task's napi_deferred, because napi_resolve_deferred is refused once the env stops running JavaScript. Each env now picks a settle mode once, at its first task after registration returned. Deferred mode is the old path and is kept only where the env dies with its process or realm; every other env (workers, Electron, Deno, anything unplaced) settles through a thenable whose resolving functions are deleted on every path, including a refused settlement. + +The new native capability is the mode detection, and it is narrow: uv_default_loop, napi_get_uv_event_loop and node::Buffer::Data are looked up with dlsym(RTLD_DEFAULT, ...), or GetModuleHandleW(NULL) plus GetProcAddress on Windows, so the search stays inside the already-loaded image set - nothing is dlopen'd, no path is read, and no file, network or process access is added. uv_default_loop() is called only in a host that exports the Node symbol (Bun before 1.4.4 aborts on it), and thread placement uses pthread_main_np or syscall(SYS_gettid) == getpid(). The check also reads globalThis.process.versions through N-API: an exception pending on entry is left untouched, the reads run in their own handle scope, each step is type-checked before the next so no prototype getter is reached through a primitive, and only the presence of versions.bun/electron/nw is used, never the writable version strings. A faked process.versions can only move an env to the other mode - more main-thread CPU, or the 16-byte-per-task deferred leak of the old code. It cannot settle a promise wrongly or abort the process. + +The thenable path compiles one wrapper per env with napi_run_script from the fixed PROMISE_WRAPPER_SOURCE constant, with no interpolation (the same shape as the FOLLOW_LIKE_AWAIT audit at 3.15.0); where code generation is blocked the compile throws, the exception is cleared, and the promise is made from a deferred instead. The slot naming a task's settle state travels through JavaScript as an f64, so I checked that boundary: Handle::from_f64 rejects non-integral and out-of-range values, every lookup matches both generation and env, and an index is not reused while a queued then job can still carry it, so a stale or forged handle finds nothing and no pointer is ever derived from the number. The slot table is thread-local, taken with try_borrow_mut rather than borrow_mut, and never held across a call that can run JavaScript. napi_cancel_async_work failing now resets the task status to "not started" instead of leaving a promise that can never settle. + +Observable cost on thenable-mode envs: one extra microtask per task, one more async_hooks before/after pair while the promise is pending, and about 2 microseconds more main-thread CPU.""" + [[audits.napi-build]] who = "Mykhailo Chalyi " criteria = "safe-to-deploy" @@ -442,6 +472,12 @@ notes = """ No source change. The only difference is the napi-derive-backend requirement in Cargo.toml, 6.1.6 -> 7.0.0; unsafe is unchanged at 10 occurrences, the ambient reference set is identical, and there is no build.rs. """ +[[audits.napi-derive]] +who = "Mykhailo Chalyi " +criteria = "safe-to-deploy" +delta = "3.7.0 -> 3.7.1" +notes = "No source change: src/ is byte-identical. The release only moves the napi-derive-backend requirement from 7.0.0 to 7.0.1 in Cargo.toml. Unsafe stays at 9 occurrences, no build script, ambient reference set identical." + [[audits.napi-derive-backend]] who = "Mykhailo Chalyi " criteria = "safe-to-deploy" @@ -476,6 +512,12 @@ Codegen and AST only, 156 changed lines across 5 files. No new unsafe (73 occurr The behavioral change worth recording is the static-flag fix: the generated property map was keyed on js_name alone, which collapsed a static and an instance member of the same name into one property descriptor. The key becomes the tuple (symbol_for.is_some(), well_known_symbol.is_some(), resolved name, is_static), and PROPERTY_ATTRIBUTE_STATIC is now set for members with no receiver, so string, registry-symbol, well-known-symbol, static and instance members stay distinct. Verified `cargo build -p bashkit-js` with the generated bindings. """ +[[audits.napi-derive-backend]] +who = "Mykhailo Chalyi " +criteria = "safe-to-deploy" +delta = "7.0.0 -> 7.0.1" +notes = "Codegen only, two files. Generated async functions stop emitting a `NapiRefContainer` with hand-written napi_create_reference/napi_reference_unref/napi_delete_reference and `unsafe impl Send/Sync`, and root their arguments in the borrow scope instead (`_napi_native_borrow_scope.root_value`); that also removes the generated assert_eq!s that could unwind across the FFI boundary. Generated unsafe falls from 67 to 61 occurrences. `&self`/`&mut self` receivers no longer root `cb.this()` a second time, because `register_native_borrow_with_value` already roots it in a new_async scope or returns Err. Class constructor lookups become env-scoped (`get_class_constructor_in_env(env, ...)`), matching napi 3.16.2, so a constructor reference belonging to another env of the same thread can no longer be used. No new dependency, no build script, and no std::fs/std::net/std::process/std::env reference in either version." + [[audits.napi-sys]] who = "Mykhailo Chalyi " criteria = "safe-to-deploy" @@ -689,6 +731,12 @@ criteria = "safe-to-deploy" delta = "3.0.7 -> 3.0.8" notes = "Reviewed the complete published delta: two production files plus a version stamp and tests. Operator parsing is narrowed, not widened. BinOp parsing no longer treats a leading '-' as subtraction when the token is actually '->', nor '<' as less-than when the token is '<-', and the two cast/comparison loops in expr.rs now return a parse error naming '<-' instead of silently breaking out. Token consumption stays bounded and the syntax tree construction is unchanged. No unsafe, no new dependencies, no build script, no host access." +[[audits.syn]] +who = "Mykhailo Chalyi " +criteria = "safe-to-deploy" +delta = "3.0.9 -> 3.0.10" +notes = "Reviewed the complete published delta: one production file (src/fixup.rs) plus a version stamp and tests. `rightmost_subexpression_precedence` is split into an impl taking a `scan` flag; the four internal callers in `scan_right` pass false because they already know the subexpression would not consume, while the public entry keeps true. The condition is rewritten from a nested `if let` into a flat `&&` chain and stays equivalent: `Scan` has exactly Fail/Bailout/Consume, so `!= Consume` is the old `Bailout | Fail` arm. Only ToTokens grouping decisions are affected; parsing is untouched. No unsafe change (227 occurrences in both), no new dependency, no build script, no std::fs/net/process/env addition." + [[audits.thin-vec]] who = "Mykhailo Chalyi " criteria = "safe-to-deploy"