{"record":{"id":"b3772d2dd8114418","repo":"BigPizzaV3/CodexPlusPlus","slug":"dream-skin-path-must-not-be-a-symbolic-link","errorCode":null,"errorMessage":"Dream Skin path must not be a symbolic link","messagePattern":"Dream Skin path must not be a symbolic link","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/dream_skin_library.rs","lineNumber":663,"sourceCode":"fn remove_known_theme_directory(directory: &Path) -> anyhow::Result<()> {\n    if !directory.exists() {\n        return Ok(());\n    }\n    ensure_known_theme_directory(directory)?;\n    for entry in std::fs::read_dir(directory)? {\n        let path = entry?.path();\n        std::fs::remove_file(&path)\n            .with_context(|| format!(\"failed to remove {}\", path.display()))?;\n    }\n    std::fs::remove_dir(directory)\n        .with_context(|| format!(\"failed to remove {}\", directory.display()))?;\n    Ok(())\n}\n\nfn reject_symlink(path: &Path) -> anyhow::Result<()> {\n    let metadata = std::fs::symlink_metadata(path)?;\n    if metadata.file_type().is_symlink() {\n        bail!(\"Dream Skin path must not be a symbolic link\");\n    }\n    Ok(())\n}\n\nfn summary_from_draft(\n    draft: &DreamSkinThemeDraft,\n    active: bool,\n    modified: bool,\n) -> DreamSkinThemeSummary {\n    DreamSkinThemeSummary {\n        key: format!(\"stored:{}\", draft.config.id),\n        id: draft.config.id.clone(),\n        name: draft.config.name.clone(),\n        preview_path: draft.image_path.clone(),\n        kind: DreamSkinThemeKind::Stored,\n        builtin: false,\n        active,\n        modified,","sourceCodeStart":645,"sourceCodeEnd":681,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/dream_skin_library.rs#L645-L681","documentation":"Security guard in reject_symlink: symlink_metadata on a Dream Skin path shows a symlink, which the library refuses to follow to prevent path-traversal attacks (a symlinked theme path could point outside the state directory). Fires when saving, validating, or replacing a theme through a symbolic link.","triggerScenarios":"Thrown at crates/codex-plus-core/src/dream_skin_library.rs:663 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the symlink and use a real directory/file at that path","Move the actual theme data to the expected location instead of linking it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}