Clear the open code scanning alerts

- auto-release.yml: the by-hand test run passes github.sha (what it got anyway) instead of an
  output that also reads workflow_run.head_sha, so CI never checks out a ref a workflow_run
  handed over in a job that uses caches (cache poisoning, 7 alerts in ci.yml).
- tests/harness.js: the script splitter also matches end tags like </SCRIPT > (bad HTML
  filtering regexp).
- Tests paste the fixture saves into the page with lit(), which escapes what could end a
  script or a string, instead of plain JSON.stringify (improper code sanitization).
This commit is contained in:
Frederic Jung 2026-11-09 12:36:03 +00:00 • committed by Claude
parent f00bc733d0
commit 4630ba99af
No known key found for this signature in database
9 changed files with 18 additions and 11 deletions

View file

@ -22,7 +22,7 @@ function split(html) {
let s = SPLIT.get(html);
if (s) return s;
const code = [];
const shell = html.replace(/<script>([\s\S]*?)<\/script>/g, (m, src) => {
const shell = html.replace(/<script>([\s\S]*?)<\/script\b[^>]*>/gi, (m, src) => {
code.push(new vm.Script(src, { filename: `page-script-${code.length}.js` }));
return '<script></script>';
});