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

@ -5,6 +5,7 @@ const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const { load } = require('./harness');
const { lit } = require('../scripts/lib/js-literal');
// London, New York and Frankfurt on one backbone, a company, 16-antenna dishes with landing rights at each.
const world = (ev, opt = {}) => {
@ -195,7 +196,7 @@ test('the traceroute shows a circuit through orbit hop by hop', () => {
test('saves without pies: no traffic data, the same routing, and an untouched map', () => {
const { ev, errors } = load();
const save = fs.readFileSync(path.join(__dirname, 'fixtures', 'big-network.json'), 'utf8');
ev(`S=migrate(JSON.parse(${JSON.stringify(save)}));compute()`);
ev(`S=migrate(JSON.parse(${lit(save)}));compute()`);
assert.equal(ev('R.pie===undefined'), true);
assert.equal(ev("trSkyList().length"), 0);
assert.equal(ev("pieFiberMs({k:'c',id:'x'})"), Infinity);