{"record":{"id":"6c3f5a2d730819fa","repo":"affaan-m/ECC","slug":"remote-instinct-imports-require-https-urls","errorCode":null,"errorMessage":"remote instinct imports require https URLs","messagePattern":"remote instinct imports require https URLs","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"skills/continuous-learning-v2/scripts/instinct-cli.py","lineNumber":193,"sourceCode":"\ndef _validate_instinct_id(instinct_id: str) -> bool:\n    \"\"\"Validate instinct IDs before using them in filenames.\"\"\"\n    if not instinct_id or len(instinct_id) > 128:\n        return False\n    if \"/\" in instinct_id or \"\\\\\" in instinct_id:\n        return False\n    if \"..\" in instinct_id:\n        return False\n    if instinct_id.startswith(\".\"):\n        return False\n    return bool(re.match(r\"^[A-Za-z0-9][A-Za-z0-9._-]*$\", instinct_id))\n\n\ndef _validate_import_url(source: str) -> str:\n    \"\"\"Validate remote instinct imports before opening a network connection.\"\"\"\n    parsed = urllib.parse.urlparse(source)\n    if parsed.scheme != \"https\":\n        raise ValueError(\"remote instinct imports require https URLs\")\n    if not parsed.hostname:\n        raise ValueError(\"remote import URL is missing a hostname\")\n\n    try:\n        addr_infos = socket.getaddrinfo(parsed.hostname, parsed.port or 443, type=socket.SOCK_STREAM)\n    except socket.gaierror as exc:\n        raise ValueError(f\"remote import host could not be resolved: {parsed.hostname}\") from exc\n\n    for family, _, _, _, sockaddr in addr_infos:\n        host = sockaddr[0]\n        try:\n            ip = ipaddress.ip_address(host)\n        except ValueError:\n            continue\n        if (\n            ip.is_private\n            or ip.is_loopback\n            or ip.is_link_local","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/skills/continuous-learning-v2/scripts/instinct-cli.py#L175-L211","documentation":"Error \"remote instinct imports require https URLs\" thrown in affaan-m/ECC.","triggerScenarios":"Thrown at skills/continuous-learning-v2/scripts/instinct-cli.py:193 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an https:// URL for remote instinct imports; plain http and other schemes are refused to prevent downgrade/credential leaks.","Download the file yourself over a trusted channel and import it locally if no https endpoint exists."],"exampleFix":"instinct import https://example.com/instinct.md  # not http://","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}