fix(supabase): R5.5 gate round 1, final errors, four attempts, keys off argv, runbook
This commit is contained in:
1 parent
a481af52c7
commit
56593af25c
10 files changed
+330
-17
No files matched your search
@@ -3287,15 +3287,17 @@ DELETE, no bucket call but the read).
|
||||
**Destination rule.** `http`, explicit port, no credentials, path, query or fragment; host `localhost`,
|
||||
a loopback address, or the private IPv4 address equal to `FAUNOSTEO_DEV_HOST`. A name other than
|
||||
`localhost` is never accepted (it cannot be proven local without resolving it). The handshake then
|
||||
checks the private bucket and the key before any object is read or written. A local port held by
|
||||
checks the private bucket and the key before any object is read or written. The DEV address counts only if a socket can be bound to it (an address of this machine).
|
||||
A local port held by
|
||||
something else would receive the key: accepted on a single-user machine, the same stance as the
|
||||
worker's `SUPABASE_URL`.
|
||||
|
||||
**Tests.** `curation_upload` (7: manifest family, bytes, 15 destination refusals + DEV host rule,
|
||||
plan), `upload_tool` (10, the binary against a loopback stub with a made-up key: `--check` writes
|
||||
plan), `upload_tool` (12, the binary against a loopback stub with a made-up key: `--check` writes
|
||||
nothing, run then rerun, different bytes never overwritten, missing and foreign row stop before any
|
||||
write, 401/403, resume after a failed confirmation, unreachable port, refused destinations, folder
|
||||
outside the seed, usage), `curation_caps` (4). **Not run by the assistant**: the session against the
|
||||
outside the seed, usage, an oversized object refused once as `State`, a DEV address that is not this
|
||||
machine), `curation_caps` (4). **Not run by the assistant**: the session against the
|
||||
real local stack (`pnpm e2e:sheet-assets`: upload, rerun, anon key, wrong key, refused destinations,
|
||||
unreachable port); the assistant's own run of the tool with the service key was refused by the
|
||||
permission layer (CLAUDE.md: no transfer tool run by Claude) and was not retried by another route.
|
||||
@@ -3333,7 +3335,7 @@ and a unit enum variant from a one-key map. Probed on Report v3 (test
|
||||
| `"sheet": [sheetId, null, documentSha256]` | accepted | refused |
|
||||
| `"practitioner": [name, cabinet, contact, siret]` | accepted | refused |
|
||||
| `observations[0].severity` = `{"mild": null}` | accepted | refused |
|
||||
| a zone written as an array | refused only when the order is wrong, accepted when it matches the field order | refused |
|
||||
| a zone written as an array (probe, not pinned by the test) | accepted when the types of the positions fit the fields, whatever they mean; refused in the probe because a label landed on `laterality` | refused |
|
||||
| `"extra": 1` (unknown field) | accepted | accepted (non-strict objects) |
|
||||
|
||||
Consequence of accepting: a hand-built or foreign attachment imports; the report is re-serialised in
|
||||
@@ -3349,3 +3351,18 @@ the same readers there; until then the gated readers are unchanged.
|
||||
|
||||
Open points carried: debt list of §11.12 and §11.13 stands (migration map cascade replay, `clippy.toml`
|
||||
I/O list); the upload tool is not run against the real stack by the assistant.
|
||||
|
||||
Gate round 1 (2c44506 + a481af5): `pnpm check:all` green 21:21:38; security PASS (1 MEDIUM, 9 LOW,
|
||||
`.claude/audits/2026-10-23-rust-r5-upload-security.md`); fresh verifier ECARTS(4)
|
||||
(`.claude/audits/2026-10-23-rust-r5-upload-verify.md`): an object over the size cap was classified
|
||||
`Network` and retried (now a final `State`, test), "retried three times" meant three attempts (now four,
|
||||
one try and three retries), the runbook's exit codes (fixed), the FLOOR script could not print OK while
|
||||
the declared `evals.md:205` line stands (it is now listed as declared, still not requalified). Security
|
||||
fixes taken: keys off every argv in `sheet-assets-e2e.sh` (M1); the tool is compiled without the key in
|
||||
the environment, then run (L1); the DEV address must be one of this machine's (L2); a malformed request
|
||||
is final, not retried (L3); CLAUDE.md names the three files allowed `std::fs` (L7). Kept and declared:
|
||||
the cleartext key on plain http to a local port (L2), the file-read race mitigated by the hash (L5), the
|
||||
pre-existing `confirm_sheet_asset_upload` that does not re-check the hash (L6, SQL outside R5.5), the
|
||||
waived fixture lines (L8), the serde tolerance (L9, owner decision). Outside the diff, reported by the
|
||||
audit and not verified: `supabase/config.toml` sets no JWT secret, so the local stack likely uses the
|
||||
CLI's public default keys while port 54321 is open to the LAN.
|
||||
@@ -147,9 +147,12 @@ write:
|
||||
hash on their own sheet opens nothing.
|
||||
|
||||
A rerun after any failure resumes: an object already verified is kept, a
|
||||
confirmed row is left alone. Network errors and 5xx answers are retried three
|
||||
times; a refusal (401, 403, a state mismatch) is final. Exit codes: 0 done, 1
|
||||
refused (destination, content, state, access), 2 usage, 3 network. The key is
|
||||
confirmed row is left alone. A connection failure or a 5xx answer is retried
|
||||
three times (four attempts); a refusal (401, 403, a state mismatch, an
|
||||
oversized answer) is final. Exit codes: 0 done, 1 refused (usage, manifest,
|
||||
destination, content, handshake, state, access), 2 an argument that is not
|
||||
UTF-8, 3 network. The DEV address counts only if it is an address of this
|
||||
machine. The key is
|
||||
never printed and goes through no proxy. `pnpm e2e:sheet-assets` runs the
|
||||
whole behaviour against the local stack (upload, rerun, anon and wrong key,
|
||||
refused destinations, unreachable port). The TypeScript tool stays as
|
||||
|
||||
Reference in new issue
Block a user