Repository navigation
Conversation
Collaborator
Author
|
/gemini review |
Contributor
There was a problem hiding this comment.
📋 Review Summary
This PR adds explicit top-level permissions: contents: read to .github/workflows/go_tests.yml to enforce least-privilege GITHUB_TOKEN permissions and resolve CodeQL/zizmor alerts.
🔍 General Feedback
- The workflow steps (
actions/checkout,.github/actions/setup-environment-action,codecov/codecov-actionwithCODECOV_TOKEN, and local Go test/lint commands) only require read access to repository contents. The change is minimal, accurate, and safe to merge.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #41660 +/- ##
============================================
- Coverage 58.73% 58.73% -0.01%
Complexity 2315 2315
============================================
Files 1135 1135
Lines 170485 170485
Branches 1499 1499
============================================
- Hits 100139 100135 -4
+ Misses 67804 67803 -1
- Partials 2542 2547 +5
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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: this PR was auto-generated by tooling. Before moving it out of draft, the author has done a full review of the PR, specifically evaluating it on the following criteria:
CodeQL/zizmor) onmasterwithout altering intended public API or workflow semanticsworkflow_dispatchruns (for workflow/action changes) have been verifiedInitiative Progress (as of
2026-11-25 02:49 UTC):11PRs merged so far, with~37more PRs needed to be merged to close out all actionable Code Scanning findings (with#41637disablingNote-levelzizmor/self-repositorywarnings).Code Scanning Remediation Context (End Goal, Scope & Impact)
apache/beam's actionableHighandMediumCode Scanning backlog (CodeQL+zizmor) down to zero.Note-levelzizmor/self-repositorywarnings (~89% of all open alerts) are handled via.github/zizmor.ymlconfig (Disable zizmor self-repository rule in .github/zizmor.yml #41637) rather than churning ~300 workflow files.ZipSlip) fixes in JavaZipFiles.unzipFile(Enforce canonical path prefix check in ZipFiles.unzipFile #41497) and Go xlangexpansionx(Enforce IsLocal and prefix check in expansionx validatePath #41589)High) fixes in shared CI composite actions (Pass inputs via env in build-push-docker-action #41515, Pass inputs and outputs via env in test-arguments-action #41592, Pass inputs and outputs via env in setup-k8s-access #41605) andpr-bot(Pass git argument arrays to @actions/exec in pr-bot updateReviewers #41524)GITHUB_TOKENscoping across CI and release workflows (Harden permissions and setup-node caching in typescript_tests.yml #41499, Scope write permissions to job in update_python_dependencies.yml #41516, Scope write permissions to jobs in cut_release_branch.yml #41522, Add read-only permissions and self-repo actions in python_tests.yml #41526, Add read-only permissions and self-repo actions in java_tests.yml #41626, Add read-only permissions and self-repo actions in local_env_tests.yml #41631) and dead-code removal (Remove unused dind-up-action composite action #41585)If you have concerns with the PR or with the underlying methodology used to generate this, please comment below - they will be addressed by the author not the tooling :)
Summary
Resolves all 2 open Code Scanning findings (
CodeQLactions/missing-workflow-permissionsandzizmor/excessive-permissions— alerts#23,#1559) in.github/workflows/go_tests.yml:permissions: contents: readso thebuildjob does not inherit default repository write scopes (codecov/codecov-action@v7authenticates viaCODECOV_TOKEN).Verification
Go testsworkflow run on this PR branch: https://github.com/apache/beam/actions/runs/45533691711 (successacross Go unit tests, coverage upload,go fmt,go vet, andstaticcheck)zizmor --config .github/zizmor.yml .github/workflows/go_tests.yml(0findings),./gradlew :beam-test-gha:preCommit, andCodeQL