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

Improve Github repository security #276

Merged
merged 3 commits into from
Apr 11, 2024

Conversation

bjosv
Copy link
Collaborator

@bjosv bjosv commented Apr 9, 2024

This PR updates our CI setup according to the secure software development best practices
recommended by the Open Source Security Foundation (OpenSSF).
The overall goal is to strengthen the (supply chain) security posture.

The following changes are included:

For future reference, additional Github guidelines and info about permissions.

bjosv added 3 commits April 9, 2024 10:38
Dependabot will perform weekly checks of the Github actions used in CI.
When a newer version is found a pull request is opened to suggest a lift.
Version tags are mutable, so a malicious attacker could overwrite
a version tag to point to a malicious or vulnerable commit instead.
Pinning workflow dependencies by hash ensures the dependency
is immutable and its behavior is guaranteed.
This sets the default permission for CI workflows to only be able to
read from the repository (scope: "contents").

A compromised action will not be able to modify the repo or even
steal secrets since all other permission-scopes are implicit set to "none",
i.e. not permitted.
More about permissions and scope can be found here:
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
@mikkelfj mikkelfj merged commit b0b3b47 into dvidelabs:master Apr 11, 2024
5 checks passed
@mikkelfj
Copy link
Contributor

Excellent and very timely wrt. xz ...

@bjosv
Copy link
Collaborator Author

bjosv commented Apr 12, 2024

Yes, xz is somewhat an eye-opener..for me atleast.

These changes seems to improve OpenSSF scorecard from Aggregate score: 4.2 / 10 to Aggregate score: 6.5 / 10 (using public data), quite ok.

@bjosv bjosv deleted the openssf-recommendations branch April 12, 2024 10:16
@mikkelfj
Copy link
Contributor

@bjosv Prophetic, look at the date:
https://www.youtube.com/watch?v=9qljpi5jiMQ&t=875s

@bjosv
Copy link
Collaborator Author

bjosv commented Apr 23, 2024

Wow :) Thanks for the link, I didn't know the history with Azure Pipelines. So that's the reason for some weirdness..

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.

2 participants