-
Notifications
You must be signed in to change notification settings - Fork 98
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
[StepSecurity] ci: Harden GitHub Actions #990
[StepSecurity] ci: Harden GitHub Actions #990
Conversation
Signed-off-by: StepSecurity Bot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
- id: skip_check | ||
uses: fkirc/skip-duplicate-actions@v5.2.0 | ||
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are good changes, but it would be nice if we still know to what version it corresponds. Going to the repo and finding the sha is too many steps. I can check how hard it would be to open PR towards https://github.com/step-security/secure-workflows to do that.. I mean to put the human readable x.y.z version to a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
related stuff step-security/secure-repo#1087 (comment) tl;dr: they had it there, but dependabot removes the comment so they choose to not add it at all
Looks like
It happened today before and was solved by rerun, now it fails consistently. It might be related to the introduction of the hardened-runner. I will merge this PR in to introduce the overall security pattern and then we will be able to tackle the configuration of failing unit test job in isolation. |
Follow up to #990 For some reason https://app.stepsecurity.io/ didn't manage to handle these actions automatically. Signed-off-by: Yury Tsarev <[email protected]>
|
* Permissions setting for the rest of the actions Follow up to #990 For some reason https://app.stepsecurity.io/ didn't manage to handle these actions automatically. Signed-off-by: Yury Tsarev <[email protected]> * Disable harden runner for `go test` Otherwise the job fails with ``` 2022-10-18T22:53:03Z WRN providers/assistant/gslb.go:294 > can't resolve FQDN using nameservers error="exchange error: all dns servers were tried and none of them were able to resolve, err: read udp 127.0.0.1:47217->127.0.0.1:7753: read: connection refused" fqdn=127.0.0.1. ``` Signed-off-by: Yury Tsarev <[email protected]> * Add write permission to gh-pages Signed-off-by: Yury Tsarev <[email protected]> * Amend permissions for release job Signed-off-by: Yury Tsarev <[email protected]> * Disable harden runner for terratest based jobs Signed-off-by: Yury Tsarev <[email protected]> Signed-off-by: Yury Tsarev <[email protected]>
Summary
This is an automated pull request generated by Secure Workflows at the request of @ytsarev. Please merge the Pull Request to incorporate the requested changes. Please tag @ytsarev on your message if you have any questions related to the PR. You can also engage with the StepSecurity team by tagging @step-security-bot.
Security Fixes
Least Privileged GitHub Actions Token Permissions
The least privilged token permissions were calculate using Secure WorkFlows based on the actions included in the GitHub Workflow files. This is recommended by GitHub as well as The Open Source Security Foundation (OpenSSF).
Pinned Dependencies
A pinned dependency is a dependency that is explicitly set to a specific hashed version instead of a mutable version. Pinned dependencis ensure that development and deployment are done with the same software versions which reduces deployment risks, and enables reproducibility. It can help mitigate compromised dependencies from undermining the security of the project in certain scenarios. The dependencies were pinned using Secure WorkFlows
Harden Runner
This PR adds Harden-Runner in GitHub actions workflows to improve security. It is an open-source purpose-built security monitoring agent for GitHub hosted runners. It monitors the runtime behavior of the build environment to provide security insights. Optionally, it can also lock down the build environment.
Keeping your actions up to date with Dependabot
The package ecosystem to update github-actions is added using Secure WorkFlows. This is recommended by GitHub as well as The Open Source Security Foundation (OpenSSF).
Feedback
For bug reports, feature requests, and general feedback; please create an issue in step-security/secure-workflows or contact us via our website.
Signed-off-by: StepSecurity Bot [email protected]