From 097b4d227f19d0bf623da880fb0dc4f05391ed9d Mon Sep 17 00:00:00 2001 From: Utkarsh patrikar <137105846+utkarsh232005@users.noreply.github.com> Date: Sat, 13 Jun 2026 19:08:09 +0530 Subject: [PATCH 1/2] Apply suggested fix to src/kubernetes/pods.ts from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- src/kubernetes/pods.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kubernetes/pods.ts b/src/kubernetes/pods.ts index dcbb1da..3a76eef 100644 --- a/src/kubernetes/pods.ts +++ b/src/kubernetes/pods.ts @@ -107,6 +107,7 @@ export function parseK8sMemoryQuantity(q: string | number): number { const match = q.trim().match(/^([0-9.]+)([a-zA-Z]*)$/); if (!match) return 0; const val = parseFloat(match[1]); + if (Number.isNaN(val)) return 0; const suffix = match[2]; if (suffix === '') { From 7ac641e1febae441e2beb820505509f4e2aefcdc Mon Sep 17 00:00:00 2001 From: Utkarsh patrikar <137105846+utkarsh232005@users.noreply.github.com> Date: Sat, 13 Jun 2026 19:08:09 +0530 Subject: [PATCH 2/2] Apply suggested fix to src/kubernetes/pods.ts from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- src/kubernetes/pods.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kubernetes/pods.ts b/src/kubernetes/pods.ts index 3a76eef..820f3fa 100644 --- a/src/kubernetes/pods.ts +++ b/src/kubernetes/pods.ts @@ -81,6 +81,7 @@ export function parseK8sCpuQuantity(q: string | number): number { const match = q.trim().match(/^([0-9.]+)([a-zA-Z]*)$/); if (!match) return 0; const val = parseFloat(match[1]); + if (Number.isNaN(val)) return 0; const suffix = match[2]; switch (suffix) { case 'n':