chore: checkpoint web Blender feature-gap work, docs and tests
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

- update native web_engine sources and rebuilt wasm artifacts
- add task cards, status notes and tooling scripts
- add web e2e specs, tutorial UI sources and tutorial assets
- sync golden task manifests and audit records

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-11 10:46:55 +08:00
parent f3e21c6b98
commit d1e6b63d54
665 changed files with 59149 additions and 39194 deletions

View File

@@ -18,10 +18,14 @@ const directives = new Map(policy.split(";").map((directive) => {
const tokens = directive.trim().split(/\s+/u);
return [tokens.shift(), tokens];
}));
const sourceTokens = [...directives.values()].flat();
const scriptDirectives = ["default-src", "script-src", "script-src-elem", "script-src-attr", "worker-src"];
const sourceTokens = scriptDirectives.flatMap((name) => directives.get(name) ?? []);
for (const forbidden of ["'unsafe-inline'", "'unsafe-eval'", "data:", "*", "blob:"]) {
assert.equal(sourceTokens.includes(forbidden), false, `CSP contains forbidden token ${forbidden}`);
assert.equal(sourceTokens.includes(forbidden), false, `CSP script/worker directives contain forbidden token ${forbidden}`);
}
/* React Flow positions nodes/edges with inline style attributes; scripts stay strict. */
assert.deepEqual(directives.get("style-src-attr"), ["'unsafe-inline'"], "CSP must allow only inline style attributes for React Flow");
assert.deepEqual(directives.get("style-src"), ["'self'"], "CSP style elements must remain same-origin only");
for (const required of ["default-src 'self'", "script-src 'self'", "worker-src 'self'", "connect-src 'self'", "object-src 'none'", "base-uri 'none'", "frame-ancestors 'none'"]) assert.ok(policy.includes(required), `CSP is missing ${required}`);
const index = fs.readFileSync(path.join(root, "web/app/index.html"), "utf8");
assert.doesNotMatch(index, /<script\b[^>]*(?:\b(?:src\s*=\s*["']data:|type\s*=\s*["']text\/javascript["']))/iu);