fix(ui): bundle the footer's ZenQuality logo (production CSP img-src 'self' refused the hotlink); CSP proof counts every violation; gitleaks allowlist carries the owner's [gated 2026-10-18] marker
This commit is contained in:
1 parent
1814a8d7d7
commit
dcc79400de
7 files changed
+163
-17
No files matched your search
@@ -2,8 +2,8 @@
|
||||
// OD-1): the server's two policies, the three engines, one reference PDF
|
||||
// picked on Home, a fresh browser per engine and policy.
|
||||
// with DEPLOY.md's policy, 'wasm-unsafe-eval' in script-src: the
|
||||
// import opens the editor; no violation for scripts, workers or
|
||||
// wasm (the footer's external image is the one known violation).
|
||||
// import opens the editor; no violation at all (the footer's
|
||||
// external image, the one known violation until R4.10, is bundled).
|
||||
// without the keyword removed: the inline line « Le moteur de lecture n'a
|
||||
// pas pu être chargé. Réessayez l'import. », the button enabled
|
||||
// again, no page error, and a second pick of the same file shows
|
||||
@@ -63,7 +63,6 @@ const PASSES = [
|
||||
{ variant: 'with', reporting: true },
|
||||
{ variant: 'without', reporting: true },
|
||||
]
|
||||
const KNOWN_IMAGE_HOST = 'zenquality.fr'
|
||||
const CSP_TEXT = /content.security.policy|refused to|unsafe-eval|\bCSP\b/i
|
||||
const LATE_VIOLATIONS_MS = 2000
|
||||
const RETRY_TIMEOUT_MS = 30_000
|
||||
@@ -165,14 +164,9 @@ async function retryImport(tab) {
|
||||
|
||||
/** The violations and console messages that name the policy. */
|
||||
function violationsOf(row, seen) {
|
||||
const documentViolations = row.cspViolations ?? []
|
||||
const consoleCsp = seen.console.filter((m) => CSP_TEXT.test(m.text))
|
||||
const known = (text) => text.includes(KNOWN_IMAGE_HOST)
|
||||
return {
|
||||
documentViolations,
|
||||
unexpectedDocumentViolations: documentViolations.filter((v) => !known(v)),
|
||||
consoleCsp,
|
||||
unexpectedConsoleCsp: consoleCsp.filter((m) => !known(m.text)),
|
||||
documentViolations: row.cspViolations ?? [],
|
||||
consoleCsp: seen.console.filter((m) => CSP_TEXT.test(m.text)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,11 +190,10 @@ function problemsOf(variant, row, coreUnavailable) {
|
||||
if (row.pageErrors?.length) problems.push('page errors')
|
||||
if (row.crashed) problems.push('page crashed')
|
||||
if (variant === 'with') {
|
||||
const known = (r) => String(r.blockedUri).includes(KNOWN_IMAGE_HOST)
|
||||
if (row.outcome !== 'editor') problems.push(`outcome ${row.outcome}`)
|
||||
if (row.unexpectedDocumentViolations.length) problems.push('violations')
|
||||
if (row.unexpectedConsoleCsp.length) problems.push('CSP console messages')
|
||||
if (row.reports?.some((r) => !known(r))) problems.push('reports')
|
||||
if (row.documentViolations.length) problems.push('violations')
|
||||
if (row.consoleCsp.length) problems.push('CSP console messages')
|
||||
if (row.reports?.length) problems.push('reports')
|
||||
return problems
|
||||
}
|
||||
if (row.errorText !== coreUnavailable) problems.push('inline line')
|
||||
@@ -341,7 +334,7 @@ async function main() {
|
||||
bytes: readFileSync(REFERENCE).length,
|
||||
sha256: sha256(readFileSync(REFERENCE)),
|
||||
},
|
||||
expected: { without: coreUnavailable, knownImageHost: KNOWN_IMAGE_HOST },
|
||||
expected: { without: coreUnavailable, violations: 'none' },
|
||||
observation:
|
||||
"document: the init-script probe's securitypolicyviolation events; " +
|
||||
'console: every message of the page and its workers; reporting ' +
|
||||
|
||||
Reference in new issue
Block a user