Skip to content

Add read-only permissions in code_completion_plugin_tests.yml - #41666

Merged
derrickaw merged 1 commit into
masterfrom
codescan/gha-code-completion-plugin-permissions
Nov 25, 2026
Merged

derrickaw merged 1 commit into
masterfrom
codescan/gha-code-completion-plugin-permissions

Conversation

@derrickaw

@derrickaw derrickaw commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  • The PR remediates confirmed, live Code Scanning finding(s) (CodeQL / zizmor) on master without altering intended public API or workflow semantics
  • The fix is minimal, idiomatic, and avoids masking underlying defects (false positives and noisy rules are dismissed or scoped via config rather than code churn)
  • Relevant unit tests, linters, Gemini review feedback, and live workflow_dispatch runs (for workflow/action changes) have been verified

Initiative Progress (as of 2026-11-25 13:49 UTC): 13 PRs merged so far, with ~35 more PRs needed to be merged to close out all actionable Code Scanning findings (with #41637 disabling Note-level zizmor/self-repository warnings).

Code Scanning Remediation Context (End Goal, Scope & Impact)

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 2 open GitHub Code Scanning alerts (#7, #1500) in .github/workflows/code_completion_plugin_tests.yml:

  • actions/missing-workflow-permissions (CodeQL) & zizmor/excessive-permissions: Adds explicit top-level permissions: contents: read so GITHUB_TOKEN is scoped to read-only repository contents (test only checks out apache/beam and JetBrains/intellij-community, runs ./gradlew test --info, and uploads failure test reports via actions/upload-artifact@v7).

Verification

  • zizmor --config .github/zizmor.yml .github/workflows/code_completion_plugin_tests.yml (0 findings)
  • ./gradlew :beam-test-gha:preCommit (BUILD SUCCESSFUL)
  • Live Code Completion Plugin Tests workflow run on this PR: https://github.com/apache/beam/actions/runs/45625196303 (SUCCESS)

@derrickaw

Copy link
Copy Markdown
Collaborator Author

/gemini review

@github-actions github-actions Bot added build size/xs XS: <10 lines changed labels Nov 25, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This PR adds explicit top-level permissions: contents: read to .github/workflows/code_completion_plugin_tests.yml to resolve CodeQL (actions/missing-workflow-permissions) and zizmor (excessive-permissions) code scanning findings. The change is minimal, accurate, and preserves the workflow's execution semantics.

🔍 General Feedback

  • The test job only requires read access to repository contents (checking out apache/beam and JetBrains/intellij-community, running Gradle tests, and uploading failure reports via actions/upload-artifact@v7), so scoping GITHUB_TOKEN to contents: read at the workflow level follows the principle of least privilege.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@derrickaw derrickaw added ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review and removed ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review labels Nov 25, 2026
@derrickaw
derrickaw marked this pull request as ready for review November 25, 2026 14:43
@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @damccorm for label build.
Backup reviewer: Amar3tto (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@derrickaw
derrickaw merged commit 739828d into master Nov 25, 2026
12 checks passed
@derrickaw
derrickaw deleted the codescan/gha-code-completion-plugin-permissions branch November 25, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants