| 1 | # Injection defences: Fable follow-up |
| 2 | |
| 3 | Paul requested these changes after reviewing 862bb1c3. Merge origin/main first |
| 4 | (5a6755bb, merged as 5f603516). Preserve legitimate work: missing certification |
| 5 | must not suppress diagnostics or fix rounds. Authority remains a person's tap |
| 6 | or a current owner-chosen project setting plus deterministic checks. |
| 7 | |
| 8 | ## Checks and merge authority |
| 9 | |
| 10 | Without a base gate manifest, run candidate gates and hosted CI as diagnostics, |
| 11 | with no BaseChecksSHA. With a manifest, run immutable base gates for certification. |
| 12 | When gate files change, also run candidate gates in an independent checkout and |
| 13 | report both outcomes. Candidate results drive repair feedback but cannot certify |
| 14 | merging. Gate-change auto-merge still requires passing base checks and the |
| 15 | explicit setting. A person can approve a legitimate gate update whose old gate |
| 16 | fails but whose candidate checks pass. |
| 17 | |
| 18 | Manifest paths may name directories. Resolve them from the base tree, pin their |
| 19 | whole contents read-only, and classify new, changed or deleted descendants as |
| 20 | gate changes. Pin directories against helper shadowing, including new Python |
| 21 | modules. Checked changes also require not_sensitive unless the owner enables a |
| 22 | separate sensitive-change waiver. Existing eligibility and current-roster checks |
| 23 | remain mandatory. |
| 24 | |
| 25 | ## Previews |
| 26 | |
| 27 | Verify the exact CSP on the served marker, not just exported _headers. A missing |
| 28 | or different header is unconfirmed and clearly reported. Open previews in an |
| 29 | Equipo wrapper whose frame-src permits only that preview origin and whose |
| 30 | sandboxed iframe cannot navigate the top page. Permit a current owner to approve |
| 31 | one exact preview without the header, after a successful secret scan; do not |
| 32 | silently omit the header or publish an insecure fallback. Tailnet placement |
| 33 | limits readers, not browser egress. Public-preview grants apply prospectively. |
| 34 | |
| 35 | Bundle pinned, digest-verified gitleaks artifacts for Linux and Mac with runner |
| 36 | releases. Execute scans offline inside the sandbox, using trusted scanner |
| 37 | configuration and exports only. Runtime scanning and its test need no host Go |
| 38 | module cache. |
| 39 | |
| 40 | ## Text provenance |
| 41 | |
| 42 | Use collision-proof multi-line data blocks for logs, diffs and other multi-line |
| 43 | values. Quote each value once. Keep the person's fix note under its own source |
| 44 | label. Hand-offs carry only composer messages belonging to that request. A |
| 45 | corrupt notebook opens empty with a warning; its corrupt bytes remain untouched. |
| 46 | |
| 47 | ## Platform and verification |
| 48 | |
| 49 | Revise the separate CARLOS patch against platform main in a disposable worktree. |
| 50 | Accept standard CSP values generally and reject requested policies that cannot |
| 51 | be applied, before publication. Include usage documentation. Do not push CARLOS. |
| 52 | Tighten rule 4 in AGENTS and the hosted spec branch. Every guard gets a failing |
| 53 | test and an observed mutation failure. Run the requested local gates, push Equipo, |
| 54 | and wait for hosted CI. Record both branches, the platform base, tests and |
| 55 | mutations in ../report2.md. No merge into main or deployment. |
| 56 | |
| 57 | ## Implementation contract |
| 58 | |
| 59 | Protocol 28 is required for the directory-gate certificate, served preview |
| 60 | policy and per-preview exception. Older runners remain diagnostic. No further |
| 61 | migration is needed: the sensitive-change waiver and public-preview grant time |
| 62 | use the existing autonomy JSON; the exact owner, candidate and export grant is |
| 63 | stored on its preview step. Removing an owner revokes their standing authority. |
| 64 | |
| 65 | The fixed preview policy omits frame-ancestors so the instance can embed it. |
| 66 | The preview itself cannot embed other frames. The instance wrapper pins |
| 67 | frame-src to the exact preview origin and uses a sandboxed iframe without |
| 68 | popups or top navigation. An exception never skips the secret scan. |
| 69 | |
| 70 | Gitleaks v8.30.1 is a pinned Go module. Release builds compile it separately for |
| 71 | Linux amd64 and Mac arm64, record each digest in the install manifest, and link |
| 72 | the corresponding digest into each runner. Tests re-execute the already compiled |
| 73 | gitleaks command from the test binary. No compiler or module cache is needed to |
| 74 | prepare or run a scanner during those tests. |
| 75 | |
| 76 | ## Final review corrections |
| 77 | |
| 78 | The trusted base gate keeps its own outcome alongside the combined checks |
| 79 | outcome. Candidate diagnostics cannot turn a failed base gate into a pass. |
| 80 | A base failure enters the existing fix-round path; any merge explanation names |
| 81 | the base failure. Persist the outcome additively, after main's migrations. |
| 82 | |
| 83 | Preview link labels contain only the host. Their targets remain Equipo wrapper |
| 84 | routes. The exported and verified CSP names the configured Equipo origin in |
| 85 | frame-ancestors, including after restart. A republishing attempt offers no stale |
| 86 | header-confirmation link. |
| 87 | |
| 88 | The platform patch refuses serving only for requested security headers that |
| 89 | cannot be applied. Invalid nonsecurity lines retain the edge's skip behaviour. |
| 90 | |