Closed bjosv closed 7 months ago
Excellent and very timely wrt. xz ...
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 Prophetic, look at the date: https://www.youtube.com/watch?v=9qljpi5jiMQ&t=875s
Wow :) Thanks for the link, I didn't know the history with Azure Pipelines. So that's the reason for some weirdness..
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:
Pin the Github Action dependencies to hash. When developing a CI workflow, it's common to version-pin dependencies (i.e.
actions/checkout@v4
). However, 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. https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependenciesSet 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. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissionsAdd a dependabot which 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. https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
For future reference, additional Github guidelines and info about permissions.