Amblem
Furkan Baytekin

Can We Trust Open Source Binaries? A Simple Guide with GitHub Workflows

How can I trust the binary files if I cannot read their content?

Can We Trust Open Source Binaries? A Simple Guide with GitHub Workflows
83
3 minutes

Open-source software means anyone can see the code, change it, and even use it to make new things. But just because the code is open doesn’t mean the files you download, called binaries, are safe. Sometimes, the binary file you download might not match the code you see. That’s a problem!

So, how can you trust binaries from an open-source project? The answer is using tools like GitHub Workflows. These tools help automate the process and make sure everything is secure and transparent. Let’s see how this works by looking at a project called Passenger-CLI and its GitHub setup. This is a project maintaining by me.


Why Binary Files Can Be Tricky

Even if the code is open-source, how do you know the binary file was really made from that code? People can make mistakes or, worse, change things on purpose. Plus, the websites hosting the binaries could get hacked. A good solution needs to:

  1. Make sure the binary is built from the exact open-source code.
  2. Minimize human involvement to avoid errors.
  3. Leave a clear and traceable process for everyone to check.

GitHub Workflows: Making It Safe and Clear

GitHub Workflows is a tool that helps developers build, test, and release software automatically. It’s like having a checklist that always gets followed perfectly. The Passenger-CLI project uses these workflows, as you can see in its release workflow file. Here’s how it works:

1. Using Workflow Runners

GitHub uses virtual machines, called runners, to run each step in a workflow. These runners start fresh every time, so nothing left from an old project can mess things up. This ensures everything is clean and safe.

2. Building the Code

The workflow begins by fetching the project’s source code using an action called actions/checkout. This guarantees the exact code version is used for the build.

3. Creating and Storing Artifacts

The process involves two important actions:

4. Releasing the Binary

The last step uses the create-release action. This takes the binary and publishes it on GitHub’s release page. For Passenger-CLI, you can see the result on their releases page. Each release links back to the workflow that built it, like this example run. This makes everything easy to track and trust.


Why This Method Works

  1. Automation Prevents Mistakes: Automating the process removes human errors or tampering.
  2. Traceable Actions: Every release links back to the exact code and workflow run.
  3. Clean Builds: GitHub runners start fresh every time, keeping the build environment secure.
  4. Verified Files: Uploading and downloading artifacts ensures the binary stays the same from start to finish.
  5. Trusted Hosting: Hosting binaries on GitHub is safer than using random websites.

Wrapping It Up: GitHub Releases Are Your Friend

GitHub Workflows make sure open-source projects like Passenger-CLI create and share binaries securely. The releases page is where you can safely download these files, knowing they’re built straight from the source code through a reliable process.

This approach makes downloading binaries safer and simpler. With automation, transparency, and a trusted system, you can feel confident that what you’re downloading is exactly what it’s supposed to be.

Suggested Blog Posts