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
|
|
@ -654,7 +654,7 @@ test('O7: a fresh Tier 1 cannot afford a full Shortcrust in its first year', ()
|
|||
// most the Ex-Im Pie Bank lends a rocket company on top.
|
||||
const g = load();
|
||||
const save = fs.readFileSync(path.join(__dirname, 'fixtures', 'big-network.json'), 'utf8');
|
||||
g.ev(`S=migrate(JSON.parse(${JSON.stringify(save)}));compute()`);
|
||||
g.ev(`S=migrate(JSON.parse(${lit(save)}));compute()`);
|
||||
const rev = g.ev('R.revMo'), loan = g.ev('Math.max(...Object.values(BANKS).map(b=>b.amt[1]))') * rev + g.ev('pieEximCap()'), cash = Math.max(0, g.ev('S.cash'));
|
||||
const year = 12 * rev + loan + Math.min(cash, 12 * rev);
|
||||
const full = g.ev("pieFullCost('short')");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue