docs(docs): R4.9 verifier and security follow-ups: §6 rows 19 (J2 device run, blocking before merge) and 20 (WebKit worker error trace); port 4173 in the exposure table as an owner-opened recette rule; serve.mjs post-bind check typed from the address; report-compare comment names the residual race

This commit is contained in:
bchanot committed 2026-10-20 22:05:04 +02:00
1 parent 854d988c07
commit 49b812b9b4
6 files changed
+21 -11

No files matched your search

+4 -2
View File
@@ -118,8 +118,10 @@ impl Files for Disk {
}
fn read(&self, path: &str) -> Result<Vec<u8>, FileFailure> {
// The type is checked before the open (a FIFO or a device is never opened), then
// again on the handle (the path is not swapped for a directory in between).
// The type is checked before the open (a FIFO or a device named on the command line
// is not opened), then again on the handle, which refuses a path swapped in between;
// a local writer swapping in a FIFO between the two calls can still make the open
// wait (operator tool on the operator's own files, accepted).
let regular = |meta: &fs::Metadata| {
if !meta.is_file() {
return Err(FileFailure::NotRegular);
+1
View File
@@ -68,6 +68,7 @@ the LAN, the administration tools and the database are not.
| Studio | 54323 | **closed** | host firewall rule; from another device: SSH tunnel (§3.4) |
| PostgreSQL | 54322 | **closed** | host firewall rule; the CLI and the tests use it on the host |
| Worker | none | — | internal, Supabase compose network, read-only, no capability |
| Production build for the R4 recettes (`scripts/browser/serve.mjs`) | 4173 | **closed** by default; open only during a device recette | static build behind the DEPLOY CSP, empty `env.js`, bound to the one DEV address (never a wildcard, refused by the script); the owner opens it for the session, `sudo ufw allow in on enp89s0 from 192.168.1.0/24 to any port 4173 proto tcp comment 'faunosteo recette R4'`, and deletes that rule afterwards (`sudo ufw status numbered`, then `sudo ufw delete <n>`) |
| PostgREST, GoTrue, Storage, pg-meta | none | — | behind Kong |
### 3.1 Why a host firewall is required
+4 -2
View File
@@ -159,7 +159,9 @@ only; a refused import leaves the tab's texts in place: app suites
| 16 | pdf-lib (unmaintained since 2021) | §5 item 5 | fixed with proof | left the repository at R4.8; `r4.census` |
| 17 | Stamped PDFs saved with object streams (before Step 6) read a stripped attachment as `no_attachment` | §4 trade-off | accepted temporarily | pre-Step-6 files only, same outcome as a foreign PDF, no data at stake; documented in PDF-FORMAT |
| 18 | Imports offered to external users | §5 gate | before public exposure | the gate stays closed: the import is a local-tool feature; opening it needs items 3, 9 and 12 closed and a fresh audit of the worker path |
| 19 | J2 on the owner's devices (export FR / EN, views and markers, attachment, round trip, L on the phone, repetition) | BDR-063, BDR-060, plan A.4 | blocking before merge | `R4_J2.md` J2.1 to J2.14 on the OD-6 list; every cell NON TESTÉ today; headless runs (RUST.md §10.8, §10.11) never fill a cell |
| 20 | WebKit one-off worker `error` event seen headless at R4.2 / R4.3 | BDR-058 | accepted temporarily | not blocking per BDR-058: kept in the record, never masked (the client classifies every `error` event as a crash, `core/worker/client.ts`), the repetition series showed no recurrence (RUST.md §10.5); closes with J1.9 / J1.10 on the iPhone (Safari iOS) |
Owner reading at the R4.9 checkpoint: no item in this table is a code
change pending in R4; items 3 and 9 are the device run (J1), items 12, 15 and
18 are the public-exposure gate, item 7 is measured and bounded (the browser's raster path), its device check is J2.6 / J2.7.
change pending in R4; items 3, 9 and 19 are the device runs (J1 and J2),
items 12, 15 and 18 are the public-exposure gate, item 7 is measured and bounded (the browser's raster path), its device check is J2.6 / J2.7.
+3
View File
@@ -21,6 +21,9 @@ Two surfaces, both on the DEV origin (`scripts/dev-env.sh`,
2. The production build behind the DEPLOY CSP (what the proofs ran):
`pnpm build:preview` then
`. scripts/dev-env.sh && node scripts/browser/serve.mjs --host "$FAUNOSTEO_DEV_HOST" --port 4173` (the server refuses an empty or unspecified address),
reachable from the devices only once the owner opened port 4173 to the
private subnet for the session (`ENVIRONMENTS.md` §3, the 4173 row:
one `ufw allow` rule, deleted afterwards),
`http://<FAUNOSTEO_DEV_HOST>:4173`. Static files, the nginx SPA fallback,
the DEPLOY `Content-Security-Policy` with `'wasm-unsafe-eval'` on every
response. `--csp without` serves the same build without the keyword (the
+3
View File
@@ -19,6 +19,9 @@ As for J1, on the DEV origin (`scripts/dev-env.sh`, `FAUNOSTEO_DEV_HOST`):
1. `pnpm dev:offline` (the local tool), `http://<FAUNOSTEO_DEV_HOST>:5173`.
2. The production build behind the DEPLOY CSP: `pnpm build:preview` then
`. scripts/dev-env.sh && node scripts/browser/serve.mjs --host "$FAUNOSTEO_DEV_HOST" --port 4173` (the server refuses an empty or unspecified address),
reachable from the devices only once the owner opened port 4173 to the
private subnet for the session (`ENVIRONMENTS.md` §3, the 4173 row:
one `ufw allow` rule, deleted afterwards),
`http://<FAUNOSTEO_DEV_HOST>:4173`. Surface 2 is the one that matters for
the memory items and the CSP.
+6 -7
View File
@@ -23,7 +23,7 @@ import { readFileSync } from 'node:fs'
import { readFile, stat } from 'node:fs/promises'
import { lookup } from 'node:dns/promises'
import { createServer } from 'node:http'
import { BlockList } from 'node:net'
import { BlockList, isIPv6 } from 'node:net'
import { extname, join, resolve, sep } from 'node:path'
import { pathToFileURL } from 'node:url'
import { parseArgs } from 'node:util'
@@ -36,12 +36,11 @@ const WILDCARDS = new BlockList()
WILDCARDS.addAddress('0.0.0.0', 'ipv4')
WILDCARDS.addAddress('::', 'ipv6')
// `dns.lookup` reports the family as 6, `server.address()` as 'IPv6'.
const isWildcard = ({ address, family }) =>
WILDCARDS.check(
address.replace(/%.*$/, ''),
family === 6 || family === 'IPv6' ? 'ipv6' : 'ipv4',
)
// The type comes from the address itself, whatever shape `family` takes.
const isWildcard = ({ address }) => {
const bare = address.replace(/%.*$/, '')
return WILDCARDS.check(bare, isIPv6(bare) ? 'ipv6' : 'ipv4')
}
/**
* The one address `host` names, resolved before any socket exists: an empty