-
-
Notifications
You must be signed in to change notification settings - Fork 235
Apply security best practices for GitHub Repo Supply Chain #1180
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: StepSecurity Bot <[email protected]>
Updates GitHub repo to use best practices against supply chain attacks by: 1. Pinning github action versions 2. Pinning docker versions 3. Add dependency review workflow 4. Add dependabot config. 5. add codeql for code-scanning/security
Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️ |
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.
Pull Request Overview
This PR enforces supply chain security best practices by pinning versions for Docker images and GitHub Actions while introducing workflows for dependency review and CodeQL scanning.
- Updated Dockerfile to use image digests instead of mutable tags.
- Revised multiple workflows to replace floating version tags with pinned commit SHAs.
- Added new workflows for dependency review, CodeQL scanning, and Dependabot configuration.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
Dockerfile | Pinned image digests for both cargo-chef and debian base images. |
.github/workflows/website.yml | Updated checkout, setup-node, and other actions to use pinned SHAs. |
.github/workflows/test-fixtures.yml | Updated the checkout action version to a pinned SHA. |
.github/workflows/docker.yml | Pinned versions for Docker metadata, QEMU, Buildx, cache, and login steps. |
.github/workflows/dependency-review.yml | Introduced a new dependency review workflow with pinned action versions. |
.github/workflows/codeql.yml | Added a CodeQL analysis workflow with pinned versions for actions. |
.github/workflows/ci.yml | Updated CI workflows by pinning various action versions for consistency. |
.github/workflows/check-semver.yml | Pinned versions for semver check and pull request comment actions. |
.github/workflows/cd.yml | Revised CD workflows with pinned action versions and build steps. |
.github/dependabot.yml | Added configuration for Docker and NPM dependency updates. |
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1180 +/- ##
=======================================
Coverage 42.35% 42.35%
=======================================
Files 21 21
Lines 1991 1991
=======================================
Hits 843 843
Misses 1148 1148
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Not sure what is this doing, is it really needed?
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.
This is just code quality.
It's built in by GitHub and scans for vulnerabilities and bad code quality.
Also lately they have an auto-fix that will generate code or tell you how to fix the issue. It's quite nice.
GitHub highly recommends it and it's pretty easy to set up (should work out of the box with this config), but not everyone likes it so that's why I said it's optional at the top. I linked a guide to it at the top about what exactly it's doing.
… ecosystem. I don't think docker group support update types but I can test it and get back to you but on the GitHub documentation it's not listed as supported under group types
…bout docker depends makes it in line with previous. formatting fix
Updates GitHub repo to use best practices against supply chain attacks by:
Motivation and Context
protects repo against supply chain attacks
Literature recommending these changes:
Github Guide about Dependency Review
Github Guide for Configuring Dependency Review Action
The Open Source Security Foundation (OpenSSF) Security Guide
OWASP Static Code Analysis
Github Guide For Code Scanning
GitHub Security Guide
How Has This Been Tested?
ran actions in my own fork - worked.
Screenshots / Logs (if applicable)
Types of Changes
Repo Security Change
Checklist: