v0.141.0
Released on 4 July 2026 as v0.141.0, with one increment, v0.141.0. See Upgrading for what to change when you move to it.
| Version | Highlights |
|---|---|
| v0.141.0 | Security response headers for from http services (emitter + runtime + a grammar/checker addition; ADR 0164). A from http response carried no security headers (#493), so a JSON body could be MIME-sniffed by a browser into an executable type (a content-sniffing XSS vector), and there was no declarative way to assert HTTPS-only. A service now declares a security { } policy in header position, beside cors { }, from which the compiler stamps two curated headers — split by risk, mirroring how CORS splits derived-vs-declared. (1) nosniff on by default: X-Content-Type-Options: nosniff — the one header that always helps a data API and never hurts — is stamped on every from http response, with no opt-in; the compiler synthesises a default policy for every such service. security { nosniff: false } is the explicit opt-out. (2) HSTS opt-in: security { hsts: 180.days } stamps Strict-Transport-Security: max-age=15552000 — a deliberate opt-in because HSTS pins a browser to HTTPS (a real footgun in dev/staging and on edge-terminated TLS); max-age only, no includeSubDomains/preload. Stamped uniformly through an applySecurityHeaders runtime helper (the applyCors shape) across every variant family and the synthesised preflight/405/OPTIONS/304, composing with applyCors (disjoint headers). Content-Security-Policy/X-Frame-Options are excluded — they govern markup, which the surface does not serve (ADR 0143). Because nosniff is default-on, this is not byte-inert: every HTTP expected/workers/** fixture regenerates (reviewed as a single-header delta). The closed HttpResult registry (ADR 0126/0143) is byte-for-byte unchanged — a header layer around the result lowering, not a change to it. bynk-syntax (a security contextual keyword + SecurityPolicy AST) + bynk-emit (checker validation, workers_entry.rs stamping, a runtime.ts helper) + bynk-fmt + tree-sitter; hover/completion track the new section (ADR 0156). Closes #493. |