Extend the 2026-11-16 Node CJS auto-wire so a same-directory Node.js
ESM loader (.mjs or ESM .js) whose static import/export-from specifiers
are Node builtins only also receives the already-landed WASM
bla.sidecar.v1 load-time hook (carrier: "module"). Record
wasm-sidecar-entangle and clear wasm-sidecar-host-verify-only only when
that hook was actually written. Browser fetch-only loaders and ESM
files that statically import user modules or .wasm stay untouched.
Honesty: jsModuleHasHoistedDependencyGraph no longer treats Node
builtin-only imports as a user hoisted graph.
Catalog REA tip 05be423ac inspection/walk ceilings (DWARF, ELF
debug-link/DT_NEEDED, Maven/Gradle, NuGet, Android OTA/boot) as
honesty-only REA_INTERNAL_LIMITS — not densify trip targets.
Cut 3.4.2 for the WASM JS-loader hook auto-wire (record
wasm-sidecar-entangle / clear wasm-sidecar-host-verify-only only when a
same-directory Node CJS loader was actually injected) and the REA
26d88826c catalog hygiene (SQLITE_WORKER_HEAP_BYTES). Also includes the
post-3.4.1 main work already on de982cb.
When sidecarEntangle is on, protectTarget and hardenProject inject the
already-landed WASM JS-loader hook into a same-directory Node.js CommonJS
loader that already uses fs and WebAssembly.instantiate/compile/
instantiateStreaming and mentions the .wasm basename (known names only:
<stem>.cjs/.js, loader.*, index.*). Browser, ESM, minified, already-
entangled, and unranked app entries such as license.cjs are left
untouched so baked self-seal digests stay valid. Record
wasm-sidecar-entangle and clear wasm-sidecar-host-verify-only only when
that hook was actually written. Default remains OFF.
Catalog REA tip 26d88826c SQLITE_WORKER_HEAP_BYTES (256 MiB) as honesty-
only; no new 1:1 densify counters in the +208 delta.
Cover the hostile-input gaps the dedicated suites did not pin yet: the ZIP64
0xffffffff central-directory size sentinel, WASM export sections that are
truncated / oversized / carry an unknown kind, ASAR symlink targets escaping
the archive root, a malformed .pyc header, a safetensors header with
duplicate JSON fields, GGUF keys with a u64 length beyond the buffer and
65-deep ARRAY nesting past MAX_VALUE_DEPTH, and the JVM class shield's
trailer fallback on garbage / truncated-constant-pool stubs.
Translated READMEs phrase the shield-count FAQ answer in their own language
(e.g. README_id.md uses 'Seluruh 26 perlindungan format'), so the guard now
asserts the current derived count appears in each translation instead of
requiring the exact English sentence. The English sentence stays strictly
asserted on the root README and the detector comment.
detector.ts claimed 'all 19 REA-supported artifact formats' and every README
said 'All 19(+) format shields' while ArtifactFormat defines 26 real formats
(plus the directory/unknown sentinels; the website already said 26). Sync all
claims to 26, bump the stale BLA_VERSION pin (2.1.0) in the example defend
workflow to the current release, and extend the public-claim drift guard to
derive the format count from the ArtifactFormat union so READMEs, detector
comment, and website cannot drift apart again.
handleMcpRequest returned err.message verbatim, and engine errors embed
resolved absolute paths (Unsupported or missing target path: ...). An MCP
client probing with bogus paths learned the operator's directory layout.
Redact known roots (cwd, tmpdir, home) and remaining drive-letter absolute
paths before returning error text to a client; relative fragments stay
readable for debugging.
String tool arguments had no length cap (a single 1 MiB stdio frame admitted
a 1 MB seed/path string that flowed into hashing and report math), and
numeric arguments accepted astronomically large magnitudes. Add a 64 KiB
default string cap (per-property maxLength override supported in the schema
type) and a 1e9 numeric magnitude cap, completing the bounded-args posture
of the string-list and fractional-count guards.
buildSarifReport and buildPackagingGatesSarif interpolated item names, reasons,
advice lines, and artifact URIs verbatim. JSON escaping keeps the document
valid, but code-scanning viewers can render control-character escapes from a
hostile artifact path. Route the free-text fields through
sanitizeTerminalText like the terminal formatters.
verifyManifestSignature compared the embedded and pinned SPKI PEM strings
with plain inequality. The SPKI is public material so nothing was secret,
but timingSafeEqual matches the constant-time posture of the rest of the
pinned-verification path; existing attacker-keypair rejection tests guard
the behavior.
generateSelfSealSnippet and generateSidecarJsPreamble interpolated the
caller-provided bindingName verbatim into var declarations, so a hostile
override could break or inject into the emitted preamble. Validate against
an identifier pattern and fail loudly instead.
The bankrupt rewrite replaced \bderiveLocal\b globally, which also renamed
obj.deriveLocal property accesses on an external object — legal alongside a
local function of the same name — changing the program's behavior instead of
hiding the stable ABI. Skip matches preceded by a dot or identifier char and
regression-test the property-access case.
walkWasmFiles used readdirSync + statSync, whose stat call follows symlinks —
a symlinked directory inside the lint root was descended and a symlinked
.wasm file was read, unlike every sibling lint walker (Dirent-based, links
never descended, hidden directories skipped). Align the walk with that
posture; add walk-safety regression tests.
withToolAnnotations flipped readOnlyHint for MUTATING_MCP_TOOLS but left
destructiveHint hardcoded false on every tool, so MCP clients honoring the
annotation would not prompt the operator before destructive writes. Set
destructiveHint from the same isMutating bit.
The tool schema advertised optional max_files and max_total_bytes caps, but
the handler passed only the path and inspectReleaseExposure had no options
parameter at all — the bounds were dead code and an MCP client could trigger
an unbounded scan. Plumb both caps through as optional overrides that only
tighten the built-in limits, and stop scanning once the file-count cap is
reached (limitation: file-count-limit).
formatHardenProjectReport interpolated directory/runId/written/relativePath/
outputPath/error/discoveryReadErrors/oneSentenceUsage verbatim, so a hostile
artifact name could carry OSC/CSI control sequences into the operator's
terminal. Route every artifact-derived field through sanitizeTerminalText
like the other formatters (extends the PR #223 posture to the harden report).
extractStringLiterals unescapes common sequences before classification, but
looksAlreadyEncrypted searched the unescaped literal in the raw source — a
secret written with one escape sequence could never match, so the finding was
silently dropped and the bankrupt gate stayed open. Search the escaped
spelling as well; add a bypass regression test.
harden loaded .blarc from process.cwd() but resolved (and persisted) the seed
against the target directory. With no usable seed present, resolveProjectSeed
minted one and wrote it to <target>/.blarc — inside the build output the user
is about to package. It also made 'bla harden ./dist' mint a different seed
depending on which directory was hardened.
protect and defend already resolve against the process cwd; harden now matches.
dryRun still writes nothing.
--manifest, --sign-manifest and --manifest-key are accepted by the parser and
advertised in --help with no per-command restriction, but only harden and
defend consume them. ProtectionOptions has no manifest field, so
'bla protect app.js --manifest' exited 0 and wrote no manifest — an operator
would think the artifact had been signed.
The flags are now an argument error for protect, and the help text says which
commands implement the stage.
generatePythonTarpit interpolated chaff rawText straight into a triple-quoted
docstring. A payload containing """ or a trailing backslash would terminate
the literal early and emit invalid Python into the protected artifact; today's
chaff templates never contain either, so the bug stayed latent.
Escapes backslashes and triple quotes and folds newlines so the docstring stays
one line, plus a regression test with a poisoned payload.