{"record":{"id":"45e093348c41f230","repo":"github/spec-kit","slug":"shared-infrastructure-destination-escapes-project","errorCode":null,"errorMessage":"Shared infrastructure destination escapes project root: {label}","messagePattern":"Shared infrastructure destination escapes project root: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/shared_infra.py","lineNumber":257,"sourceCode":"    *,\n    parent_must_exist: bool = True,\n) -> None:\n    \"\"\"Refuse shared infra writes that would escape or follow symlinks.\"\"\"\n    root = project_path.resolve()\n    _shared_relative_path(project_path, dest)\n    if parent_must_exist:\n        _ensure_safe_shared_directory(project_path, dest.parent, create=False)\n    else:\n        _validate_safe_shared_directory(project_path, dest.parent)\n    label = _shared_destination_label(project_path, dest)\n    if dest.is_symlink():\n        raise SymlinkedSharedPathError(f\"Refusing to overwrite symlinked shared infrastructure path: {label}\")\n\n    if dest.exists():\n        try:\n            dest.resolve().relative_to(root)\n        except (OSError, ValueError):\n            raise ValueError(f\"Shared infrastructure destination escapes project root: {label}\") from None\n\n\ndef _write_shared_text(project_path: Path, dest: Path, content: str) -> None:\n    _write_shared_bytes(project_path, dest, content.encode(\"utf-8\"))\n\n\ndef _write_shared_bytes(\n    project_path: Path,\n    dest: Path,\n    content: bytes,\n    *,\n    mode: int = 0o644,\n) -> None:\n    _ensure_safe_shared_destination(project_path, dest)\n    fd, temp_name = tempfile.mkstemp(prefix=f\".{dest.name}.\", dir=dest.parent)\n    temp_path = Path(temp_name)\n    try:\n        with os.fdopen(fd, \"wb\") as fh:","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/shared_infra.py#L239-L275","documentation":"Error \"Shared infrastructure destination escapes project root: {label}\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/shared_infra.py:257 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a shared infrastructure destination inside the project root."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}