cask/audit: refine codesign audits
This commit is contained in:
parent
50fa89e96b
commit
68be276a11
@ -510,12 +510,17 @@ module Cask
|
|||||||
when Artifact::Pkg
|
when Artifact::Pkg
|
||||||
system_command("spctl", args: ["--assess", "--type", "install", path], print_stderr: false)
|
system_command("spctl", args: ["--assess", "--type", "install", path], print_stderr: false)
|
||||||
when Artifact::App
|
when Artifact::App
|
||||||
system_command("spctl", args: ["--assess", "--type", "execute", path], print_stderr: false)
|
if which("syspolicy_check")
|
||||||
|
system_command("syspolicy_check", args: ["distribution", path], print_stderr: false)
|
||||||
|
else
|
||||||
|
system_command("spctl", args: ["--assess", "--type", "execute", path], print_stderr: false)
|
||||||
|
end
|
||||||
when Artifact::Binary
|
when Artifact::Binary
|
||||||
# Shell scripts cannot be signed, so we skip them
|
# Shell scripts cannot be signed, so we skip them
|
||||||
next if path.text_executable?
|
next if path.text_executable?
|
||||||
|
|
||||||
system_command("codesign", args: ["--verify", path], print_stderr: false)
|
system_command("codesign", args: ["--verify", "-R=notarized", "--check-notarization", path],
|
||||||
|
print_stderr: false)
|
||||||
else
|
else
|
||||||
add_error "Unknown artifact type: #{artifact.class}", location: url.location
|
add_error "Unknown artifact type: #{artifact.class}", location: url.location
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user