security: address remaining code scanning alerts (#253)

This commit is contained in:
Vasanth T
2026-04-03 20:16:53 +05:30
committed by GitHub
parent c1e5e363cd
commit 931ee96f5a
10 changed files with 87 additions and 36 deletions

View File

@@ -50,7 +50,6 @@ type ExecFileWithCwdOptions = {
maxBuffer?: number
cwd?: string
env?: NodeJS.ProcessEnv
shell?: boolean | string | undefined
stdin?: 'ignore' | 'inherit' | 'pipe'
input?: string
}
@@ -96,7 +95,6 @@ export function execFileNoThrowWithCwd(
cwd: finalCwd,
env: finalEnv,
maxBuffer,
shell,
stdin: finalStdin,
input: finalInput,
}: ExecFileWithCwdOptions = {
@@ -113,7 +111,7 @@ export function execFileNoThrowWithCwd(
timeout: finalTimeout,
cwd: finalCwd,
env: finalEnv,
shell,
shell: false,
stdin: finalStdin,
input: finalInput,
reject: false, // Don't throw on non-zero exit codes

View File

@@ -159,7 +159,7 @@ export function logError(error: unknown): void {
const err = toError(error)
if (feature('HARD_FAIL') && isHardFailMode()) {
// biome-ignore lint/suspicious/noConsole:: intentional crash output
console.error('[HARD FAIL] logError called:', err.name || 'Error')
console.error('[HARD FAIL] logError called')
// eslint-disable-next-line custom-rules/no-process-exit
process.exit(1)
}