Security audit index
The index of the repository's first security audit (#363). Each area was
audited by its own stage, and each stage left a record in this directory. A
record says what was checked, how, what was found, its severity and what became
of it, and it names the test that pins each property. How to report a
vulnerability, which releases get fixes and the threat model in brief are in
SECURITY.md.
Every fix landed with a regression test that was shown failing on the stage's base commit and passing after. An area that found nothing would still have shipped its record and tests pinning what it checked.
Severity. Critical: forgery, key recovery, remote code execution. High: memory corruption, a verifier that accepts bad input, secret-dependent timing in a fixture path. Medium: denial of service (a panic, an unbounded loop or allocation) on attacker input. Low: hardening and documentation drift.
Areas
Counts are by severity, C / H / M / L, and say what is true on main now. A
finding one stage left open and a later stage fixed is counted as fixed, under
the record that found it. The notes below the table name each such finding.
| Area | Record | Scope | Fixed (C / H / M / L) | Open (C / H / M / L) |
|---|---|---|---|---|
| AEADs | crypto-aead.md | std/crypto/chacha20poly1305.ts, std/crypto/aes.ts, runtime/runtime-aes.c |
0 / 0 / 0 / 3 | 0 / 0 / 0 / 1 |
| SHA-256 block kernel | crypto-sha256-hw.md | runtime/runtime-sha256.c; its lowering (isSha256Seam in src/kernels.ts, emitKernelArm in src/emit.ts) |
0 / 0 / 0 / 1 | 0 / 0 / 0 / 1 |
| ChaCha20 keystream kernel | crypto-chacha20-hw.md | runtime/runtime-chacha20.c; its lowering (isChacha20Seam in src/kernels.ts, emitKernelArm in src/emit.ts) |
0 / 0 / 0 / 1 | 0 / 0 / 0 / 1 |
| P-256 and X25519 | crypto-ecc.md | std/crypto/p256.ts, std/crypto/x25519.ts, std/crypto/ed25519.ts, their constant-time fixtures |
0 / 0 / 0 / 3 | 0 / 0 / 0 / 0 |
| RSA signatures | crypto-rsa.md | std/crypto/rsa.ts |
0 / 0 / 0 / 0 | 0 / 0 / 0 / 0 ²³ |
| SHA-2, HMAC, HKDF, ct, base64url | crypto-k1.md | std/crypto/sha256.ts, sha512.ts, hmac.ts, hkdf.ts, ct.ts, base64url.ts |
0 / 3 / 0 / 6 ¹ | 0 / 0 / 0 / 0 |
| DER, PEM, X.509 | crypto-x509.md | std/crypto/x509.ts |
0 / 0 / 1 / 12 | 0 / 0 / 0 / 2 |
| Constant-time checks | ct-verification.md | tests/ct-asm.js, tests/ct-asm-runtime.js, tests/ct-timing.js, the ct_asm_* fixtures, the harness in tests/run.js |
0 / 0 / 0 / 18 ² | 0 / 0 / 0 / 1 |
| Codegen | codegen.md | src/bounds.ts, src/attributes.ts, src/escape.ts, src/parallel.ts, src/emit-arrays.ts |
0 / 5 / 3 / 4 ³ | 0 / 0 / 0 / 0 |
| C runtime | runtime.md | runtime/*.c, runtime/nish.h; RT-14 to RT-16, RT-18 and RT-51 to RT-53 anchor in src/ (emit-strings.ts, escape.ts, emit.ts, declarations.ts, builtins.ts, expressions.ts, attributes.ts, parallel.ts, structs.ts, emit-classes.ts, annotations.ts, interop-abi.ts, interop-header.ts) |
0 / 3 / 24 / 21 ⁴ | 0 / 0 / 0 / 2 |
CLI and nish run |
cli.md | src/compile.ts, src/run-cache.ts, src/compilation.ts (module resolution), std/cli.ts (the terminal and colour probe) |
0 / 1 / 2 / 7 ⁵ | 0 / 0 / 0 / 0 |
| TLS 1.3 server and client handshakes, records and TCP carrier | tls.md | std/net/tls.ts, std/net/tls/codec.ts, std/net/tls/schedule.ts, std/net/tls/record.ts, std/net/tls/record-server.ts, std/net/tls/client.ts, std/net/tls/record-client.ts, std/net/tls/verify.ts, std/net/tls-tcp.ts |
0 / 0 / 1 / 6 ⁹ | 0 / 0 / 0 / 2 |
| QUIC packets, connections and listener | quic.md | std/net/quic-packet.ts, std/net/quic.ts, std/net/quic-frame.ts, std/net/quic-conn-params.ts, std/net/quic-conn-ack.ts, std/net/quic-conn-cid.ts, std/net/quic-listener.ts, std/net/quic-recovery.ts |
0 / 0 / 1 / 11 ¹¹ | 0 / 0 / 0 / 0 |
| Supply chain | supply-chain.md | install.sh, bin/, the install, seed and build scripts, .github/workflows/, runtime/nish.mjs and shim.mjs, web/, the agent-skill linker |
3 / 0 / 6 / 25 | 0 / 0 / 0 / 0 ⁶ |
| HTTP/1.1 and WebSocket | http1-codec.md | std/net/http1-codec.ts, std/net/http1-server.ts, std/net/websocket.ts |
0 / 0 / 3 / 6 | 0 / 0 / 0 / 0 ⁷ |
| HTTP/1.1 client | http1-client-codec.md | std/net/http1-client-codec.ts |
0 / 0 / 1 / 0 | 0 / 0 / 0 / 1 |
| Blocking HTTP client | fetch.md | std/net/fetch.ts |
0 / 0 / 0 / 10 | 0 / 0 / 0 / 2 |
| Outbound policy | outbound.md | std/net/outbound.ts |
0 / 1 / 2 / 2 | 0 / 0 / 0 / 4 |
| HTTP/2 | http2.md | std/net/http2.ts, std/net/http2-tls.ts, std/net/hpack.ts |
0 / 0 / 2 / 2 | 0 / 0 / 0 / 0 ⁷ |
| HTTP/2 over cleartext (h2c) | http2-cleartext.md | std/net/http2-cleartext.ts |
0 / 0 / 0 / 0 | 0 / 0 / 0 / 1 |
| HTTP/3 | http3.md | std/net/http3.ts, std/net/http3-server.ts |
0 / 0 / 0 / 8 | 0 / 0 / 0 / 0 ⁷ |
| QUIC on every core | quic-multicore.md | the UDP path of nish/net/prefork; the worker byte in std/net/quic.ts, std/net/quic-listener.ts and std/net/quic-conn-cid.ts |
0 / 0 / 0 / 2 | 0 / 0 / 0 / 0 ²⁷ |
| WebTransport | webtransport.md | std/net/webtransport.ts |
0 / 0 / 0 / 2 | 0 / 0 / 0 / 0 ⁷ |
| JSON | json.md | std/json-tokenizer.ts; the typed layer: std/json-typed.ts, src/json-typed.ts, src/emit-json.ts; the dynamic tree: std/json-value.ts, JsonWriter.keyBytes and stringBytes in std/json.ts; the global Map's key hashes: std/collections.ts, src/emit-map.ts |
0 / 0 / 2 / 2 | 0 / 0 / 0 / 2 ¹⁰ |
| Percent-decoding, query strings and URL parsing | url.md | std/net/url.ts |
0 / 0 / 0 / 0 | 0 / 0 / 0 / 0 ¹² |
| YAML into a JsonDocument | yaml.md | std/yaml-json.ts, std/yaml.ts (the merge check) |
0 / 0 / 3 / 2 | 0 / 0 / 0 / 0 |
nish:secret checker rules |
secret.md | src/secret.ts; Compilation.checkSecrets in src/compilation.ts; the field rule's src/structs.ts, src/members.ts, src/interop-header.ts, src/attributes.ts, src/codes.ts and src/types.ts |
0 / 0 / 2 / 3 | 0 / 0 / 0 / 0 |
| HTTP router | router.md | std/net/router.ts |
0 / 0 / 0 / 0 | 0 / 0 / 0 / 0 ¹³ |
| Regular expressions | regex.md | std/regex.ts; the nish_regex_scan kernel in runtime/runtime-simd.c, its contract in runtime/nish.h and its lowering in src/kernels.ts |
0 / 0 / 1 / 4 | 0 / 0 / 0 / 0 ¹⁴ |
nish:term and std/term |
term.md | runtime/runtime-term.c, std/term.ts; the nish:term builtins' checker rules in src/ |
0 / 0 / 1 / 4 | 0 / 0 / 0 / 0 |
nish/bytes runs and copyBytes |
bytes.md | runtime/runtime-bytes.c, std/bytes.ts; their lowering in src/kernels.ts and src/emit-arrays.ts; the N-API array argument in src/interop-napi.ts |
0 / 0 / 0 / 2 | 0 / 0 / 0 / 0 |
| Browser host | runtime-browser.md | runtime/browser.mjs, runtime/browser.d.ts, runtime/core/host.mjs |
0 / 0 / 1 / 1 | 0 / 0 / 0 / 0 ¹⁵ |
--sandbox |
sandbox.md | runtime/runtime-sandbox.c; the wrapper and the scope constants in src/emit.ts; the flag, its refusals and the directory scopes in src/compile.ts, src/options.ts; the ffi widening in src/compilation.ts; the spawn handed to the sandbox in runtime/runtime-os.c |
0 / 1 / 0 / 0 | 0 / 0 / 0 / 0 |
| io_uring ring layer | net-uring.md | runtime/runtime-uring.c; the ring slot layer in runtime/runtime-net.c |
0 / 2 / 8 / 10 | 0 / 0 / 0 / 2 |
| Shared memory between processes | shm.md | runtime/runtime-shm.c, std/sync/shm.ts, std/sync/ring.ts, src/shm-window.ts, src/emit-shm-window.ts |
0 / 0 / 1 / 3 | 0 / 0 / 0 / 1 |
SQLite amalgamation and nish/sqlite |
sqlite.md | runtime/sqlite/sqlite3.c, runtime/sqlite/sqlite3.h, runtime/sqlite/nish-sqlite.c, std/sqlite.ts |
0 / 0 / 0 / 1 | 0 / 0 / 0 / 1 |
| A dependency's capabilities | capabilities.md | src/compilation.ts (readCapabilityPolicy, refuseDependencyCapabilities), src/capability-report.ts (dependencyPackages, dependencyMasks, dependencyWitness), src/manifest.ts (manifestReadGrants); the grant arguments (grantArgument, refuseNarrowGrants, narrowSandbox in src/compilation.ts, literalReaches in src/capability-report.ts) |
0 / 0 / 0 / 0 | 0 / 0 / 1 / 0 ¹⁶ |
| PostgreSQL client, its handler carrier and async pool | postgres.md | std/net/postgres.ts, std/net/postgres-carrier.ts, std/net/postgres-async.ts |
0 / 0 / 10 / 7 | 0 / 0 / 0 / 0 ¹⁷ |
| bcrypt | crypto-bcrypt.md | std/crypto/bcrypt.ts, std/crypto/bcrypt-batch.ts |
0 / 0 / 0 / 0 | 0 / 0 / 0 / 0 ¹⁸ |
| Compression and HTTP content coding | compress.md | std/compress/deflate.ts, gzip.ts, zlib.ts, checksum.ts, runtime/runtime-checksum.c, std/net/http-compress.ts, Http1Connection.acceptEncoding, acceptEncodingOf, identityRefused, respondEncoded and unrespond in std/net/http1-server.ts |
0 / 0 / 3 / 0 | 0 / 0 / 0 / 0 ¹⁹ |
| P-384 ECDSA verification | crypto-p384.md | std/crypto/p384.ts |
0 / 0 / 0 / 0 | 0 / 0 / 0 / 0 ²⁰ |
| PKI trust anchors | crypto-pki.md | std/crypto/pki-roots.ts |
0 / 0 / 0 / 0 | 0 / 0 / 0 / 0 ²¹ |
| PKI path validation and hostnames | crypto-pki.md | std/crypto/pki.ts |
0 / 0 / 1 / 6 | 0 / 0 / 1 / 8 ²⁴ |
DNS stub resolver, its codec, resolv.conf and hosts |
dns.md | std/net/dns.ts, std/net/dns-resolver.ts, std/net/dns-message.ts, std/net/dns-config.ts |
0 / 0 / 1 / 2 | 0 / 0 / 0 / 0 ²² |
| JSON Web Tokens, and HMAC's keyed state | crypto-jwt.md | std/crypto/jwt.ts; std/crypto/hmac.ts's HmacKey section |
0 / 0 / 1 / 2 | 0 / 0 / 0 / 0 ²⁵ |
| OpenID Connect discovery and the JWK Set | oidc.md | std/net/oidc.ts |
0 / 0 / 1 / 4 | 0 / 0 / 0 / 0 ²⁹ |
| HTTP request handler | handler.md | std/net/handler.ts |
0 / 0 / 3 / 2 | 0 / 0 / 0 / 0 |
| Async server | serve.md | std/net/serve.ts |
0 / 0 / 1 / 1 | 0 / 0 / 0 / 1 |
| One HTTP server for HTTP/1.1, 2 and 3 | http-server.md | std/net/http-server.ts |
0 / 0 / 1 / 0 | 0 / 0 / 0 / 1 |
| Upstream HTTP calls | upstream.md | std/net/upstream.ts |
0 / 0 / 3 / 1 | 0 / 0 / 0 / 0 ²⁶ |
The wasm-host boundary: module storage, windows, panics and nish/page |
wasm-host.md | runtime/page.mjs, runtime/page.d.ts, std/host/ring.ts; the nish.panic import in runtime/runtime-wasm.c; the generated loader's panicText, panicOf, guardLoader (refuse, typedIn, stringOut), payloadIn, resultIn, arrayIn, hostImportsOf (text), pushHostEntry and layoutLoader, and the wrapper's wasmTypedIn, wasmPayloadWriter and refused, in src/interop-wasm.ts; emitHostWindow and emitHostString in src/emit-strings.ts, hostWindowProven in src/attributes.ts, src/module-storage.ts, and std/host/text.ts; root storage's keep (nish_runtime_root_keep and its trace) in runtime/runtime-wasm.c and its descriptors in src/emit-root.ts |
0 / 1 / 3 / 5 ²⁸ | 0 / 0 / 0 / 1 |
| Async executor | async.md | runtime/runtime-async.c; the emitted driver and awaitAll's lanes (src/emit-async.ts); what a spawned task may share (src/async-check.ts, src/region-rules.ts); nish_region_adopt in runtime/runtime-region.c and the carved chunk it leaves in runtime/runtime.c |
0 / 1 / 9 / 1 | 0 / 0 / 0 / 4 |
Update notice, nish upgrade and nish/release |
release.md | std/release.ts, src/upgrade.ts; noticeSuppressed, selfPath, upgrade and cachedTool in src/compile.ts |
0 / 0 / 0 / 4 | 0 / 0 / 0 / 2 |
| Total ⁸ | 3 / 18 / 101 / 216 | 0 / 0 / 3 / 41 |
-
K1-6 (High) was found by the K1 stage and fixed by the two after it:
pushandnew Arrayby the codegen stage, and the file reads and concatenation by the runtime stage. The one source left,join, was closed with CG-3 (#427, for #382) and is counted under it. -
CT-13, High if real, is closed as an artefact and is not counted: it did not reproduce in 54 later runs on a VM of the same class or in three weekly runs on the CI runners, and
ladderStep's code on both targets is made of instructions whose time does not follow their operands. The host and the driver layout that read the 35–42 were never re-measured, so its cause is not known. CT-19 (Low), the weekly run failed by one reading ofmacEqualthat did not repeat, is fixed by the harness's re-measure rule and counted as a fixed Low. -
CG-9 (Low) was fixed by the runtime stage as RT-7; the codegen record counts CG-9 and the runtime record counts RT-7. K1-6, which the codegen record also lists, is counted once, under K1.
-
RT-9 added the ownership primitives CLI-7 and CLI-9 need; it is counted as a fixed Low. RT-10, RT-11, RT-12 and RT-13 (Low) were left open by the runtime stage and fixed by #405 (closes #387). The "CG-3 (rest)" row of that record is CG-3 and is counted under codegen. RT-14 (Medium), a
stringlent to C by adeclare function(WP27 S3.1), was decided and fixed by the stage that found it, and is counted as a fixed Medium; its anchors are insrc/, not in the runtime. RT-15 (Medium), astringadeclare functionreturns (WP27 S3.2), is counted the same way. So is RT-16 (Medium),readCStringand the literalnullaCPtr | nullparameter takes (WP27 S3.3), and RT-18 (Medium), au8[]lent to C with its count checked (WP53 B1.2), and RT-20 (Medium), the C resource ausingowns (#861), and RT-51 (Medium), adeclare classlent to C by pointer (WP27 S4.1), and RT-52 (Medium),readStruct, a C struct copied out (WP27 S4.2). RT-21 (Low),nish_argv_inittestingmalloc's answer for null only after computing from it, was found by #888's harness stage while building the runtime under UBSan, fixed there, and is counted as a fixed Low.RT-24 and RT-25 (Medium), the mode race and the link a secret's write could follow, and RT-26 (Low), the umask on
mkdirSyncMode, were decided and fixed by the stage that added the mode-taking writes (#992), and are counted as fixed. RT-27, RT-28 and RT-30 (Medium) and RT-29 (Low),spawnPiped's deadlock, output cap, pipe descriptors and SIGPIPE, were found and fixed by the stage that added it, and are counted as fixed; RT-30's Darwin window is recorded in the row and is not counted.RT-31, the stdin channel itself, is a decision and is not counted, and so is RT-32, how
netMssreads the kernel's reply (#1094). RT-33 and RT-35 (Medium) and RT-36 (Low), the Unix path copy, the socket file's mode window and the error paths of the Unix-domain calls, were found and fixed by the stage that added them, and are counted as fixed. RT-34 (Low), the stale-socket unlink racing another binder, is counted as an open Low: its boundary is the socket's directory.RT-37 (Low), the descriptors
recvFdcloses and the family check, and RT-40 (Low),spawnWithFds' self-dups and collisions, were found and fixed by the stage that added descriptor passing, and are counted as fixed. RT-38 (Low), the window on Darwin before a received descriptor is close-on-exec, is counted as an open Low. RT-39, whatpeerCredentialsreads and when, is a decision and is not counted. RT-17 and RT-19 were amended there, not reopened.RT-41 (High), RT-42 (Medium), RT-43 and RT-44 (Low), the region handle's checks, the enter and leave order, the table's limits and the chunk sizes, were found and fixed by the stage that added regions to the runtime (WP46 stage 1) and are counted as fixed. RT-45 (Medium), a mark carried across a region boundary, RT-46 (Low), the lock a region panic holds, and RT-47 (Low), the unbounded chunk doubling, were fixed by the stage that gave regions to the language (WP46 stage 2) and are counted as fixed. RT-48 (Medium), a child region pointing into its parent's memory, was fixed in the design of child regions and is counted as fixed. RT-49 (Medium),
spawnPipedWithin's unbounded final wait, was found and fixed by the stage that added it and is counted as fixed; its pid-only kill and the grandchild it leaves are a decision and are not counted.RT-50 (Medium), the file-window reads' path, open flags, window and position checks, was found and fixed by the stage that added
fileOpen,fileReadAt,fileSizeandfileClose(WP44 F1), and is counted as a fixed Medium. Its use after close is recorded in the row, as nothing checks it for a socket either, and is not counted, as RT-30's Darwin window is not.RT-53 (Low), the
cErrnoslot and the errno capture around a C call (WP27 S5), was reviewed with nothing to fix and is not counted.RT-55 and RT-58 (Medium), the 8-byte realign of a compact-class offset and the range chunk kept from
realloc, and RT-56 and RT-57 (Low), the refused reservation's message and the debug fault window, were found and fixed by the stage that added the compact-class range (WP48 stage 1) and are counted as fixed. RT-17, RT-19, RT-23 and RT-54 are decisions and are not counted. With them the row was recounted from the record's table: fixed 0 / 3 / 24 / 21, open 0 / 0 / 0 / 2 (RT-34, RT-38). The row it replaced, 0 / 3 / 21 / 17, had missed one fixed Medium and two fixed Lows; the Total moves by the row's change, fixed +3 Medium and +4 Low. -
CLI-6 (Medium) was fixed in the runtime as RT-4. The compiler is built by the last release, so
nishitself has the fix from 0.16.0. CLI-8 (Low) was left open by the CLI stage and fixed by #425 (for #386): the cache entry is named by a SHA-256. CLI-7 and CLI-9 (Low) were fixed by #486 once the release carrying RT-9's primitives seeded the compiler, and are counted as fixed Lows. -
SC-17 (Low) is accepted rather than open, and is not counted:
curl … | shrunsinstall.shunverified, and the record says why that stands. SC-34 (Low) is counted as fixed for its zod half; its minimatch half is accepted, with the reason in the record. SC-16 (Low), left open by the supply-chain stage, was fixed by #389's build provenance attestation and is counted as a fixed Low. SC-28 (Medium) is counted as fixed: its Linux rows gate, and its macOS rows report rather than gate, for the reason its record gives. -
H2-2, H3-4, WT-3, WT-4 and WT-5 (Low) are accepted, with the reason in their records, and are not counted, as SC-17 is not. H1-2, H2-3 and WT-2 are closed and counted as fixed: each layer takes the clock from the program's
expire, as H1-1's does. H3-5 is closed and counted as a fixed Low:Http3Servercloses an idle slot atidleTimeoutand one trickling a request's head atheadTimeout, with no program code. WT-1 repeats H3-1 and is counted in its own record. H3-1, H3-2, H3-3, H3-5, H3-6, H3-7, H3-8 and WT-1 are closed and counted as fixed, and QUIC-9, the microsecond pacer H3-8 rests on, is closed and counted as a fixed Low in the QUIC row.H1-1 (Medium), the slowloris head, was closed by #895 (
headTimeout), H2-1 (Medium), the arena a header block left, by #473, and H2-4 (Medium), the resets the server sent for the client, by #805; each is counted as a fixed Medium. H1-3 (Low), the arena a WebSocket accept left, is fixed: a slot keeps the storage the accept key and the 101 are written into. H1-4 (Low), the bound on whenexpirewalks every slot, and H1-6 (Low), the UTF-8 check that waited for a whole WebSocket frame, are fixed and counted as fixed Lows, with H1-2, H1-9 and H1-10. -
A finding that two records both list is counted in each record, except K1-6, which is counted once, under K1: CG-9 and RT-7, CLI-6 and RT-4, and H3-1 and WT-1. The Total therefore counts those twins twice.
-
TLS-3, QUIC-3's remainder and H3-1 now agree on what a handshake leaves behind: nothing. #492 moved the QUIC handshake's state into the slot, #512 made the server's P-256 signature in scratch, and #515 made the listener read the first Initial in place and answer into scratch, so a handshake through a reused slot keeps 0 bytes of arena memory. TLS-2, the AES key schedule zeroed by ordinary stores, was closed by #430's TLS stage and is counted as a fixed Low. TLS-5, the ChaCha20 state each ChaCha20-Poly1305 seal and open left unwiped, was found in review of the resumption design, closed by #639, and is counted as a fixed Low. TLS-1, an open connection's secrets kept in plain fields, was closed by #674's secret-fields stage, which made each a
Secretfield, and is counted as a fixed Low. The client (#480) adds three Lows. TLS-8, a secp256r1 share the client could not complete, was closed byp256Ecdhand is counted as a fixed Low. TLS-7, no TLS 1.2, client certificates, 0-RTT or client-side resumption, is open by design, and TLS-9, a refusal in the ServerHello's ownreceivesealed under the clear state, is open; both are counted as open Lows. The carrier's TLS-4, no idle timeout, was closed byTlsTcpServer.expireand is counted as a fixed Low. -
JSON-1, JSON-4, JSON-5, JSON-6, JSON-7, JSON-8, JSON-9, JSON-11 and JSON-12 (Low) are accepted, with the reason in their record, and are not counted, and so is JSON-14 (Low), a
JsonNumber's bytes written raw, and JSON-17 (Low), a tagged union's read-ahead to a tag that is not the first key. JSON-2 is open. JSON-13 (Medium), the map keys a body can make collide, was bounded byjsonDecode(#622,maxMapKeys) and closed by #900, which seeds the globalMap's string hash; it is counted as a fixed Medium. JSON-15 (Medium), the same flood through integer,booleanand enum keys, was closed by #1107, which keys the integer hash; it is counted as a fixed Medium. JSON-16 (Low), float keys still hashed unkeyed, is open, beside JSON-2.JSON-3, duplicate keys reported as tokens, was left open by the tokenizer stage and is fixed for
jsonDecodecallers by the typed layer (#573), which refuses a duplicate of a field; it is counted as a fixed Low. The tokenizer is unchanged, a program reading tokens itself still decides, and the duplicates of a keyignoreUnknownsteps over are the accepted JSON-4.JsonDocument(#597) closes it for its own callers too, refusing a repeated key unless the program asks forJSON.parse's reading. JSON-10, the memory a document keeps per value, was found and fixed by the same change (maxValues) and is counted as a fixed Low. -
QUIC-2 (Low), what a connection holds between calls, was left open by the Q2 stage and closed for #430: every key a connection holds, AES schedules included, is wiped with a store no optimiser removes when its level, its key generation or the connection ends, the end of the closing or draining period included. It is counted as a fixed Low.
QUIC-5 (Low), the server's static keys and the listener's seed, was closed for #430 too:
QuicListener.releasewipes the listener's seed, scratch, INVALID_TOKEN keys and last answer, andHttp3Server.stopthe configuration's stateless reset and Retry token keys with every connection. A copy of a key the caller keeps stays the caller's to wipe, and a configuration shared with another server is left keyed with zeros. It is counted as a fixed Low.QUIC-1 (Low), the
QuicKeysthe one-shot key forms answered, was left open by #430's secret-boundary stage and closed by #674's secret-fields stage:quicKeysandquicKeysUpdatenow derive into aQuicKeysSlotthe caller passes, leave in the arena only theHkdfScratcheach makes, which wipes its hashers and output blocks before the call returns, and a slot the caller owns is the caller's to wipe. It is counted as a fixed Low.QUIC-6 (Low), RFC 9001 §6.6's AEAD limits, and QUIC-7 (Low), an optimistic ACK, were closed by #784: a write key starts a key update at three quarters of its confidentiality limit and the connection closes with AEAD_LIMIT_REACHED at it when none can be made or past the integrity limit, and the server skips a 1-RTT packet number every 128 to 1,024 packets and closes with PROTOCOL_VIOLATION on an ACK of one. Each is counted as a fixed Low.
QUIC-10 (Low), ECN counts parsed and ignored, was closed by #914, which has the carriers mark ECT(0); it is counted as a fixed Low. QUIC-11 (Low), a peer's address change not followed, was closed by #1210: a NAT rebinding is followed after path validation, within the anti-amplification limit; it is counted as a fixed Low. QUIC-12 (Low), a NAT rebinding missed while a stream's send buffer waited behind one lost packet, was closed by #1485: the server sends an ACK-eliciting probe half a round trip after its last ACK-eliciting packet, so the client answers from its new port; it is counted as a fixed Low.
-
URL-1 to URL-8 (Low) are accepted, with the reason in their record, and are not counted: the byte API's output is not checked as UTF-8, a refused decode leaves the bytes before the refusal written, a repeated key is answered by its first value, an IPv6 host is compared as written,
user:@writes back asuser@, an empty http path stays empty, the URL parser leaves the input's length to its caller, and a host's trailing dot is kept, soa.com.is its own origin. -
ROUTE-1 to ROUTE-7 are the shapes an attacker's target can take, checked and found to hold, and are not findings. ROUTE-8 (Low), dot segments matched as bytes, and ROUTE-9 (Low), the path matched before it is decoded, are accepted, with the reason in their record, and are not counted, as SC-17 is not.
-
REGEX-4 (Medium), iterating matches in time quadratic in the subject when a preferred branch reads to the end before a short one wins, is accepted, with the reason in its record, and is not counted: one search is linear, and the docs now say iterating may not be.
-
BROWSER-2 (Low), the module's state outliving a
NishExit, and BROWSER-4 (Low), a lone surrogate the core reads as U+FFFD, are accepted, with the reason in their record, and are not counted. The guide says what a caller does about each. -
CAPS-1 to CAPS-4 are the ways a dependency could hide a capability, checked and found to hold, and are not findings. CAPS-5 to CAPS-8 (Low), the limits of a compile-time check (install scripts, the C behind a granted
ffi, a function argument blamed on its template, nothing confined at run time), are accepted, with the reason in their record, and are not counted.Of the grant arguments' rows, CAPS-14 to CAPS-16 and CAPS-20 hold and are not findings, CAPS-17 (Medium) and CAPS-18 (Low), what the build check cannot see and a run-time scope shared by every package, are accepted and not counted, and CAPS-19 (Medium), a
net=<host>grant that binds no computed host at run time, is open. -
PG-1 to PG-8 are the shapes a hostile server's bytes can take, checked and found to hold, and are not findings. PG-9 (Medium), no TLS, is fixed for
PgCarrier, and every other path refuses aPgConfigthat asks for TLS. PG-10 (Low), no way to require SCRAM, and PG-11 (Low), MD5 and cleartext refused, are accepted, with the reason in their record, and are not counted. PG-12 (Low), ClientKey left in a hasher, and PG-13 (Low), an unbounded send buffer, were found by the module's first review and fixed before it merged.PG-14, the batcher's check of the ordinal a server routes rows by, holds and is not a finding. PG-15 (Medium), a late or repeated server event panicking on or reaching a reused run, PG-16 (Medium), one bad text key failing its whole batch, and PG-17 (Low), collidable key hashing, were found by the batcher's first review and fixed before it merged.
PG-18, PG-19 and PG-20 are the shapes a connection target can take; PG-18 and PG-19 hold and are not findings, and PG-20 (Medium), a URL's user information ending at its last
@where libpq ends it at the first, was found by the Unix-socket targets' first review and fixed before it merged. PG-21 (Low), a socket another local user can create, and PG-22 (Low), a socket file taken as its directory, are accepted and not counted.PG-23 (Medium), a carrier query held for ever by a server that accepts and never answers, and PG-24 (Medium), a batcher's requests held for ever behind an execution lost before it was taken, were found as the carrier was written and fixed before it merged. PG-25, a reset socket ending its connection, holds and is not a finding; PG-26 (Low), no deadline on a query once its connection is up, and PG-27 (Low), a connect attempt with no backoff while the server is down, are accepted and not counted.
PG-28 to PG-31, the async pool's framing, its connections never carrying a session to the next task, its tickets and its bounded claim wait, hold and are not findings. PG-32 (Low), a NUL in an async query's text parameter sent to the server, was found as the pool was written and fixed before it merged. PG-33 (Low), no deadline on an async wait, and PG-34 (Low), a query awaited outside a task keeping its memory until its scope ends, are accepted and not counted. PG-35 (Medium), a connection given back as reusable with bytes after its answer, and PG-36 (Medium), a result's memory bounded only by the product of its caps, were found by the pool's first review and fixed before it merged. PG-37 (Low), a cancelled query closing its connection without a CancelRequest, is accepted and not counted; since cancellation, a program bounds PG-33's wait with
cancelAfter. PG-38 (Low), an async connect reading before it wrote its queued SCRAM answer and so never finishing against a SCRAM server, was found when a serve handler first ran the pool live and is fixed. PG-39, statements from many tasks pipelined on one connection each answered to their own task, holds and is not a finding. PG-40 (Low), an async connect with no deadline on its startup, is fixed with the pipelining change. PG-41 (Low), the async benchmark entry holding its password for the life of the process to redial, is accepted and not counted. PG-42 (Medium), tasks waiting for a seat turned away under load, and PG-43 (Medium), a cancelled pipelined statement closing its connection, were found under the TechEmpower load and are fixed. PG-44 (Low), a task waiting its turn able to wait on a wake byte nobody reads, was found by the review of that change and fixed before it merged, with the wake rung again while its byte is unread so the fix loses none. -
BCRYPT-1 to BCRYPT-4, BCRYPT-6 and BCRYPT-7 (Low) are accepted, with the reason in their record, and are not counted: each is the reference's behaviour or the algorithm's, kept so a hash verifies wherever
crypt_rdoes. BCRYPT-10 (Low), the calibrated width following a clock, is accepted too: the width changes only the speed, never a hash. BCRYPT-8 (Low), accepted when found, is superseded, since the kernel is now as wide as the lanes given; BCRYPT-9 was a limitation of the language, since lifted. BCRYPT-5 is a property checked and found to hold, not a finding. -
COMP-11, COMP-12 and COMP-13 (Medium), stale bytes queued by
respondEncodedafterH1_AGAIN, aGzipWriterpanic inside its own bound, and the AArch64 CRC-32 kernel reading four bytes past its window, were found by a review of the first version and fixed. COMP-8 (Low) and COMP-9 (Medium), a stream of small dynamic blocks rebuilding the decoder's tables and the BREACH class of length leaks, are accepted, with the reason in their record, and are not counted. COMP-1 to COMP-7, COMP-10 and COMP-16 (the Adler-32 kernels' window and sums) are properties checked and found to hold. -
P384-1 to P384-3 are properties checked and recorded, not findings: high
saccepted, variable time on public input, and digest truncation. -
PKI-R6 and PKI-R7 (Low) are accepted, with the reason in their record, and are not counted: the size cap and file-type check that a descriptor-based builtin would tighten, and the macOS Keychain the loader does not read. PKI-R1 to PKI-R5 are properties checked and found to hold.
-
DNS-1 to DNS-4 (Low) are accepted, with the reason in their record, and are not counted: DNS-1 to DNS-3 are the trust a stub resolver places in its recursive server, as glibc's and musl's do, and DNS-4 is the second literal reader a module that compiles on
wasm32needs. DNS-5 (Medium), a datagram flood holding the caller's loop insideDnsClient.ready, was found and fixed by the resolver stage. DNS-6 (Low), a later search candidate's NODATA masked by an earlier candidate's fallback error, and DNS-7 (Low),resolveHostdiscarding an answered family at its timeout, were found and fixed by the fallback-and-timeout stage. -
RSA-1, RSA-3 and RSA-4 (Low), the DigestInfo without its NULL refused, the key-size and exponent caps, and a message over 2^31 − 1 bytes panicking in the hash, are accepted, with the reason in their record, and are not counted. RSA-2 and RSA-5 are properties checked and found to hold.
-
PKI-18 (Medium) and PKI-21 to PKI-24 (Low) were found by running the module against x509-limbo and are fixed: a root's own constraints, a root checked as an issuer, key identifiers, the leaf's server profile and its key. PKI-27 (Low), a root's authorityKeyIdentifier fields and a malformed authorityInfoAccess, is fixed by #1028.
PKI-17 (Medium) and PKI-19, PKI-20, PKI-25, PKI-26, PKI-28 and PKI-30 to PKI-32 (Low) are open and counted: no revocation, no policy processing, Names compared byte for byte, chains limbo accepts refused, a non-critical nameConstraints bound as a critical one, no Public Suffix List, a leaf without extKeyUsage accepted as RFC 5280 reads it, a leading-period dNSName subtree read rather than refused, and a root without a subjectKeyIdentifier accepted, as one Mozilla ships is. #1028 tracks PKI-26 and PKI-28. PKI-29 (Informational), a common name not checked against the SANs, is not counted. PKI-1 to PKI-16 are properties checked and found to hold.
-
JWT-1 to JWT-5 (Low) are accepted, with the reason in their record, and are not counted: public-key verifies allocate, the public token is read in variable time, unregistered members may repeat,
peekKid'skidis unauthenticated by design, and what the wipes cannot reach. JWT-6 (Medium, a wiped key still MACed under zeroed pads) and JWT-7 (Low, a hand-built key could pair an RS name with an HMAC check) were found in review and fixed with a before/after test, as was JWT-8 (Low, the JSON read went throughnish/bytes' variable-time scan kernels, which BYTES-2 refuses instd/crypto). JWT-P1 to JWT-P9 are properties checked and found to hold. -
UPSTREAM-9 to UPSTREAM-11 (Low) are accepted, with the reason in their record, and are not counted: a deadline is checked only when the program reads the pool, the origin's one lookup blocks at start-up and is never refreshed, and only
http:is spoken. UPSTREAM-8 (Medium) was found while writing the record, and UPSTREAM-7 (Low), UPSTREAM-12 and UPSTREAM-13 (Medium) in review; each is fixed with a before/after test. UPSTREAM-1 to UPSTREAM-6 are properties checked and found to hold. -
QM-3, QM-4 and QM-5 (Low) are accepted, with the reason in their record, and are not counted.
-
WH-10 (Low), the root-storage trace believing a graph the page forged, was left open by WP55 and fixed by bounding every pointer and length the trace reads to the arena; it is counted as a fixed Low.
-
Fixed in review: OIDC-5 (Medium, a cross-origin
jwks_urireached internal addresses) and OIDC-6 to OIDC-9 (Low). OIDC-1 to OIDC-4 (Low) are accepted, with the reason in their record, and are not counted: fetches block where the caller calls them, a body over the bound is stopped by the transport's cap before any parser sees it, discovery is read once, and thekidis read unauthenticated to choose a key. OIDC-P1 to OIDC-P5 are properties checked and found to hold. The Total is the sum of every row above it, this one included, column by column: fixed3 / 18 / 98 / 211and open0 / 0 / 3 / 42. The Totalmaincarried before this row (fixed3 / 17 / 96 / 207, open0 / 0 / 2 / 42) did not sum its rows; it is recomputed here.
Fuzzed
Each parser below is a libFuzzer target in tests/fuzz/targets/ (how to
build, run and replay one: tests/fuzz/README.md),
and its record says what fuzzing found. The TLS, QUIC, HTTP/1, WebSocket,
HPACK and X.509 targets each ran for at least 30 minutes from their seed
corpora and found no crash, sanitizer report, timeout or OOM, except
tls-server-flight and websocket-client, which have not yet had their
run; CI replays every
corpus on each PR and runs each target for 30 minutes weekly. RT-21 was found
building the runtime for the harness, not by a target.
| Record | Targets |
|---|---|
| json.md | json-tokenizer, json-typed, json-value |
| url.md | url |
| regex.md | regex |
| tls.md | tls-client-hello, tls-record, tls-server-flight |
| quic.md | quic-header, quic-frame |
| http1-codec.md | http1, websocket, websocket-client |
| http1-client-codec.md | http1-client |
| http2.md | hpack |
| crypto-x509.md | x509-der, x509-pem |
| crypto-jwt.md | jwt |
Not yet audited
Files of the attacker-facing surface (std/net/**/*.ts, std/crypto/*.ts,
runtime/*.c) that no record's ## Scope table names yet.
node scripts/security-scope.mjs (run by npm test and CI) fails on a file
of that surface that is in no scope and not listed here, and on a row here
whose file is now in a scope or gone, so this list only shrinks: a new module
ships with its record, and an audit that takes a file in deletes its row.
| File | Why it is not in a record yet |
|---|---|
std/crypto/sha1.ts |
Reached only from WebSocket's Sec-WebSocket-Accept, where SHA-1 is a fixed RFC 6455 transform of a public key, not a security primitive; http1-codec.md names it but no Scope table does. |
std/crypto/x509-random.ts |
The private key and serial x509MintSelfSigned needs, drawn from the OS CSPRNG; crypto-x509.md (X509-6) and secret.md cover it in their bodies, not in a Scope table. |
std/net/buffer-pool.ts |
Holds no parser: it lends fixed-size buffers and zeroes what a borrower used on give-back. No record has reviewed that zeroing yet. |
std/net/prefork.ts |
A supervisor over spawn, spawnWithFds and signals that reads no network input. Its channels are unixSocketPairs it makes to its own workers before spawning them: it hands each worker exactly its ends through spawnWithFds (RT-40) and closes its copies of them, a supervisor channel's once its worker has started and the service pairs, made once per group, once the whole group has started, and reads its own ends only to hand them to the program's callback (preforkSupervise) or, through preforkWith, to drop what arrives. Its descriptor hygiene is RT-17 and RT-19 in runtime.md; tests/link/net_prefork_channels pins that each worker holds no descriptor but 0 to 2 and its own ends, and that a restart leaves the supervisor holding as many descriptors as before. A worker trusts the descriptor numbers in its --nish-prefork-channels= argument as given, the same boundary as --nish-prefork-worker=: whoever starts the program chooses its arguments, and the same holds for --nish-prefork-listener=. With listenPort the supervisor binds one listener per worker in CPU order before any worker starts, holds them for the run, and hands listener k only to worker k (RT-40); with pin each worker narrows itself to CPU k with setCpuAffinity, which never widens a mask, and more pinned workers than CPUs, or a listen field out of range, panic before anything starts. Those runtime properties are in runtime.md → "Properties verified"; the file itself stays unaudited. Its UDP path (listenUdp: the steered group, its fallback, the --nish-prefork-udp= flag) is reviewed in quic-multicore.md; the rest of the supervisor is not. |
std/net/qpack.ts |
HTTP/3's field decoder, which http3.md audits through its callers (the refusals of a field section) but does not list in its Scope table. |
std/net/tls/ticket.ts |
The session-ticket seal, open and strike register; tls.md's Resumption section and its ticket-seal stage record the design and tests, but its Scope table does not list the file. |
Open findings
Every finding still open across the records, most severe first. Where a follow-up issue exists it is named. The rest are recorded in their records only.
| Id | Severity | File | What is left | Follow-up |
|---|---|---|---|---|
| CAPS-19 | Medium | src/capabilities.ts (refuseNarrowGrants), the sandbox's seccomp filter |
A net=<host> grant binds only literal hosts: a host computed at run time is not checked, with or without --sandbox |
— |
| PKI-17 | Medium | std/crypto/pki.ts |
Revocation is not checked: no CRL, OCSP or stapled response is read, so a revoked certificate chains until it expires | — |
| HC-1 | Low | std/net/http1-client-codec.ts (http1ClientFieldLine) |
In the default strings mode each response's fields and reason are kept as strings, about 59 bytes a response of three fields, until the program resets its arena; bounded for each response by maxHeaderBytes. Spans mode (fieldsAsSpans) allocates nothing per response |
Move fetch.ts and websocket.ts to spans mode |
| H2C-1 | Low | std/net/http2-cleartext.ts |
Cleartext by design: no confidentiality or integrity on the path. Serve h2c only behind a TLS-terminating proxy, on loopback or a private network | — |
| AEAD-4 | Low | runtime/runtime-aes.c (nish_aes_schedule, nish_aes_block, nish_aes_ctr, nish_aes_ghash) |
Each kernel now clears every vector register and caller-saved general register before it returns (nish_aes_clear), spills no vector register, and wipes the two stack buffers it owns; tests/run.js reads all three in the -O2 assembly on x86-64, x86-64-v3 and aarch64. What is left: the debug profile's -O0 stack, a signal frame taken while a kernel runs, and the operating system's saved context, none of which a store or clear in the kernel reaches |
— |
| SHA256HW-2 | Low | runtime/runtime-sha256.c (nish_sha256_compress) |
On the SHA-NI and ARMv8 SHA-256 path the state, the message words and every round's intermediates pass through vector registers, and on x86-64 seven spills of them, which no store from C or the language can wipe; the kernel keeps no buffer and writes only the new state to h, which HMAC wipes (K1-7). Recorded rather than reached, as AEAD-4 |
— |
| CHACHAHW-2 | Low | runtime/runtime-chacha20.c (nish_chacha20_xor) |
On the AVX2 and NEON path the state, every round's working words and the keystream pass through vector registers, and clang -O2 spills some to the stack, which no store from C or the language can wipe; the stack buffers the kernel names are wiped by volatile stores, and the caller's state is the caller's to wipe. Recorded rather than reached, as AEAD-4 |
— |
| RT-38 | Low | runtime/runtime-net.c (nish_recv_fd) |
On Darwin a descriptor recvFd keeps is made close-on-exec by an fcntl after recvmsg, so a child another thread spawns in between inherits it; Linux marks it in the receive. The window RT-30 records for pipes, recorded rather than reached |
— |
| NURING-12 | Low | runtime/runtime-net.c (nr_close, nr_pump) |
A lingering close has no deadline: a peer that keeps its window shut holds the slot and up to 256 KiB of queued sends; bounded by the set's slots, and a full set ends lingering closes | — |
| NURING-13 | Low | runtime/runtime-uring.c (ur_top_up), runtime/runtime-net.c (nr_dispatch) |
Accepts stay queued whether or not the program calls tcpAccept, so the listen backlog no longer bounds held peers; bounded by the set's slots (NURING-6) |
— |
| TLS-7 | Low | std/net/tls/client.ts |
TLS 1.2 and below are refused by design (protocol_version, or illegal_parameter for the downgrade sentinel); client certificates, 0-RTT and client resumption are not offered |
— |
| TLS-9 | Low | std/net/tls/record-client.ts (fail, pump) |
A handshake that fails within the receive that delivered the ServerHello seals its fatal alert in the clear, before the client's handshake write keys are installed |
— |
| CT-16 | Low | tests/run.js |
The check reads clang -O2 for the baseline CPU and x86-64-v3 (the one level --cpu accepts); every other level is unread. Documented in docs/LANGUAGE.md |
— |
| JSON-2 | Low | std/json-tokenizer.ts (reset, JSON_TOK_END_CEILING) |
A window ending within 64 bytes of 2^31 − 1 is refused so that no offset can overflow; no test reaches it, since it takes a 2 GiB array | — |
| SQL-2 | Low | std/sqlite.ts (columnText) |
sqlite3_column_text answers NULL both for SQL NULL and when converting the value to text runs out of memory, and columnText reads either as null. A program can take a value it failed to read for an empty column. columnInto tells the two apart and answers SQLITE_NOMEM. |
— |
| X509-12 | Low | std/crypto/x509.ts (x509NameEqual, x509NameIsPrefix) |
Names compare as DER byte for byte, not after RFC 5280 §7.1's stringprep, so a re-encoded issuer Name does not chain and a re-encoded directoryName constraint does not match. Fails closed | — |
| X509-13 | Low | std/crypto/x509.ts (x509DerNameSound) |
DER's SET OF order inside a multi-valued RDN is not checked: an unsorted RDN is a sound Name that matches only itself, never its sorted spelling. Fails closed | — |
| PKI-19 | Low | std/crypto/pki.ts |
Certificate policies are not processed: no policy tree, so a chain is not refused for its policies | — |
| PKI-20 | Low | std/crypto/pki.ts |
Names chain by DER byte for byte, as X509-12. Fails closed | — |
| PKI-25 | Low | std/crypto/pki.ts |
Six chains x509-limbo accepts are refused, each under a check kept on purpose. Fails closed | — |
| PKI-26 | Low | std/crypto/pki.ts |
A nameConstraints that is not critical binds as a critical one rather than refusing the chain; every other known extension marked against RFC 5280 §4.2 is refused | #1028 |
| PKI-28 | Low | std/crypto/pki.ts |
A wildcard over a public suffix, such as *.co.uk, is accepted: no Public Suffix List ships |
#1028 |
| PKI-30 | Low | std/crypto/pki.ts |
A leaf without extKeyUsage is accepted, as RFC 5280 reads it, where the BRs require one | — |
| PKI-31 | Low | std/crypto/pki.ts |
A dNSName subtree with a leading period is read as the names below it, not refused; an excluded one leaves the apex allowed | — |
| PKI-32 | Low | std/crypto/pki.ts |
A root without a subjectKeyIdentifier anchors a path, since one root Mozilla ships lacks it | — |
| SHM-3 | Low | runtime/runtime-shm.c (adopt) |
A same-user peer that shrinks a region with ftruncate makes a later access past the new end a SIGBUS, not a checked panic |
— |
| SERVE-14 | Low | std/net/serve.ts (serveOn, serveFreeSlot) |
No per-peer share of inFlight: one client with inFlight connections, each holding a slow request, has every other request answered 503 |
#1278 |
#382 also tracks the emitter half of CG-6. The codegen stage closed CG-6 by
refusing orReturn inside a scope() region. Joining before the return in
src/emit-result.ts would let that refusal go.
Corrections still to make
None. The stages listed documentation corrections outside their own files,
and the security-policy stage made every one in the user documentation and in
codegen.md and cli.md. The three it left open have been made since: runtime/shim.mjs and
runtime/nish.d.ts open their writes with O_NOFOLLOW, as the native
runtime does for RT-4 (#405, runtime.md); scripts/bootstrap.sh
no longer needs the working-directory fallback (#425, cli.md); and
std/README.md no longer says a string built by join can pass 2^31 − 1
bytes, since #427 closed CG-3.
Writing a record
For contributors. A new attacker-facing file — a std/net or std/crypto
module, a runtime/*.c file, or a builtin or nish: module that reads the
network, the terminal or another process — lands with its record and its row
in the tables above, in the same pull request. The record states its scope,
each finding fixed with a test shown failing before the fix and passing after,
and each finding left open. node scripts/security-scope.mjs refuses a file
of that surface that no record's scope names and that "Not yet audited" does
not list.
-
A record states the commit its
file:lineanchors are at. A row rewritten after that commit names the commit its own anchors are at, rather than moving them silently (CG-5). -
A record's Tests list names every check it cites by its exact
check(...)string, templated names as templates, so a search for the string finds the test intests/run.js. -
A cache entry's
key, written last, is its only completeness signal. A hit trusts the stored key alone, equal byte for byte to the computed one; a missing or mismatched key is a miss and the entry is rebuilt. Files removed by hand from an entry whose key is intact are out of scope for the run cache and the runtime cache alike (CLI-5, CLI-11), so a review need not raise them.

