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');
// A backbone London – New York – Auckland with transit in London and New York, full dishes with landing rights there, a
// full lasered Shortcrust, and Pitcairn (Adamstown): a POP of its own with broadband, no cable, and a dish.
@ -230,7 +231,7 @@ test('the traceroute to and from a cut-off POP shows the orbit hops', () => {
test('saves without pies, and pie saves whose POPs are all connected, route as before', () => {
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('S.pie'), null);
const out = () => ev("JSON.stringify([R.served,R.demand,R.egT,R.load,R.l2,R.l2lat,R.citySrv])");
const a = out();