Skip to content

ci: add Gemini security review check - #29

Merged
darkobas2 merged 1 commit into
mainfrom
ci/gemini-review
Nov 16, 2026
Merged

darkobas2 merged 1 commit into
mainfrom
ci/gemini-review

Conversation

@darkobas2

Copy link
Copy Markdown
Contributor

Adds .github/workflows/gemini-review.yml, identical to ethersphere/swarm-cli#802.

  • pull_request_target, runs from the protected base branch; never checks out or executes PR code, only reads the diff via the API pinned to the event SHAs.
  • Keyless auth: GitHub OIDC -> GCP Workload Identity Federation -> service account limited to aiplatform.endpoints.predict in ethswarm-ci-gemini. The WIF provider only accepts this workflow file, environment gemini-review (already created, restricted to main) and this repo's ID.
  • High/critical findings fail the check; human approval is still required.

Note: the check cannot run on this PR itself (pull_request_target uses the base branch workflow). It takes effect for PRs opened after merge. Once it has passed a run it can be added as a required check.

Runs on pull_request_target from the protected base branch, fetches the PR diff
as text only (never checks out PR code), and asks Gemini on Vertex AI for a
security review. High/critical findings fail the check. Authenticates keylessly
via GCP Workload Identity Federation (project ethswarm-ci-gemini); the provider
only accepts this workflow, environment gemini-review and the base branch.
@darkobas2
darkobas2 merged commit 8cf5a51 into main Nov 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants