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

Add code-signing for Homebrew proposal #20

Merged
merged 27 commits into from
Jul 21, 2023
Merged

Add code-signing for Homebrew proposal #20

merged 27 commits into from
Jul 21, 2023

Conversation

di
Copy link
Member

@di di commented Jul 17, 2023

This adds a proposal by myself and @woodruffw to add code-signing to the Homebrew ecosystem.

Edit: The goal here is to have a proposal from 'within' this WG that could be submitted to any potential funder. We plan to submit this to Alpha/Omega for funding first.

@jalseth
Copy link

jalseth commented Jul 17, 2023

This is great! One thing I would like to see added is a list of goals and non-goals focusing on what threats are addressed. For example: This prevents attackers who can forge TLS certs for GitHub from tampering with artifacts, but does not prevent an upstream repo from being compromised and Homebrew CI from automatically building/signing/distributing a malicious package. The latter is partially addressed in this proposal, but would not be 100% addressed until a requirement that all Homebrew upstream sources are signed is added to the CI builder's logic. A future proposal may add a config option to enable a TAP owner to mark their TAP as 100% signed so all packages within the TAP must have signatures before Homebrew CI should build/distribute.

proposals/code-signing-for-homebrew.md Outdated Show resolved Hide resolved
proposals/code-signing-for-homebrew.md Outdated Show resolved Hide resolved
proposals/code-signing-for-homebrew.md Outdated Show resolved Hide resolved
proposals/code-signing-for-homebrew.md Outdated Show resolved Hide resolved
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

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

This is great! The PR is missing some context, but from Slack I infer that this is a proposal for Alpha-Omega funding that is sponsored by the WG Securing Software Repos. Is that correct?

proposals/code-signing-for-homebrew.md Outdated Show resolved Hide resolved
proposals/code-signing-for-homebrew.md Outdated Show resolved Hide resolved
@di
Copy link
Member Author

di commented Jul 18, 2023

The PR is missing some context, but from Slack I infer that this is a proposal for Alpha-Omega funding that is sponsored by the WG Securing Software Repos. Is that correct?

This is just a general proposal from this WG that could be submitted to any potential funder. Although we do plan to submit this to A/O for funding first, there isn't anything A/O-specific here.

Copy link
Member

@steiza steiza left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together! I support this proposal.

proposals/code-signing-for-homebrew.md Outdated Show resolved Hide resolved
Code signing for Homebrew: address feedback
Signed-off-by: Dustin Ingram <di@users.noreply.github.com>
Signed-off-by: Dustin Ingram <di@users.noreply.github.com>
Signed-off-by: Dustin Ingram <di@users.noreply.github.com>
Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

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

The PR is missing some context, but from Slack I infer that this is a proposal for Alpha-Omega funding that is sponsored by the WG Securing Software Repos. Is that correct?

This is just a general proposal from this WG that could be submitted to any potential funder. Although we do plan to submit this to A/O for funding first, there isn't anything A/O-specific here.

Got it. The part I was missing from the PR description was that this is a "proposal from this WG that could be submitted to any potential funder".

@woodruffw
Copy link
Contributor

Some feedback from the Homebrew maintainers on their Slack:

  1. There's some interest in signing for pre-existing bottles without rebuilding, so that signatures could be required on all bottles in homebrew-core faster/without the time + challenges of a full rebuild.
    • My thinking here is that this is possible and compatible with the larger proposal: we could have two signing workflows with distinct identities (e.g. sign-fresh-bottle.yml and sign-existing-bottle.yml), and the "flag" day would then correspond to the day when all listed bottles are signed with sign-fresh-bottle.yml rather than a mixture of the two.
  2. We should probably document and clarify that the signatures here do not interact with Apple's notarization or codesigning schemes. This means that the existing work that Homebrew does (local signing/notarization) will not be impacted/broken by these changes, nor would these changes block or prevent any future attempts to sign for individual binaries within each bottle using Apple's own codesigning scheme. Instead, it's purely complementary (ensuring authenticity at the bottle and thus object store/CDN layer.)

cc @MikeMcQuaid and @SMillerDev, since I've summarized your feedback above; please correct me if I've missed or mistaken anything 🙂

@di
Copy link
Member Author

di commented Jul 18, 2023

Got it. The part I was missing from the PR description was that this is a "proposal from this WG that could be submitted to any potential funder".

I've updated the description!

woodruffw and others added 6 commits July 18, 2023 13:30
Signed-off-by: William Woodruff <william@trailofbits.com>
Homebrew codesigning: review and feedback
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
Homebrew: compatibility considerations
@di
Copy link
Member Author

di commented Jul 20, 2023

Hi folks, thanks for all the reviews to date. Just an FYI that I'd like to merge this by EOD today, so we can submit it to A/O by the end of the week.

@haydentherapper
Copy link

@di @woodruffw What do you think about adding a threat model as mentioned in #20 (comment)?

@woodruffw
Copy link
Contributor

What do you think about adding a threat model as mentioned in #20 (comment)?

I'm happy to do that; I'll open a PR in a bit.

Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
woodruffw and others added 5 commits July 20, 2023 16:28
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
Don't commit to a specific attestation predicate
Copy link
Contributor

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

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

This is good on my end; thanks to all who reviewed!

Signed-off-by: William Woodruff <william@trailofbits.com>
Co-authored-by: Trishank Karthik Kuppusamy <trishank.kuppusamy@datadoghq.com>
Signed-off-by: Dustin Ingram <di@users.noreply.github.com>
@di
Copy link
Member Author

di commented Jul 21, 2023

Thanks everyone for your feedback here!

@di di merged commit 0bac747 into main Jul 21, 2023
1 check passed
@di di deleted the homebrew-proposal branch July 21, 2023 17:16
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.