Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cask/audit: update signing checks for app, binary, and pkg #17031

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

krehel
Copy link
Member

@krehel krehel commented Apr 4, 2024

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

POC changes to address some issues in auditing Casks, where we are failing some valid Casks.

This doc used as the source material for updating the checks. Based on it, the checks should be different where it is an app, a pkg, or a binary.

This is still not complete, as this will still fail some valid Casks (such as GitHub Desktop), and we need to implement (IMHO) some checking directly DMG's to check signature. But hopeful this kickstarts a conversation.

@krehel krehel changed the title cask/audit.rb: update signing checks for app, binary, and pkg cask/audit: update signing checks for app, binary, and pkg Apr 4, 2024
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work so far, thanks @krehel!

This is still not complete, as this will still fail some valid Casks (such as GitHub Desktop)

What's the failure? A (unnotarized) binary? If so: I think we should just make that check strict only.

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],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think checking for notarisation should be a separate (strict) check. My understanding is it's not required for ARM/Gatekeeper/Quarantine.

The message below can also probably remove "notarize" from it, too.

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Apr 27, 2024
@krehel krehel removed the stale No recent activity label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants