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:
parent
f00bc733d0
commit
4630ba99af
9 changed files with 18 additions and 11 deletions
|
|
@ -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 sandbox with London and New York joined by a transatlantic wave, Frankfurt 640 km from London, a company, and a
|
||||
// 16-antenna dish with landing rights at each POP.
|
||||
|
|
@ -159,7 +160,7 @@ test('spats: data stays home, and not over my airspace', () => {
|
|||
test('saves without pies route identically, and pay nothing for orbit', () => {
|
||||
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.revMo,R.egT,R.load,R.l2,R.l2lat,R.rev])");
|
||||
const a = out();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue