the operator's console shows what changed on this edge
OPEN-64 gave the edge a record of every deliberate config change and an
endpoint that reads it; the record was invisible to the person it is for.
`/admin` now draws it: when, section, action, target, the note somebody
typed, and the surface it came through, newest 25 of the total.
Rulings this copy holds to:
* The surface column says `operator` or `import`, never a person. The
edge has one admin token; a column implying a per-person attribution
it cannot provide would be a false record, not a thinner one.
* Engine bans are absent, and the line under the table says so in the
same breath as the counts: "engine bans are not here, they are not
decisions". A table that mixed them in would read as "the operator
chose to ban this address", which is a different claim.
* The log's two bounds are printed under the table they govern -
"pruned after 30d or 5000 rows, whichever comes first" - the way the
retention windows sit on the observations and alerts tables. They come
from `/state` (`changeRetentionDays`, `changeLogMaxRows`), so the
numbers are the ones this process was actually started with.
* A change record that did not land is named in the durable-writes pill
with its count: "change records not written x1 (1 changes
unrecorded)". It is the one write failure that changes nothing the
edge enforces, which is exactly why it would otherwise go unseen - the
config did change, only its record is missing.
What the run measured rather than assumed: the gate's seed writes a block
whose reason carries markup (`<svg onload=document.title='XSS2'> probe`),
and that reason is now the detail of a change row - so the change table
is a place where a stored operator string reaches the one browser in this
system that holds the admin token. The markup-seed assertion now covers
`#changes tbody`, and a companion assertion proves the string really
arrived as text, because without it an injection count of zero would only
prove that nothing was looked at.
Gates on this head: build 0 warnings / 0 errors, unit 313/313,
integration 298/298 in 34 s, console 98 assertions / 0 failed, smoke
passed 127 failed 0, image 262 MB, compose-smoke 278 passed 0 failed.
Refs OPEN-65.
This commit is contained in:
@@ -191,6 +191,41 @@ const rgb = (s) => s.match(/\d+/g).slice(0, 3).map(Number);
|
||||
check('the kind an operator has to act on is marked, not only printed',
|
||||
warnCells.includes('server_error_streak'), JSON.stringify(warnCells));
|
||||
|
||||
// The record of deliberate config changes (OPEN-64) on the page an operator
|
||||
// actually reads (OPEN-65). The seed wrote a policy, an allow entry and two
|
||||
// blocks before this page was driven, so an empty table here is a page that
|
||||
// did not draw, not a log that is empty.
|
||||
const changeRows = await cells('#changes tbody tr');
|
||||
check('the change table lists the writes this run made',
|
||||
changeRows.length > 0 && changeRows.some((r) =>
|
||||
r[1] === 'block' && r[2] === 'added' && r[3] === SEED_BLOCK)
|
||||
&& changeRows.some((r) => r[1] === 'allow' && r[2] === 'added'
|
||||
&& r[3] === SEED_EXPIRED_CIDR),
|
||||
JSON.stringify(changeRows.slice(0, 4).map((r) => [r[1], r[2], r[3], r[5]])));
|
||||
// The edge has one admin token, so the honest column is the surface the
|
||||
// change came through. A row naming anything else would be a record the edge
|
||||
// cannot support.
|
||||
check('the change table names the surface, never a person',
|
||||
changeRows.every((r) => r[5] === 'operator' || r[5] === 'import'),
|
||||
JSON.stringify([...new Set(changeRows.map((r) => r[5]))]));
|
||||
const changeNote = (await page.textContent('#changenote')).replace(/\s+/g, ' ').trim();
|
||||
check('the note under the table states both bounds of the log',
|
||||
/pruned after \d+d or \d+ rows, whichever comes first/.test(changeNote), changeNote);
|
||||
// An engine ban is not a decision somebody made, and a table that quietly
|
||||
// mixed the two would read as "the operator chose to ban this address".
|
||||
check('the note says engine bans are not in this table',
|
||||
/engine bans are not here/.test(changeNote), changeNote);
|
||||
// The seed's block reason carries markup, and that reason is the detail of a
|
||||
// change row. Without this line the injection count below could be zero
|
||||
// because the string never reached the table at all.
|
||||
const markupChange = changeRows.find((r) => r[3] === SEED_MARKUP_BLOCK);
|
||||
check('the markup the seed typed reached the change table as text',
|
||||
!!markupChange && (markupChange[4] || '').includes("<svg onload=document.title='XSS2'>"),
|
||||
JSON.stringify(markupChange));
|
||||
check('no engine ban reached the change table',
|
||||
!changeRows.some((r) => r[5] === 'engine'),
|
||||
JSON.stringify(changeRows.map((r) => [r[1], r[2], r[5]])));
|
||||
|
||||
check('the token never appears in the markup', !html.includes(TOKEN));
|
||||
|
||||
// esc() is the only thing between an anonymous request and the one browser in
|
||||
@@ -828,6 +863,8 @@ const rgb = (s) => s.match(/\d+/g).slice(0, 3).map(Number);
|
||||
alertLastWriteError: 'gate: durable write blocked',
|
||||
retentionPruneFailures: 1, retentionLastError: 'gate: durable write blocked',
|
||||
retentionLastPruneAt: '2026-10-02T04:41:19.0000000+00:00',
|
||||
changeWriteFailures: 1, changesNotWritten: 1,
|
||||
changeLastError: 'gate: durable write blocked',
|
||||
trackedSources: 4, operatorBlocks: 2, engineBans: 0,
|
||||
allowEntries: 0, allowEntriesExpired: 0, mode: 'Enforce'
|
||||
})
|
||||
@@ -862,6 +899,12 @@ const rgb = (s) => s.match(/\d+/g).slice(0, 3).map(Number);
|
||||
!!snapshotPill && !/warn/.test(snapshotPill.cls) && !/not persisted/.test(snapshotPill.text)
|
||||
&& /retention not running/.test(writePill.text || ''),
|
||||
JSON.stringify({ write: writePill, snapshot: snapshotPill }));
|
||||
// The change log is the one write whose failure does not change what the
|
||||
// edge enforces, so without this line the config would have changed and
|
||||
// nothing would say the record of it is missing.
|
||||
check('and it names the change records that never landed, with how many',
|
||||
!!writePill && /change records not written \u00d71 \(1 changes unrecorded\)/.test(writePill.text),
|
||||
JSON.stringify(writePill));
|
||||
check('the page threw no javascript on that answer', lostProblems.length === 0, lostProblems.join(' | '));
|
||||
await lost.close();
|
||||
}
|
||||
@@ -973,7 +1016,7 @@ const rgb = (s) => s.match(/\d+/g).slice(0, 3).map(Number);
|
||||
await page.click('div.bar button[data-act="srcfilter"]');
|
||||
await page.waitForFunction((k) => document.getElementById('obsnote').textContent.includes(k),
|
||||
MARKUP_KEY, { timeout: 15000 }).catch(() => {});
|
||||
const markupInjected = await page.$$eval('#obs tbody, #streaks tbody, #alerts tbody',
|
||||
const markupInjected = await page.$$eval('#obs tbody, #streaks tbody, #alerts tbody, #changes tbody',
|
||||
(bodies) => bodies.reduce((n, b) => n + b.querySelectorAll('img,svg,script,iframe,object,embed').length, 0));
|
||||
const markupNote = await noteOf('#obsnote');
|
||||
const markupTitle = await page.title();
|
||||
@@ -1048,6 +1091,9 @@ const rgb = (s) => s.match(/\d+/g).slice(0, 3).map(Number);
|
||||
check('the token is not in the markup at phone width either', !m.html.includes(TOKEN));
|
||||
const phoneAlertRows = await page.$$eval('#alerts tbody tr', (r) => r.length);
|
||||
check('the alerts table is still there at phone width', phoneAlertRows > 0, `${phoneAlertRows} rows`);
|
||||
const phoneChangeRows = await phone.$$eval('#changes tbody tr', (r) => r.length);
|
||||
check('the change table is still there at phone width', phoneChangeRows > 0,
|
||||
`${phoneChangeRows} rows`);
|
||||
check('the country bars survive the phone layout',
|
||||
m.barWidths.length > 0 && m.barWidths.every((w) => w >= 2), JSON.stringify(m.barWidths));
|
||||
check('the page threw no javascript at phone width', phoneProblems.length === 0, phoneProblems.join(' | '));
|
||||
|
||||
Reference in New Issue
Block a user