gitbutlerapp/gitbutler · critical
Signature is empty - refusing to verify without a valid…
Error message
Signature is empty - refusing to verify without a valid signature
What it means
`verify_signature` refuses to run minisign verification when the base64 signature string is empty or whitespace-only. This is a deliberate security guard: verifying with an empty signature could never succeed, and proceeding would hide a tampered/missing signature file from the caller.
Solutions
- Re-run the install — an empty signature usually means a failed/partial download of the signature file.
- Verify the signature file exists and is non-empty at the source URL for your version/platform.
- Check release infrastructure status; if the signature is genuinely missing upstream, wait for it to be republished and do not bypass verification.
- If you drive the API directly, validate the signature string is non-empty before calling verify_signature.
Example fix
// before
verify_signature(&data, &signature /* may be "" */, &tmp)?;
// after
if signature.trim().is_empty() {
anyhow::bail!("signature file missing or empty; refusing to install");
}
verify_signature(&data, &signature, &tmp)?; Defensive patterns
Strategy: validation
Validate before calling
fn signature_looks_valid(sig: &str) -> bool {
let s = sig.trim();
!s.is_empty()
&& s.len() >= 100 // minisign signatures are ~300+ chars base64
&& s.bytes().all(|b| b.is_ascii_alphanumeric() || b == b'+' || b == b'/' || b == b'=' || b == b'\n' || b == b'\r')
} Try / catch
if signature.trim().is_empty() {
anyhow::bail!("signature missing — aborting install (possible tampering or failed signature download)");
}
verify_signature(&artifact, &signature, &tmp)
.context("signature verification failed; refusing to install")?; Prevention
- Never bypass or stub out signature verification in automated installs.
- After fetching the signature file, assert it is non-empty and base64-shaped before verifying.
- If the signature download failed, abort the whole install rather than continuing with an empty value.
- Alert on empty signatures — they usually indicate broken release infrastructure or a tampered download path.
When it happens
Trigger: The signature file downloaded alongside the artifact was empty (server returned an error page or empty body), a placeholder/nil signature was passed programmatically, or the signature URL 404'd into an empty string upstream.
Common situations: Release infrastructure uploaded the binary without its .minisign signature; a mirror serves an empty signature; custom install flows that fetch the signature themselves and pass "" on failure.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- Failed to initialize signature verifier
- Signature verification failed - the download may have been…
- BUG: Sensitive data cannot be serialized - it needs to be…
- Download failed, the download artifact could not be found…
- Download failed with HTTP status
AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18).
Data as JSON: /api/errors/90c35f8f5a7173c3.
Report an issue: GitHub.
Appendix: source
Thrown at crates/but-installer/src/install.rs:40
.arg("--version")
.stdout(Stdio::null())
.stderr(Stdio::null())
.status()
.map(|s| s.success())
.unwrap_or(false)
}
/// Verify the signature for a CLI installable
pub(crate) fn verify_signature(
installable: &Path,
signature_b64: &str,
temp_dir: &Path,
) -> Result<()> {
crate::ui::info("Verifying download signature...");
// Validate signature is not empty - this is a security requirement
if signature_b64.trim().is_empty() {
bail!("Signature is empty - refusing to verify without a valid signature");
}
// GitButler's minisign public key
let pubkey_str = "RWTrOEI+im1XYA9RBwyxnzFN/evFzJhU1lbQ70LVayWH3WRo7xQnRLD2";
// Parse the public key
let public_key = minisign_verify::PublicKey::from_base64(pubkey_str)
.context("Failed to parse public key")?;
// Decode signature from base64 and write to file
// The signature format from the API is base64-encoded minisign signature file content
use base64::{Engine, engine::general_purpose::STANDARD};
let signature_bytes = STANDARD
.decode(signature_b64)
.context("Failed to decode signature from base64")?;
// Write signature to temp file for minisign to parse
let signature_file = temp_dir.join("signature.minisig");View on GitHub (pinned to 58e5313667)