MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / validateUrl

Function validateUrl

pkg/npm/install.js:35–39  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

33
34// Security: only follow HTTPS URLs (defense-in-depth).
35function validateUrl(url) {
36 if (!url.startsWith('https://')) {
37 throw new Error(`Refusing non-HTTPS URL: ${url}`);
38 }
39}
40
41function download(url, dest) {
42 validateUrl(url);

Callers 2

downloadFunction · 0.85
followFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected