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 CI security #158

Merged
merged 4 commits into from
Apr 8, 2024
Merged

Improve CI security #158

merged 4 commits into from
Apr 8, 2024

Conversation

bjosv
Copy link
Collaborator

@bjosv bjosv commented Apr 8, 2024

Improve security for CI runs according to OpenSSF recommendations:

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.

Includes version lift of:
- actions/checkout
- coverallsapp/github-action
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
@bjosv bjosv changed the title Secureadopt secure software development best practices recommended by the Open Source Security Foundation (OpenSSF) Improve CI security Apr 8, 2024
@c9s
Copy link
Owner

c9s commented Apr 8, 2024

Sounds awesome! Looks great!

@bjosv
Copy link
Collaborator Author

bjosv commented Apr 8, 2024

Sorry for the edits in the PR title/headline, the PR somehow got submitted before it was ready ..
The touchpad probably needs to be replaced :)
I'll look into the coveralls problem this triggered before merging.

Option 'path-to-lcov' is deprecated, using 'file' instead.
Using option 'format' to set coverage report format.
@coveralls
Copy link

Coverage Status

coverage: 91.041% (-0.3%) from 91.304%
when pulling c38bf93 on Nordix:openssf-recommendations
into c1aab00 on c9s:2.0.

@bjosv bjosv merged commit 3cc703c into c9s:2.0 Apr 8, 2024
10 checks passed
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