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

GitHub (SLSA) attestation guide #26222

Merged
merged 4 commits into from
Feb 14, 2025
Merged

GitHub (SLSA) attestation guide #26222

merged 4 commits into from
Feb 14, 2025

Conversation

noahtalerman
Copy link
Member

  • Add instructions for verifying Fleet, fleetd, and fleetctl

- Add instructions for verifying Fleet, fleetd, and fleetctl
Comment on lines 13 to 30
Here's how to verify the Fleet server:

```
gh attestation verify --owner fleetdm TODO
```

Verify Fleet's agent (fleetd):

```
gh attestation verify --owner fleetdm TODO
```

Verify the fleetctl command-line tool (CLI):

```
gh attestation verify --owner fleetdm TODO
```

Copy link
Member Author

@noahtalerman noahtalerman Feb 10, 2025

Choose a reason for hiding this comment

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

@sgress454 can you please help me fill in the TODOs here?

I'm looking at the Attestations page in GitHub and I can't find a good example. When I click on one of the attestations I see this (not that helpful):

Screenshot 2025-02-10 at 9 52 37 AM

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure! For binaries, you're verifying a file on your own computer, so it's

gh attestation verify --owner fleetdm /path/to/downloaded/fleet

or downloaded fleetctl, or any of the other artifacts listed in a release. Both the archive (zip) files and the binaries enclosed in them have attestations added, so that if someone unzips the archive and sends the binary elsewhere it can still have its build verified.

For docker images, it's

 gh attestation verify --owner fleetdm oci://docker.io/fleetdm/fleetctl[:tag]

or

 gh attestation verify --owner fleetdm oci://docker.io/fleetdm/fleet:[tag]

(the tags are optional; without them you'll verify the latest image)

Copy link
Member Author

Choose a reason for hiding this comment

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

@sgress454 can one verify the fleetd (Orbit) source code .zip like the one here? https://github.com/fleetdm/fleet/archive/refs/tags/orbit-v1.39.0.zip

I ran this command and got an error:

gh attestation verify --owner fleetdm Downloads/fleet-orbit-v1.39.0.zip

Loaded digest sha256:d2fccfaad04bbf05157c3d6f6d3a19fea81b6d183e23057fd3f4ed4a5d4de322 for file://Downloads/fleet-orbit-v1.39.0.zip
✗ Loading attestations from GitHub API failed

Error: failed to fetch attestations from fleetdm: HTTP 404: Not Found (https://api.github.com/orgs/fleetdm/attestations/sha256:d2fccfaad04bbf05157c3d6f6d3a19fea81b6d183e23057fd3f4ed4a5d4de322?per_page=30)

Copy link
Contributor

Choose a reason for hiding this comment

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

We're not adding provenance to source file zips; it's mainly for code you run (like binaries and images, and archives containing those) so that you can see how it was built. It looks like we don't add binaries to the Orbit Github releases right now, but you can see the release artifacts on the Orbit release workflow, and any of those can be verified. On a host (at least a MacOS host) you can do:

gh attestation verify /usr/local/bin/orbit --owner fleetdm

to verify the Orbit binary installed on that host.

Copy link
Member Author

@noahtalerman noahtalerman Feb 12, 2025

Choose a reason for hiding this comment

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

@sgress454 thanks! So currently we support attestation for the Orbit component of fleetd. Not osquery or Fleet Desktop yet (screenshot below from docs here). Is that right?

Screenshot 2025-02-12 at 9 26 31 AM

On a host (at least a MacOS host) you can do:

gh attestation verify /usr/local/bin/orbit --owner fleetdm

to verify the Orbit binary installed on that host.

Also, what would the command be to verify Orbit on Linux and Windows?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hey @sgress454 just giving you another ping! When you get the chance, please check out my questions above.

Copy link
Member Author

@noahtalerman noahtalerman Feb 14, 2025

Choose a reason for hiding this comment

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

Hey @sgress454, can you please check out my questions above when you get the chance? Thanks!

Marking this PR as ready for review so we can get this merged in quickly. Plan is to open a separate PR once we get answers from Scott.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for missing this!

So currently we support attestation for the Orbit component of fleetd. Not osquery or Fleet Desktop yet

That's correct. I'll check if there's a ticket to add attestation for these and add one if not.

Also, what would the command be to verify Orbit on Linux and Windows?

On Linux it should be the same. On Windows I think it would usually be:

gh attestation verify "C:\Program Files\Orbit\bin\orbit\orbit.exe --owner fleetdm"

If you have a Windows host handy you can verify that, or I can set one up.

Copy link
Contributor

Choose a reason for hiding this comment

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

Update: there was a PR for attesting the desktop and osqueryd binaries and I already did it 🙃 . But I think it needs some work -- it appears we're only attesting the archives, but (except in the case of Linux) not the binaries inside. So the file that Orbit downloads is attested, but not the things inside it. I'll open a ticket to fix that up.

Copy link
Member Author

Choose a reason for hiding this comment

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

there was a PR for attesting the desktop and osqueryd binaries and I already did it 🙃 . But I think it needs some work -- it appears we're only attesting the archives, but (except in the case of Linux) not the binaries inside.

Good call to open up an issue. Can you please file it as an engineering initiated user story? Here's how: https://fleetdm.com/handbook/engineering#create-an-engineering-initiated-story

That way, Luke (engineering output and architecture DRI) can triage the story and decide whether to prioritize wrapping it up.

@noahtalerman noahtalerman marked this pull request as ready for review February 14, 2025 14:18
@noahtalerman
Copy link
Member Author

Hey @sgress454, can you please check out my questions above when you get the chance? Thanks!

Marking this PR as ready for review so we can get this merged in quickly. Plan is to open a separate PR once we get answers from Scott.

@Drew-P-drawers this PR is ready for review/merge.

Copy link
Contributor

@Drew-P-drawers Drew-P-drawers left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@Drew-P-drawers Drew-P-drawers merged commit f9dc049 into main Feb 14, 2025
5 checks passed
@Drew-P-drawers Drew-P-drawers deleted the noahtalerman-patch-21 branch February 14, 2025 18:01
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.

3 participants