chore: secure github workflows#393
Conversation
|
@safiya2610: The label(s) DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @safiya2610! It looks like this is your first PR to volcano-sh/agentcube 🎉 |
There was a problem hiding this comment.
Code Review
This pull request adds a Dependabot configuration file to schedule weekly updates for GitHub Actions. The feedback suggests grouping these updates into a single weekly pull request using Dependabot's groups feature to avoid PR fatigue.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Pull request overview
This PR hardens the repository’s CI/CD GitHub Actions setup by pinning third-party actions to immutable commit SHAs, setting explicit least-privilege workflow permissions, and adding Dependabot tracking for GitHub Actions updates.
Changes:
- Pinned GitHub Actions
uses:references from mutable tags to full-length commit SHAs across all workflows. - Added explicit top-level
permissionsblocks (generallycontents: read) to align with least-privilege defaults. - Added
.github/dependabot.ymlto keep pinned GitHub Actions up to date on a weekly cadence.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/workflows-approve.yml | Pins actions/github-script; workflow uses pull_request_target with explicit permissions. |
| .github/workflows/test-coverage.yml | Adds top-level permissions and pins checkout/paths-filter/setup-go/codecov/upload-artifact actions. |
| .github/workflows/python-sdk-tests.yml | Adds top-level permissions and pins checkout/paths-filter/setup-python. |
| .github/workflows/python-sdk-publish.yml | Adds top-level permissions and pins checkout/setup-python/pypi-publish. |
| .github/workflows/python-lint.yml | Adds top-level permissions and pins checkout/paths-filter/setup-python. |
| .github/workflows/python-cli-publish.yml | Adds top-level permissions and pins checkout/setup-python/pypi-publish. |
| .github/workflows/main.yml | Adds top-level permissions and pins checkout/docker buildx setup. |
| .github/workflows/lint.yml | Pins checkout/paths-filter/setup-go. |
| .github/workflows/e2e.yml | Adds top-level permissions and pins checkout/setup-python/setup-go/kind/upload-artifact. |
| .github/workflows/dify-plugin-publish.yml | Adds top-level permissions and pins checkout usages. |
| .github/workflows/copyright-check.yml | Adds top-level permissions and pins checkout/paths-filter. |
| .github/workflows/codespell.yml | Adds top-level permissions and pins checkout. |
| .github/workflows/codegen-check.yml | Adds top-level permissions and pins checkout/paths-filter/setup-go. |
| .github/workflows/build-push-release.yml | Adds top-level permissions and pins checkout/setup-go/docker/buildx/helm/login actions. |
| .github/dependabot.yml | Adds weekly Dependabot updates for the github-actions ecosystem. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #393 +/- ##
===========================================
+ Coverage 47.57% 58.52% +10.95%
===========================================
Files 30 37 +7
Lines 2819 3491 +672
===========================================
+ Hits 1341 2043 +702
+ Misses 1338 1238 -100
- Partials 140 210 +70
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
9ae5900 to
766d0cf
Compare
766d0cf to
4d44507
Compare
4d44507 to
f2e15bb
Compare
a58541b to
f2e15bb
Compare
4d24ef6 to
effa932
Compare
|
@zhzhuang-zju hello, Codegen check is failing, not because of my code, |
Signed-off-by: safiya2610 <lci2023053@iiitl.ac.in>
0aa76ed to
0870f07
Compare
go.mod pins golang.org/x/oauth2 at v0.32.0 (an indirect dependency via github.com/coreos/go-oidc/v3). A stale v0.36.0 checksum pair was introduced in commit e49e608 when the OIDC feature was merged without running go mod tidy beforehand. The codegen-check CI job executes 'make gen-check', which internally runs 'go mod tidy' (via the generate target) and then checks 'git diff --exit-code'. Because go mod tidy removes the unreachable v0.36.0 entry, the working tree is always dirty after code generation, causing the check to fail with exit code 1. This commit applies 'go mod tidy' to bring go.sum back in sync with go.mod. No dependencies are added or changed; only the stale v0.36.0 checksum entries are removed. Fixes the Codegen Check CI failure that blocks PR volcano-sh#393. Signed-off-by: Vanshika <vanshika2720@github.com>
go.mod pins golang.org/x/oauth2 at v0.32.0 (an indirect dependency via github.com/coreos/go-oidc/v3). A stale v0.36.0 checksum pair was introduced in commit e49e608 when the OIDC feature was merged without running go mod tidy beforehand. The codegen-check CI job executes 'make gen-check', which internally runs 'go mod tidy' (via the generate target) and then checks 'git diff --exit-code'. Because go mod tidy removes the unreachable v0.36.0 entry, the working tree is always dirty after code generation, causing the check to fail with exit code 1. This commit applies 'go mod tidy' to bring go.sum back in sync with go.mod. No dependencies are added or changed; only the stale v0.36.0 checksum entries are removed. Fixes the Codegen Check CI failure that blocks PR volcano-sh#393. Signed-off-by: Vanshika <pahalvanshikaa@gmail.com>
I see what's going on. I'll create a separate issue to track this problem. |
I have solve this. |
Yes, I noticed your commit removes extra entries from Since this is out of scope for the current PR, we can rebase after #399 gets merged. |
zhzhuang-zju
left a comment
There was a problem hiding this comment.
Well done! @safiya2610
We need to wait for #399 to be merged and then rebase, others LGTM.
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: read |
There was a problem hiding this comment.
If #399 ultimately removes the Filter paths step, we will be required to remove the pull-requests: read permission.
Co-authored-by: zhzhuang-zju <m17799853869@163.com> Signed-off-by: Safiya <147792763+safiya2610@users.noreply.github.com>
Co-authored-by: zhzhuang-zju <m17799853869@163.com> Signed-off-by: Safiya <147792763+safiya2610@users.noreply.github.com>
What type of PR is this?
/kind security /kind cleanup
What this PR does / why we need it:
This PR hardens our CI/CD infrastructure and aligns our GitHub Workflows with GitHub Security Best Practices. Specifically, it introduces the following enhancements:
Pin Actions to Full-Length Commit SHAs:
Replaced mutable action tags (e.g., @v4) with immutable 40-character commit SHAs across all 14 workflow files to protect against tag-moving or hijacking.
Define Top-Level Permissions: Added explicit top-level permissions (permissions: contents: read) to workflows that lacked them, enforcing the Principle of Least Privilege.
Standardize Action Versions: Unified action versions across all workflows (e.g., standardizing on actions/setup-go@v5 and actions/setup-python@v5).
Configure Dependabot: Added a .github/dependabot.yml configuration to automatically track and update our pinned GitHub Actions on a weekly schedule.
Which issue(s) this PR fixes:
Fixes #392
Special notes for your reviewer:
The IMAGE_REGISTRY utilizes a dynamically formatted environment variable generated directly within the workflow via $GITHUB_ENV, so no manual UI setup is needed for that. The release workflows (dify-plugin-publish.yml and python-cli-publish.yml) will continue to require the pypi environment and PLUGIN_ACTION secret configured by maintainers at the repository level.