Skip to content

Commit

Permalink
cask/audit.rb: update signing checks for app, binary, and pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
krehel committed Apr 4, 2024
1 parent fcc190b commit 7cd11b7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Library/Homebrew/cask/audit.rb
Expand Up @@ -488,7 +488,17 @@ def audit_signing

next unless path.exist?

result = system_command("spctl", args: ["--assess", "--type", "install", path], print_stderr: false)
result = case artifact

Check warning on line 491 in Library/Homebrew/cask/audit.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/cask/audit.rb#L491

Added line #L491 was not covered by tests
when Artifact::Pkg
system_command("spctl", args: ["--assess", "--type", "install", path], print_stderr: false)
when Artifact::App
system_command("spctl", args: ["--assess", "--type", "execute", path], print_stderr: false)
when Artifact::Binary
system_command("codesign", args: ["-vvvv", "-R=notarized", "--check-notarization", path],
print_stderr: false)
else
add_error "Unknown artifact type: #{artifact.class}", location: cask.url.location
end

next if result.success?

Expand Down

0 comments on commit 7cd11b7

Please sign in to comment.