BishopFox/cloudfox

List on Homebrew for easier installation and regular updates

wilcosec opened this issue ยท 8 comments

As a security professional,
I want to install CloudFox using Homebrew
so that installation and updating is as easy as possible.

Overview

Homebrew is a well-known package manager for MacOS and Linux, which allows single command installations of packages (called Formula) and single command updating.

CloudFox meets all requirements to be listed as a Formula in Homebrew. I feel like listing on Homebrew will lower the barrier of entry (and of keeping up to date) for many security professionals.

Listing CloudFox as a formula in Homebrew should be easy, but I've never done it, so I can't speak from first-hand experience.

Acceptance Criteria

  • Security implications approved.
  • CloudFox is installable on MacOS with brew install cloudfox.

Non Functional Requirements/Wants

  • Ideally, the Homebrew formula for CloudFox is updated with the latest version numbers via CI from this project.

External Documents / Links

Thanks for this issue @wilcosec! This is definitely on my todo list and I appreciate you putting this issue together with some guidance!

CloudFox is now in Brew! Thanks for the push @wilcosec. The final piece i need to figure out is how to configure an action on my end to auto bump the brew Forumula every time i release a new cloudfox version.

Hi @sethsec-bf! I would like to contribute to this issue. I have an idea on what potentially needs to be done. Let me know what your thoughts are on the following process:

  1. Create & maintain a version file in the repo: I tried looking through the repo and the .gitignore for any such file. Let me know if this is something you would like to create? I know the current version is 1.12.2 but I could not find any reference to it in the repo.
  2. Create a GitHub Actions workflow that is conditionally triggered on new releases. Thinking of adding a .github/worklfows/update-homebrew.yml

I did see this line if: startsWith( github.ref, 'refs/tags/v') in your autorelease.yml that runs when you create a new tag for release (which would need to require a subsequent update to Homebrew) so I could also just create 1-3 steps under this to also update Homebrew.

Please LMKWYT and I'd be happy to work on this. ๐Ÿ˜„

Thank you so much for your offer @tmendonca28! That all sounds amazing and it would be appreciated. Funny you should ask about a version file. @bishopfaure has implemented a version file within his Azure related PR #60 here: https://github.com/BishopFox/cloudfox/pull/60/files#diff-f60cb3972288e96bfc533c53faac95c27921093863611596b068494ef850ff2e. So as soon as that lands in main we will have that.

Let me sync with @bishopfaure on how close that is to being ready to merge and I'll update you on. Thanks again!!

Awesome! That's perfect then ๐Ÿ˜ƒ - looking forward to hearing from you on when #60 is merged.

I will get to work pre-emptively since I know where the version file will be located and what it entails.

Hey @tmendonca28 - It might take a bit longer for me and @bishopfaure to sync up on our end. I'm good with either of your approaches, and honestly, would love to lean on your opinions on what you think is best moving forward. As noted above, in pull #60 you can see the plan for a version file. Feel free to just add that new file to your new PR ahead of that PR being merged and go that route if you like. Or you can add it to the action that exists that is triggered whenever i push a new version tag as you suggested.

The only other piece you might need is where I am am currently tracking the version in the code. It's in main.go :) https://github.com/BishopFox/cloudfox/blob/main/main.go#L13.

I have a few bug fixes ready in seth-dev and i've changed the version in main.go to 1.12.3, so when you get this in we can use 1.12.3 release to test your homebrew updates.

thanks again!

Hey @tmendonca28 - Homebrew seems to be getting my release updates and making new brew formulas. Not sure why or how, but i think we can close this issue out now. Thanks again for your offer to help! if you can figure out how it is working, feel free to let me know :)

Homebrew/homebrew-core#158318

Hey @sethsec-bf - Pardon me for the late response, had taken a bit of a digital detox during the festive season. Let me have a look as to how/why it's getting the release updates and will revert asap ๐Ÿ˜ƒ