revert: drop check-ae-ease.mjs hardening (SonarCloud taint false positive)

The argv->spawnSync/fs flow in this local dev example is flagged as S8707/S8705
regardless of validation (SonarCloud can't recognize the CLI trust boundary),
and the attempted fix fails the new_security_rating gate. Reverting to keep the
PR green; the finding will be marked Won't Fix (dev tool, developer-supplied arg).
This commit is contained in:
Dylan M. Taylor
2026-10-21 17:31:31 -04:00
parent 8f7d5648f1
commit 051c380bb8
+2 -4
View File
@@ -5,10 +5,8 @@ import { fileURLToPath } from 'node:url';
import { spawnSync } from 'node:child_process';
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const cliArg = process.argv[2];
if (!cliArg) throw new Error('Usage: node examples/check-ae-ease.mjs <aesync/server/dist/cli.js>');
const cli = path.resolve(cliArg);
if (!fs.existsSync(cli) || !fs.statSync(cli).isFile() || !cli.endsWith('.js')) throw new Error('Expected an existing .js CLI file: ' + cliArg);
const cli = process.argv[2];
if (!cli || !fs.existsSync(cli)) throw new Error('Usage: node examples/check-ae-ease.mjs <aesync/server/dist/cli.js>');
const tolerance = 1e-7;
function run(command, args) {
const result = spawnSync(command, args, { cwd: root, windowsHide: true, encoding: 'utf8', maxBuffer: 8 * 1024 * 1024 });