(value)
| 1025 | }; |
| 1026 | |
| 1027 | const isLikelyPathOrFileUri = (value) => { |
| 1028 | const s = String(value || '').trim(); |
| 1029 | if (!s || s.length > 1024 || /[\r\n<>]/.test(s)) return false; |
| 1030 | if (/^file:\/\/\/?(?:[A-Za-z]:[\\/]|\/|~[\\/])/.test(s)) return true; |
| 1031 | if (/^(?:[A-Za-z]:[\\/]|\/|~[\\/]|\.{1,2}[\\/])\S+/.test(s)) return true; |
| 1032 | return /^[A-Za-z0-9._-]+(?:[\\/][A-Za-z0-9._-]+)*\.[A-Za-z0-9]{1,12}$/.test(s); |
| 1033 | }; |
| 1034 | |
| 1035 | for (const step of steps) { |
| 1036 | // Robustness (audit #1): skip a single malformed step instead of |
no outgoing calls
no test coverage detected