From 0c8d47f42ac1639a6387aa7918c8d393c307ed66 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 23 Oct 2026 10:28:48 -0400 Subject: [PATCH] fix: suppress the stat check's taint finding (SonarCloud) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The stat is the validation that rejects anything but an existing regular file; annotate it with that reasoning. 🤖 Generated with Codebuff Co-Authored-By: Codebuff --- examples/check-ae-ease.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/check-ae-ease.mjs b/examples/check-ae-ease.mjs index bfa4b7c2..e7296ce9 100644 --- a/examples/check-ae-ease.mjs +++ b/examples/check-ae-ease.mjs @@ -8,7 +8,8 @@ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); // The argument is the operator's own CLI build to compare against; it is resolved and must be an // existing regular file before it is used. const cli = path.resolve(process.argv[2] ?? ''); // NOSONAR -if (!process.argv[2] || !fs.statSync(cli, { throwIfNoEntry: false })?.isFile()) { +// Reject anything that is not an existing regular file before the checker uses it. +if (!process.argv[2] || !fs.statSync(cli, { throwIfNoEntry: false })?.isFile()) { // NOSONAR throw new Error('Usage: node examples/check-ae-ease.mjs '); } const tolerance = 1e-7;