-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
chore(deps): Pin GitHub Actions and Docker image, configure Dependabot #2159
base: master
Are you sure you want to change the base?
Conversation
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 pull request updates various GitHub Actions workflows and configuration files to address the "Pinned Dependencies" check by explicitly pinning action versions to commit SHAs and updating the Dependabot schedules. Key changes include:
- Updating workflow “uses” references to commit SHAs for enhanced security.
- Changing Dependabot update intervals from monthly to weekly and adding a schedule for Docker dependencies.
- Updating the Dockerfile base image to a pinned SHA256 digest for image integrity.
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
.github/dependabot.yml | Updated Dependabot schedule for GitHub Actions and Docker dependencies. |
.github/workflows/goreleaser.yml | Pinned workflow actions to commit SHAs; note the “version: latest” input remains. |
.github/workflows/docker-publish.yml | Pinned workflow actions to commit SHAs for Docker publishing. |
.github/workflows/test.yml | Pinned workflow actions to commit SHAs for testing. |
.github/workflows/golangci.yml | Pinned workflow actions to commit SHAs for linting. |
.github/workflows/build.yml | Pinned workflow actions to commit SHAs for builds. |
.github/workflows/codeql-analysis.yml | Pinned workflow actions to commit SHAs for CodeQL analysis. |
Files not reviewed (1)
- Dockerfile: Language not supported
Comments suppressed due to low confidence (1)
.github/workflows/goreleaser.yml:40
- Using 'latest' for the goreleaser version may reintroduce floating dependency risks. Consider pinning this value to a specific, tested version to ensure build reproducibility.
version: latest
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 addresses dependency pinning in GitHub Actions workflows and the Docker base image to improve security and reliability.
- Updated Dependabot configuration to check GitHub Actions and Docker updates on a weekly schedule.
- Pinned GitHub Actions references in workflows to specific commit SHAs.
- Updated the Dockerfile to use an immutable base image via a specific SHA256 digest.
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
.github/dependabot.yml | Changed schedule intervals for GitHub Actions and added Docker updates |
.github/workflows/goreleaser.yml | Updated action references to specific commit SHAs for various steps |
.github/workflows/golangci.yml | Updated action references to specific commit SHAs for checkout, setup-go, and golangci-lint |
.github/workflows/docker-publish.yml | Changed action references to specific commit SHAs across multiple steps |
.github/workflows/codeql-analysis.yml | Pinned commit SHAs for CodeQL actions and setup steps |
.github/workflows/test.yml | Updated action references to specific commit SHAs for checkout and setup-go |
.github/workflows/build.yml | Updated action references to specific commit SHAs for checkout and setup-go |
Files not reviewed (1)
- Dockerfile: Language not supported
Dependabot’s standard functionality does not support automatically updating the |
Discussion memo: As discussed in Slack, monthly is preferable for the moment. |
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 pull request includes several updates to the GitHub Actions workflows and configuration files. The main changes involve updating the versions of various GitHub Actions and adding a new schedule for Docker dependencies.
Why did you implement:
The primary motivation for this pull request is to improve the security and reliability of our build and deployment processes by addressing the "Pinned Dependencies" check flagged by the OSF Scorecard.
@v1
or@latest
) for dependencies, especially in CI/CD pipelines, introduces a security risk. If the source repository for an action or a base image tag is compromised, malicious code could be injected into our build process without our immediate knowledge. This practice essentially means we always pull the latest code available at runtime for that tag/branch, potentially including unwanted or harmful changes. There have been real-world instances where similar vulnerabilities were exploited (as highlighted in security reports like this example .*.yml
) to specific commit SHAs (e.g.,uses: actions/checkout@a12a3943b4bdde767164d792f33f40b04645d846
instead ofuses: actions/checkout@v3
).Dockerfile
to a specific SHA256 digest (e.g.,FROM alpine:3.21@sha256:...
instead ofFROM alpine:3.16
).This ensures that we always use the exact, verified version of the dependency, mitigating the risk of supply chain attacks through compromised dependencies.
By implementing these changes, we significantly enhance the security posture of the Vuls project according to OSSF Scorecard best practices and reduce the risk associated with dependency management.
Workflow updates:
uses
references to specific commit SHAs for increased reliability and security in multiple workflow files, includingbuild.yml
,codeql-analysis.yml
,docker-publish.yml
,golangci.yml
,goreleaser.yml
, andtest.yml
. [1] [2] [3] [4] [5] [6]Configuration updates:
.github/dependabot.yml
.Dockerfile update:
Dockerfile
fromalpine:3.16
toalpine:3.21
using a specific SHA256 digest to ensure image integrity.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Checklist:
You don't have to satisfy all of the following.
make fmt
make test
Is this ready for review?: NO
Reference