bigbrowser: build provenance for bigbrowser’s Firefox web extension
Installing a Firefox extension requires a signed build, and the process is a bit cumbersome:
- It requires a Mozilla Addons account
- Each built version needs to be uploaded/validated/signed
I’ve tried to come up with a process to build and sign the extension in a way that can be “trusted”.
A common concept to help with that is “build provenance”, which is basically providing trustable metadata about the process.
The SLSA (Supply-chain Levels for Software Artifacts) security framework is trying to come up with some standard about build provenance, but I looked at it mainly for inspiration.
I am using Sourcehut builds for CI, which is a joy to work with and made the process quite easy.
Here’s my version of a simplified build provenance for the web extension:
- The whole build/signing/uploading happens in a public CI build run
- It “proves” that the extension is built with the public code for a given tag
- Thankfully, Mozilla provides an API to sign extensions
- It prints the SHA-256 hash of the signed extension after signing/before uploading
- Artifacts are stored in a Backblaze B2 bucket
- It uploads the metadata in a bucket along with the build artifact:
- date
- artifact hash
- CI job ID
- It “proves” that the extension is built with the public code for a given tag
- Anyone can look at the job run and confirm it generated/uploaded this specific build
This process is way better than “trust me you can download this extension that I built locally on my machine”.
I will see how I can improve it over time but I feel like this is a good start!
