{"record":{"id":"52d378bb5e688d94","repo":"oven-sh/bun","slug":"inputissigned","errorCode":null,"errorMessage":"InputIsSigned","messagePattern":"InputIsSigned","errorType":"console","errorClass":"bun_exe_format::pe::Error","httpStatus":null,"severity":"warning","filePath":"src/exe_format/pe.rs","lineNumber":31,"sourceCode":"    #[error(\"BadAlignment\")]\n    BadAlignment,\n    #[error(\"Overflow\")]\n    Overflow,\n    #[error(\"InvalidPEFile\")]\n    InvalidPEFile,\n    #[error(\"InvalidDOSSignature\")]\n    InvalidDOSSignature,\n    #[error(\"InvalidPESignature\")]\n    InvalidPESignature,\n    #[error(\"UnsupportedPEFormat\")]\n    UnsupportedPEFormat,\n    #[error(\"InsufficientHeaderSpace\")]\n    InsufficientHeaderSpace,\n    #[error(\"TooManySections\")]\n    TooManySections,\n    #[error(\"SectionExists\")]\n    SectionExists,\n    #[error(\"InputIsSigned\")]\n    InputIsSigned,\n    #[error(\"InvalidSecurityDirectory\")]\n    InvalidSecurityDirectory,\n    #[error(\"SecurityDirInsideImage\")]\n    SecurityDirInsideImage,\n    #[error(\"UnexpectedOverlayPresent\")]\n    UnexpectedOverlayPresent,\n    #[error(\"InsufficientSpace\")]\n    InsufficientSpace,\n}\n\n/// Windows PE Binary manipulation for codesigning standalone executables\npub struct PEFile {\n    pub(crate) data: Vec<u8>,\n    // Store offsets instead of pointers to avoid invalidation after resize\n    pub(crate) pe_header_offset: usize,\n    pub(crate) optional_header_offset: usize,\n    pub(crate) section_headers_offset: usize,","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/exe_format/pe.rs#L13-L49","documentation":"A declared variant meaning 'the input executable carries an Authenticode signature that blocks modification'. In the current code it is never constructed anywhere in the tree (only the enum declaration at src/exe_format/pe.rs:31-32 exists) — the real pipeline instead strips signatures via strip_authenticode and reports InvalidSecurityDirectory/SecurityDirInsideImage/UnexpectedOverlayPresent when stripping fails. Treat any occurrence as an anomaly: a signed input could not be handled.","triggerScenarios":"No active code path throws it today. Historically it would correspond to refusing to modify a signed PE. The modern path (add_bun_section, src/exe_format/pe.rs:467-469) always calls strip_authenticode first and only errors when the signature data itself is malformed.","commonSituations":"Grepping the codebase or writing a match over bun_exe_format::pe::Error and needing exhaustive arms; seeing the string in old logs/builds from earlier Bun versions that did throw it on signed inputs.","solutions":["If you hit this in a match, handle it together with the security-directory errors (InvalidSecurityDirectory, SecurityDirInsideImage).","If seen at runtime from an old build, upgrade Bun — current versions strip signatures automatically instead of failing.","For signed inputs, prefer removing the signature yourself (osslsigncode remove / signtool remove) before compiling, then re-sign the output."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Check whether the base is Authenticode-signed before compiling\npowershell Get-AuthenticodeSignature base.exe   # Status should be NotSigned\n# or: osslsigncode verify base.exe","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use unsigned bases for --compile and sign the final artifact instead","Remember this variant is currently never thrown — current Bun strips signatures automatically","Keep match arms over the PE error enum grouped: signature-related variants share handling"],"tags":["windows","pe","authenticode","codesigning","dead-code"],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}