From 08642f137fc08009b4124a1685b933296d483674 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 27 Aug 2022 03:51:44 +0200 Subject: [PATCH] Ignore failed signature check if no signature is present. --- Library/Homebrew/cask/audit.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cask/audit.rb b/Library/Homebrew/cask/audit.rb index 677af6e38c..b9465c276f 100644 --- a/Library/Homebrew/cask/audit.rb +++ b/Library/Homebrew/cask/audit.rb @@ -581,7 +581,13 @@ module Cask next unless path.exist? result = system_command("codesign", args: ["--verify", path], print_stderr: false) - add_warning result.merged_output unless result.success? + + next if result.success? + + # Only fail if signature is wrong, not when no signature is present at all. + next result.stderr.include?("not signed at all") + + add_warning "Signature verification failed: #{result.merged_output}" end end end