fix legend blurbs missed by hardening (SCC UID-range, MachineConfig SSH, readiness) + extend preflight to scan the app JS where legends inline
This commit is contained in:
@@ -182,7 +182,11 @@ const banned = [
|
||||
[/two policies renders from one field/, "subject/verb error 'renders from one field'"],
|
||||
[/grown-up chart/, "'grown-up chart' (use 'production-grade chart')"],
|
||||
];
|
||||
for (const [re, msg] of banned) if (re.test(html)) fail.push(msg);
|
||||
// legend blurbs are inlined into the app JS (the SCENES const), so scan both surfaces
|
||||
const visible = html + "\n" + app;
|
||||
for (const [re, msg] of banned) if (re.test(visible)) fail.push(msg);
|
||||
if (/\bnever by SSH\b/.test(visible)) fail.push("obsolete 'never by SSH'");
|
||||
if (/random non-root UID/.test(visible)) fail.push("obsolete 'random non-root UID' (also check legends)");
|
||||
|
||||
if (fail.length) { console.error("PREFLIGHT FAILED:\n - " + fail.join("\n - ")); process.exit(1); }
|
||||
console.log(`site build -> ${DIST}: index.html ${(html.length / 1024).toFixed(0)}KB, rev ${BUILD_REV}, preflight OK (${appName})`);
|
||||
|
||||
Reference in New Issue
Block a user