{"record":{"id":"3969102b4aa3eff0","repo":"jdx/mise","slug":"the-packslip-names-an-executable-which-is-no","errorCode":null,"errorMessage":"the packslip names an executable {:?}, which is not a plain file name","messagePattern":"the packslip names an executable (.+?), which is not a plain file name","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/packslip.rs","lineNumber":1062,"sourceCode":"                \"packslip:{project}: {} of {before} version(s) carry a stamp\",\n                versions.len()\n            );\n        }\n        Ok(versions)\n    }\n\n    /// Put every executable the packslip names into the install's bin dir\n    /// under the name it should have on PATH.\n    fn link_bins(tv: &ToolVersion, artifact: &Artifact) -> Result<()> {\n        if artifact.bin.is_empty() {\n            return Ok(());\n        }\n        let install_path = tv.install_path();\n        let bins_dir = install_path.join(MISE_BINS_DIR);\n        file::create_dir_all(&bins_dir)?;\n        for bin in &artifact.bin {\n            if !file::is_plain_file_name(&bin.name) {\n                bail!(\n                    \"the packslip names an executable {:?}, which is not a plain file name\",\n                    bin.name\n                );\n            }\n            let Some(src) = locate_in_install(&install_path, &bin.path) else {\n                bail!(\n                    \"the packslip lists executable {} in {}, but the archive holds no such file\",\n                    bin.path,\n                    artifact.name\n                );\n            };\n            file::make_executable(&src)?;\n            let dst = bin_link_path(&bins_dir, &bin.name);\n            if dst.exists() || dst.is_symlink() {\n                file::remove_all(&dst)?;\n            }\n            file::make_symlink_or_copy(&src, &dst)?;\n        }","sourceCodeStart":1044,"sourceCodeEnd":1080,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/packslip.rs#L1044-L1080","documentation":"When linking executables declared in a packslip artifact into the bins directory, mise validates each bin.name is a plain file name (no path separators or special components). A bin name that isn't a plain file name is rejected rather than linked.","triggerScenarios":"link_bins iterates artifact.bin and file::is_plain_file_name(&bin.name) fails — the manifest's bin name contains '/', '..' or other path-like components.","commonSituations":"A vendor manifest mistakenly puts a relative path in bin.name instead of bin.path; a malicious manifest attempting path traversal via the executable name.","solutions":["Fix the packslip manifest: move the directory portion of the value into bin.path and keep bin.name as a bare file name","Ask the vendor to correct the manifest and republish","Use a different version of the tool whose manifest is well-formed"],"exampleFix":"// before (manifest)\n[[bin]]\nname = 'bin/rg'\npath = 'rg'\n// after\n[[bin]]\nname = 'rg'\npath = 'bin/rg'","handlingStrategy":"validation","validationCode":"// validate bin entries in the manifest before publishing\nfor bin in &manifest.bin {\n    assert!(!bin.name.contains('/') && bin.name != \"..\" && !bin.name.is_empty(), \"bin.name must be a plain file name: {}\", bin.name);\n}","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Keep directory info exclusively in bin.path","CI-lint packslip manifests so path-like bin names fail before release","Never accept manifest contributions that set bin.name with separators"],"tags":["packslip","manifest","bin-name","path-safety"],"backgroundTag":"path-traversal-blocked","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}