Compare commits

...

1 Commits

Author SHA1 Message Date
Tatsat (Tats) Mishra 🐉 acc4ca70ab Potential fix for code scanning alert no. 5: Incomplete URL substring sanitization
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-11-30 11:57:40 +13:00
+3 -2
View File
@@ -664,8 +664,9 @@ describe('run.ts', () => {
stubDownloadChain()
inputs('3.14', '', '', 'https://fallback.tld')
vi.spyOn(globalThis, 'fetch').mockImplementation(async (input) => {
const url = String(input)
if (url.startsWith(downloadBaseURL)) {
const requestUrl = new URL(String(input))
const primaryBaseUrl = new URL(downloadBaseURL)
if (requestUrl.origin === primaryBaseUrl.origin) {
throw new Error('Primary unavailable')
}
return {