{"record":{"id":"11dd365b63b8b3d3","repo":"github/copilot-sdk","slug":"unsupported-runtime-package-entry-member-name","errorCode":null,"errorMessage":"Unsupported runtime package entry: {member.name}","messagePattern":"Unsupported runtime package entry: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/copilot/_cli_download.py","lineNumber":310,"sourceCode":"    if top_level == \"prebuilds\":\n        if len(relative) < 3 or relative[1] != runtime_platform:\n            return None\n        relative = relative[2:]\n    destination = Path(*relative)\n    if destination.is_absolute() or \"..\" in destination.parts:\n        raise RuntimeError(f\"Unsafe runtime package path: {member_name}\")\n    return destination\n\n\ndef _materialize_runtime_bundle(data: bytes, runtime_platform: str, destination: Path) -> None:\n    \"\"\"Extract the hostless runtime tree, retaining unknown package assets by default.\"\"\"\n    with tarfile.open(fileobj=io.BytesIO(data), mode=\"r:gz\") as archive:\n        for member in archive:\n            relative = _hostless_runtime_path(member.name, runtime_platform)\n            if relative is None or member.isdir():\n                continue\n            if not member.isfile():\n                raise RuntimeError(f\"Unsupported runtime package entry: {member.name}\")\n            extracted = archive.extractfile(member)\n            if extracted is None:\n                raise RuntimeError(f\"Failed to read runtime package entry: {member.name}\")\n            target = destination / relative\n            target.parent.mkdir(parents=True, exist_ok=True)\n            target.write_bytes(extracted.read())\n            if sys.platform != \"win32\":\n                target.chmod(member.mode & 0o777)\n\n\ndef ensure_runtime_wrapper(version: str | None = None, force: bool = False) -> str:\n    \"\"\"Provision the runtime pair and retained assets from the release package.\"\"\"\n    ver = version or CLI_VERSION\n    if not ver:\n        raise RuntimeError(\"No runtime version is pinned.\")\n    runtime_platform = get_runtime_platform()\n    wrapper_name = \"copilot-runtime.exe\" if sys.platform == \"win32\" else \"copilot-runtime\"\n    pair_dir = get_cache_dir(ver) / \"prebuilds\" / runtime_platform","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/github/copilot-sdk/blob/cd8cf15dc3f9e762615790aaed0a771a0f392755/python/copilot/_cli_download.py#L292-L328","documentation":"_materialize_runtime_bundle iterates every tar member and only processes regular files and directories. Any other entry type (symlinks, hardlinks, devices, fifos) is rejected with this error to prevent link-based attacks and unsupported package layouts.","triggerScenarios":"A runtime release tarball containing symlink/hardlink or special-file members is passed to ensure_runtime_wrapper/_materialize_runtime_bundle.","commonSituations":"A release package rebuilt with symlinks (e.g. vendored shared libs linked instead of copied); tampered archives; unofficial repackaged artifacts.","solutions":["Download only official, checksum-verified release packages.","Re-download and re-verify the archive in case of corruption.","Inspect the tarball (tar -tvf) to see which member is not a regular file.","File an issue with the publisher if an official release contains link members."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import tarfile\nwith tarfile.open(\"pkg.tgz\") as t:\n    special = [m.name for m in t.getmembers() if not (m.isfile() or m.isdir())]\n    if special:\n        raise SystemExit(f\"unsupported members: {special}\")","typeGuard":null,"tryCatchPattern":"try:\n    ensure_runtime_wrapper()\nexcept RuntimeError as e:\n    if \"Unsupported runtime package entry\" in str(e):\n        reverify_and_redownload_package()\n    else:\n        raise","preventionTips":["Use only official release artifacts.","Checksum-verify all downloads.","Inspect archives when this error fires to identify non-regular members."],"tags":["security","archive-extraction","unsupported-entry"],"backgroundTag":"unsupported-operation","analyzedSha":"cd8cf15dc3f9e762615790aaed0a771a0f392755","analyzedAt":"2026-09-09T18:32:31.973Z","contentChangedAt":"2026-09-09T18:32:31.973Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}