GPT-5 finding
numericToString returns non-numeric strings unchanged, contradicting its contract and risking invalid numeric output
mediumbughigh
- src/commands/list/pods.ts
- src/commands/list/pods.ts
The function promises to render missing or non-numeric values as "0" to keep output consistent and BigInt-parseable, but for string inputs it only trims and returns them verbatim. Non-numeric strings like "NaN", "abc", or "12.3" would leak through, violating the stated contract and potentially breaking downstream clients expecting integer-like strings.
Recommendation
Change numericToString to validate string inputs and return "0" for any non-integer string. For example: const s = String(v).trim(); if (!/^\d+$/.test(s)) return '0'; return s; Optionally, if decimals are expected, decide to truncate or round and document it.