From 4598745956ec846a74d53549418dbe012789b7da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emrik=20=C3=96stling?= Date: Sun, 14 Dec 2025 20:32:56 +0100 Subject: [PATCH] Potential fix for code scanning alert no. 6: Unnecessary use of `cat` process (#473) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/helpers/printVersions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/printVersions.ts b/src/helpers/printVersions.ts index bd94729..b6e7225 100644 --- a/src/helpers/printVersions.ts +++ b/src/helpers/printVersions.ts @@ -1,10 +1,11 @@ import { exec } from "node:child_process"; +import { readFile } from "node:fs"; import { version } from "../../package.json"; console.log(`ConvertX v${version}`); if (process.env.NODE_ENV === "production") { - exec("cat /etc/os-release", (error, stdout) => { + readFile("/etc/os-release", "utf8", (error, stdout) => { if (error) { console.error("Not running on docker, this is not supported."); }