cicaddy-github 0.7.0__tar.gz → 0.7.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/.agents/skills/cicaddy-action/SKILL.md +5 -5
  2. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/.github/workflows/pr-review.yml +2 -2
  3. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/AGENTS.md +1 -1
  4. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/PKG-INFO +82 -23
  5. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/README.md +81 -22
  6. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/action.yml +1 -1
  7. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/docs/delegation.md +1 -1
  8. cicaddy_github-0.7.1/docs/providers.md +269 -0
  9. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/pyproject.toml +1 -1
  10. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/__init__.py +1 -1
  11. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tests/unit/test_settings.py +4 -4
  12. cicaddy_github-0.7.0/docs/providers.md +0 -178
  13. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/.github/dependabot.yml +0 -0
  14. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/.github/workflows/changelog.yml +0 -0
  15. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/.github/workflows/ci.yml +0 -0
  16. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/.github/workflows/release.yml +0 -0
  17. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/.gitignore +0 -0
  18. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/.pre-commit-config.yaml +0 -0
  19. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/CLAUDE.md +0 -0
  20. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/CODE_OF_CONDUCT.md +0 -0
  21. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/CONTRIBUTING.md +0 -0
  22. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/Dockerfile +0 -0
  23. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/LICENSE +0 -0
  24. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/entrypoint.sh +0 -0
  25. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/config/__init__.py +0 -0
  26. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/config/settings.py +0 -0
  27. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/github_integration/__init__.py +0 -0
  28. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/github_integration/agents.py +0 -0
  29. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/github_integration/analyzer.py +0 -0
  30. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/github_integration/detector.py +0 -0
  31. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/github_integration/go_dep_review_tools.py +0 -0
  32. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/github_integration/tools.py +0 -0
  33. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/plugin.py +0 -0
  34. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/security/__init__.py +0 -0
  35. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/security/leak_detector.py +0 -0
  36. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/src/cicaddy_github/validation.py +0 -0
  37. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tasks/changelog_report.yml +0 -0
  38. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tasks/go_dep_impact_review.yml +0 -0
  39. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tasks/pr_review.yml +0 -0
  40. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/templates/report_template.html +0 -0
  41. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tests/__init__.py +0 -0
  42. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tests/conftest.py +0 -0
  43. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tests/unit/__init__.py +0 -0
  44. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tests/unit/test_agents.py +0 -0
  45. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tests/unit/test_analyzer.py +0 -0
  46. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tests/unit/test_detector.py +0 -0
  47. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tests/unit/test_go_dep_review.py +0 -0
  48. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tests/unit/test_leak_detector.py +0 -0
  49. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tests/unit/test_plugin.py +0 -0
  50. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tests/unit/test_review_delegation_hooks.py +0 -0
  51. {cicaddy_github-0.7.0 → cicaddy_github-0.7.1}/tests/unit/test_tools.py +0 -0
@@ -233,10 +233,10 @@ the `safe-to-review` label. The label is auto-removed on new pushes to prevent
233
233
  TOCTOU bypasses.
234
234
 
235
235
  ```yaml
236
- - uses: redhat-community-ai-tools/cicaddy-action@v0.7.0
236
+ - uses: redhat-community-ai-tools/cicaddy-action@v0.7.1
237
237
  with:
238
238
  ai_provider: gemini
239
- ai_model: gemini-3-flash-preview
239
+ ai_model: gemini-3.5-flash
240
240
  ai_api_key: ${{ secrets.AI_API_KEY }}
241
241
  task_file: tasks/pr_review.yml
242
242
  post_pr_comment: 'true'
@@ -252,7 +252,7 @@ file and use `uv run cicaddy run --env-file <file>`.
252
252
  ```bash
253
253
  # AI Provider
254
254
  AI_PROVIDER=gemini
255
- AI_MODEL=gemini-3-flash-preview
255
+ AI_MODEL=gemini-3.5-flash
256
256
  GEMINI_API_KEY=<key>
257
257
 
258
258
  # GitHub Configuration
@@ -406,7 +406,7 @@ Or inline via `DELEGATION_AGENTS` JSON env var.
406
406
  - uses: redhat-community-ai-tools/cicaddy-action@main
407
407
  with:
408
408
  ai_provider: gemini
409
- ai_model: gemini-3-flash-preview
409
+ ai_model: gemini-3.5-flash
410
410
  ai_api_key: ${{ secrets.AI_API_KEY }}
411
411
  task_file: tasks/pr_review.yml
412
412
  post_pr_comment: 'true'
@@ -419,7 +419,7 @@ Or inline via `DELEGATION_AGENTS` JSON env var.
419
419
  ```bash
420
420
  # .env.my-review
421
421
  AI_PROVIDER=gemini
422
- AI_MODEL=gemini-3-flash-preview
422
+ AI_MODEL=gemini-3.5-flash
423
423
  GEMINI_API_KEY=<key>
424
424
  GITHUB_TOKEN=<token>
425
425
  GITHUB_REPOSITORY=owner/repo
@@ -49,11 +49,11 @@ jobs:
49
49
  fi
50
50
 
51
51
  - name: AI Code Review
52
- uses: redhat-community-ai-tools/cicaddy-action@v0.5.0
52
+ uses: redhat-community-ai-tools/cicaddy-action@v0.7.1
53
53
  id: review
54
54
  with:
55
55
  ai_provider: gemini
56
- ai_model: gemini-3-flash-preview
56
+ ai_model: gemini-3.5-flash
57
57
  ai_api_key: ${{ secrets.AI_API_KEY }}
58
58
  task_file: tasks/pr_review.yml
59
59
  post_pr_comment: 'true'
@@ -179,7 +179,7 @@ Create an env file and use `uv run cicaddy run --env-file <file>`:
179
179
  ```bash
180
180
  # AI Provider
181
181
  AI_PROVIDER=gemini
182
- AI_MODEL=gemini-3-flash-preview
182
+ AI_MODEL=gemini-3.5-flash
183
183
  GEMINI_API_KEY=<key>
184
184
 
185
185
  # GitHub Configuration
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cicaddy-github
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: GitHub Actions plugin for cicaddy AI agent framework
5
5
  Project-URL: Homepage, https://github.com/redhat-community-ai-tools/cicaddy-action
6
6
  Project-URL: Repository, https://github.com/redhat-community-ai-tools/cicaddy-action.git
@@ -32,6 +32,29 @@ GitHub Action that wraps [cicaddy](https://github.com/waynesun09/cicaddy) for ru
32
32
  - **Secret redaction** via detect-secrets for safe public outputs
33
33
  - **DSPy YAML task definitions** for customizable analysis workflows
34
34
 
35
+ ## Prerequisites
36
+
37
+ The examples below use **Vertex AI with Workload Identity Federation (WIF)**
38
+ for keyless authentication. WIF eliminates static secrets — GitHub mints a
39
+ short-lived OIDC token per workflow run and GCP exchanges it for temporary
40
+ credentials scoped to that job.
41
+
42
+ **One-time GCP setup required:**
43
+
44
+ 1. Create a Workload Identity Pool and OIDC provider
45
+ 2. Create a service account with `roles/aiplatform.user`
46
+ 3. Bind the pool to the service account **scoped to your specific repository**
47
+ (the `--member` flag must use a `principalSet` with `attribute.repository/OWNER/REPO`
48
+ to enforce repository-level isolation)
49
+
50
+ Store the resulting values as GitHub
51
+ [repository variables](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables)
52
+ (`vars.GCP_WIF_PROVIDER`, `vars.GCP_SERVICE_ACCOUNT`, `vars.GCP_PROJECT_ID`).
53
+
54
+ See [docs/providers.md](docs/providers.md) for the full `gcloud` setup
55
+ commands, authentication method comparison (WIF vs SA key vs API key), and
56
+ alternative provider configurations (OpenAI, Claude, standalone Gemini API key).
57
+
35
58
  ## Quick Start
36
59
 
37
60
  ### AI PR Review
@@ -48,28 +71,42 @@ on:
48
71
  pull_request:
49
72
  types: [opened, synchronize]
50
73
 
51
- permissions:
52
- pull-requests: write
53
-
54
74
  jobs:
55
75
  review:
56
76
  runs-on: ubuntu-latest
77
+ permissions:
78
+ contents: read
79
+ id-token: write # Required for Workload Identity Federation
80
+ pull-requests: write
57
81
  steps:
58
82
  - uses: actions/checkout@v6
59
83
  with:
60
84
  fetch-depth: 0
61
85
 
86
+ - uses: google-github-actions/auth@v3
87
+ with:
88
+ workload_identity_provider: ${{ vars.GCP_WIF_PROVIDER }}
89
+ service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
90
+
62
91
  - uses: redhat-community-ai-tools/cicaddy-action@main
63
92
  with:
64
- ai_provider: gemini
65
- ai_model: gemini-3-flash-preview
66
- ai_api_key: ${{ secrets.AI_API_KEY }}
93
+ ai_provider: gemini-vertex
94
+ ai_model: gemini-3.5-flash
95
+ google_cloud_project: ${{ vars.GCP_PROJECT_ID }}
67
96
  task_file: tasks/pr_review.yml
68
97
  post_pr_comment: 'true'
69
98
  env:
70
99
  DELEGATION_MODE: auto
71
100
  ```
72
101
 
102
+ > **Fork PRs**: The `pull_request` event cannot mint OIDC tokens for PRs
103
+ > from forks, so WIF authentication will fail. To support fork PRs, use
104
+ > `pull_request_target` with a label gate (e.g. `safe-to-review`) to
105
+ > prevent unauthorized code execution. See
106
+ > `.github/workflows/pr-review.yml` for an example and
107
+ > [docs/providers.md](docs/providers.md#submit_review-and-fork-pull-requests)
108
+ > for security details.
109
+
73
110
  > **Sub-Agent Delegation**: When `DELEGATION_MODE` is set to `auto`, the agent uses AI-powered triage to analyze the PR diff and spawns specialized sub-agents in parallel (e.g., code quality, security, performance). Each sub-agent runs with a focused scope and reduced token budget, and their results are aggregated into a single unified review. This produces deeper, more structured reviews compared to single-agent mode. Set `DELEGATION_MODE` to `none` to use a single agent instead. See [docs/delegation.md](docs/delegation.md) for details.
74
111
 
75
112
  ### Changelog Report on Release
@@ -84,16 +121,24 @@ on:
84
121
  jobs:
85
122
  changelog:
86
123
  runs-on: ubuntu-latest
124
+ permissions:
125
+ contents: read
126
+ id-token: write # Required for Workload Identity Federation
87
127
  steps:
88
128
  - uses: actions/checkout@v6
89
129
  with:
90
130
  fetch-depth: 0
91
131
 
132
+ - uses: google-github-actions/auth@v3
133
+ with:
134
+ workload_identity_provider: ${{ vars.GCP_WIF_PROVIDER }}
135
+ service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
136
+
92
137
  - uses: redhat-community-ai-tools/cicaddy-action@main
93
138
  with:
94
- ai_provider: gemini
95
- ai_model: gemini-3-flash-preview
96
- ai_api_key: ${{ secrets.AI_API_KEY }}
139
+ ai_provider: gemini-vertex
140
+ ai_model: gemini-3.5-flash
141
+ google_cloud_project: ${{ vars.GCP_PROJECT_ID }}
97
142
  task_file: tasks/changelog_report.yml
98
143
  ```
99
144
 
@@ -114,23 +159,29 @@ on:
114
159
  - 'go.mod'
115
160
  - 'go.sum'
116
161
 
117
- permissions:
118
- contents: read
119
- pull-requests: write
120
-
121
162
  jobs:
122
163
  dep-review:
123
164
  runs-on: ubuntu-latest
165
+ permissions:
166
+ contents: read
167
+ id-token: write # Required for Workload Identity Federation
168
+ pull-requests: write
124
169
  steps:
125
170
  - uses: actions/checkout@v6
126
171
  - uses: actions/setup-go@v6
127
172
  with:
128
173
  go-version: '1.22'
174
+
175
+ - uses: google-github-actions/auth@v3
176
+ with:
177
+ workload_identity_provider: ${{ vars.GCP_WIF_PROVIDER }}
178
+ service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
179
+
129
180
  - uses: redhat-community-ai-tools/cicaddy-action@main
130
181
  with:
131
- ai_provider: gemini
132
- ai_model: gemini-3-flash-preview
133
- ai_api_key: ${{ secrets.AI_API_KEY }}
182
+ ai_provider: gemini-vertex
183
+ ai_model: gemini-3.5-flash
184
+ google_cloud_project: ${{ vars.GCP_PROJECT_ID }}
134
185
  task_file: tasks/go_dep_impact_review.yml
135
186
  post_pr_comment: 'true'
136
187
  run_govulncheck: 'true'
@@ -143,7 +194,9 @@ agent instead of the default PR code review agent. The `run_govulncheck`
143
194
  input enables vulnerability reachability analysis (requires Go and
144
195
  govulncheck installed in the runner).
145
196
 
146
- See [docs/providers.md](docs/providers.md) for provider-specific configuration including Claude via Vertex AI (GCP), OpenAI, and Anthropic API setup.
197
+ See [docs/providers.md](docs/providers.md) for the full WIF setup guide,
198
+ alternative providers (OpenAI, Claude, standalone Gemini API key), the
199
+ SA key fallback, and an authentication method comparison table.
147
200
 
148
201
  ## Inputs
149
202
 
@@ -199,10 +252,16 @@ uv pip install -e ".[test]"
199
252
  **2. Create an env file** (e.g. `.env.my-review`):
200
253
 
201
254
  ```bash
202
- # AI Provider
203
- AI_PROVIDER=gemini
204
- AI_MODEL=gemini-3-flash-preview
205
- GEMINI_API_KEY=<your-gemini-api-key>
255
+ # AI Provider (Gemini via Vertex AI — uses Google Cloud ADC, no API key needed)
256
+ AI_PROVIDER=gemini-vertex
257
+ AI_MODEL=gemini-3.5-flash
258
+ GOOGLE_CLOUD_PROJECT=your-gcp-project
259
+ # GOOGLE_CLOUD_LOCATION=global # optional, defaults to "global"
260
+
261
+ # AI Provider (standalone Gemini API key — alternative to Vertex AI)
262
+ # AI_PROVIDER=gemini
263
+ # AI_MODEL=gemini-3.5-flash
264
+ # GEMINI_API_KEY=<your-gemini-api-key>
206
265
 
207
266
  # GitHub Configuration
208
267
  GITHUB_TOKEN=<your-github-token>
@@ -257,7 +316,7 @@ uv run cicaddy validate --env-file .env.my-review
257
316
  | Variable | Required | Description |
258
317
  |----------|----------|-------------|
259
318
  | `AI_PROVIDER` | Yes | `gemini`, `openai`, `claude`, `anthropic-vertex`, or `gemini-vertex` |
260
- | `AI_MODEL` | Yes | Model identifier (e.g. `gemini-3-flash-preview`) |
319
+ | `AI_MODEL` | Yes | Model identifier (e.g. `gemini-3.5-flash`) |
261
320
  | `GEMINI_API_KEY` / `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` | Yes* | API key matching the provider (*not needed for `anthropic-vertex` or `gemini-vertex`) |
262
321
  | `ANTHROPIC_VERTEX_PROJECT_ID` | No | GCP project ID (required for `anthropic-vertex`, falls back to `GOOGLE_CLOUD_PROJECT`) |
263
322
  | `GOOGLE_CLOUD_PROJECT` | No | GCP project ID for Vertex AI (required for `gemini-vertex`) |
@@ -12,6 +12,29 @@ GitHub Action that wraps [cicaddy](https://github.com/waynesun09/cicaddy) for ru
12
12
  - **Secret redaction** via detect-secrets for safe public outputs
13
13
  - **DSPy YAML task definitions** for customizable analysis workflows
14
14
 
15
+ ## Prerequisites
16
+
17
+ The examples below use **Vertex AI with Workload Identity Federation (WIF)**
18
+ for keyless authentication. WIF eliminates static secrets — GitHub mints a
19
+ short-lived OIDC token per workflow run and GCP exchanges it for temporary
20
+ credentials scoped to that job.
21
+
22
+ **One-time GCP setup required:**
23
+
24
+ 1. Create a Workload Identity Pool and OIDC provider
25
+ 2. Create a service account with `roles/aiplatform.user`
26
+ 3. Bind the pool to the service account **scoped to your specific repository**
27
+ (the `--member` flag must use a `principalSet` with `attribute.repository/OWNER/REPO`
28
+ to enforce repository-level isolation)
29
+
30
+ Store the resulting values as GitHub
31
+ [repository variables](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables)
32
+ (`vars.GCP_WIF_PROVIDER`, `vars.GCP_SERVICE_ACCOUNT`, `vars.GCP_PROJECT_ID`).
33
+
34
+ See [docs/providers.md](docs/providers.md) for the full `gcloud` setup
35
+ commands, authentication method comparison (WIF vs SA key vs API key), and
36
+ alternative provider configurations (OpenAI, Claude, standalone Gemini API key).
37
+
15
38
  ## Quick Start
16
39
 
17
40
  ### AI PR Review
@@ -28,28 +51,42 @@ on:
28
51
  pull_request:
29
52
  types: [opened, synchronize]
30
53
 
31
- permissions:
32
- pull-requests: write
33
-
34
54
  jobs:
35
55
  review:
36
56
  runs-on: ubuntu-latest
57
+ permissions:
58
+ contents: read
59
+ id-token: write # Required for Workload Identity Federation
60
+ pull-requests: write
37
61
  steps:
38
62
  - uses: actions/checkout@v6
39
63
  with:
40
64
  fetch-depth: 0
41
65
 
66
+ - uses: google-github-actions/auth@v3
67
+ with:
68
+ workload_identity_provider: ${{ vars.GCP_WIF_PROVIDER }}
69
+ service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
70
+
42
71
  - uses: redhat-community-ai-tools/cicaddy-action@main
43
72
  with:
44
- ai_provider: gemini
45
- ai_model: gemini-3-flash-preview
46
- ai_api_key: ${{ secrets.AI_API_KEY }}
73
+ ai_provider: gemini-vertex
74
+ ai_model: gemini-3.5-flash
75
+ google_cloud_project: ${{ vars.GCP_PROJECT_ID }}
47
76
  task_file: tasks/pr_review.yml
48
77
  post_pr_comment: 'true'
49
78
  env:
50
79
  DELEGATION_MODE: auto
51
80
  ```
52
81
 
82
+ > **Fork PRs**: The `pull_request` event cannot mint OIDC tokens for PRs
83
+ > from forks, so WIF authentication will fail. To support fork PRs, use
84
+ > `pull_request_target` with a label gate (e.g. `safe-to-review`) to
85
+ > prevent unauthorized code execution. See
86
+ > `.github/workflows/pr-review.yml` for an example and
87
+ > [docs/providers.md](docs/providers.md#submit_review-and-fork-pull-requests)
88
+ > for security details.
89
+
53
90
  > **Sub-Agent Delegation**: When `DELEGATION_MODE` is set to `auto`, the agent uses AI-powered triage to analyze the PR diff and spawns specialized sub-agents in parallel (e.g., code quality, security, performance). Each sub-agent runs with a focused scope and reduced token budget, and their results are aggregated into a single unified review. This produces deeper, more structured reviews compared to single-agent mode. Set `DELEGATION_MODE` to `none` to use a single agent instead. See [docs/delegation.md](docs/delegation.md) for details.
54
91
 
55
92
  ### Changelog Report on Release
@@ -64,16 +101,24 @@ on:
64
101
  jobs:
65
102
  changelog:
66
103
  runs-on: ubuntu-latest
104
+ permissions:
105
+ contents: read
106
+ id-token: write # Required for Workload Identity Federation
67
107
  steps:
68
108
  - uses: actions/checkout@v6
69
109
  with:
70
110
  fetch-depth: 0
71
111
 
112
+ - uses: google-github-actions/auth@v3
113
+ with:
114
+ workload_identity_provider: ${{ vars.GCP_WIF_PROVIDER }}
115
+ service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
116
+
72
117
  - uses: redhat-community-ai-tools/cicaddy-action@main
73
118
  with:
74
- ai_provider: gemini
75
- ai_model: gemini-3-flash-preview
76
- ai_api_key: ${{ secrets.AI_API_KEY }}
119
+ ai_provider: gemini-vertex
120
+ ai_model: gemini-3.5-flash
121
+ google_cloud_project: ${{ vars.GCP_PROJECT_ID }}
77
122
  task_file: tasks/changelog_report.yml
78
123
  ```
79
124
 
@@ -94,23 +139,29 @@ on:
94
139
  - 'go.mod'
95
140
  - 'go.sum'
96
141
 
97
- permissions:
98
- contents: read
99
- pull-requests: write
100
-
101
142
  jobs:
102
143
  dep-review:
103
144
  runs-on: ubuntu-latest
145
+ permissions:
146
+ contents: read
147
+ id-token: write # Required for Workload Identity Federation
148
+ pull-requests: write
104
149
  steps:
105
150
  - uses: actions/checkout@v6
106
151
  - uses: actions/setup-go@v6
107
152
  with:
108
153
  go-version: '1.22'
154
+
155
+ - uses: google-github-actions/auth@v3
156
+ with:
157
+ workload_identity_provider: ${{ vars.GCP_WIF_PROVIDER }}
158
+ service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
159
+
109
160
  - uses: redhat-community-ai-tools/cicaddy-action@main
110
161
  with:
111
- ai_provider: gemini
112
- ai_model: gemini-3-flash-preview
113
- ai_api_key: ${{ secrets.AI_API_KEY }}
162
+ ai_provider: gemini-vertex
163
+ ai_model: gemini-3.5-flash
164
+ google_cloud_project: ${{ vars.GCP_PROJECT_ID }}
114
165
  task_file: tasks/go_dep_impact_review.yml
115
166
  post_pr_comment: 'true'
116
167
  run_govulncheck: 'true'
@@ -123,7 +174,9 @@ agent instead of the default PR code review agent. The `run_govulncheck`
123
174
  input enables vulnerability reachability analysis (requires Go and
124
175
  govulncheck installed in the runner).
125
176
 
126
- See [docs/providers.md](docs/providers.md) for provider-specific configuration including Claude via Vertex AI (GCP), OpenAI, and Anthropic API setup.
177
+ See [docs/providers.md](docs/providers.md) for the full WIF setup guide,
178
+ alternative providers (OpenAI, Claude, standalone Gemini API key), the
179
+ SA key fallback, and an authentication method comparison table.
127
180
 
128
181
  ## Inputs
129
182
 
@@ -179,10 +232,16 @@ uv pip install -e ".[test]"
179
232
  **2. Create an env file** (e.g. `.env.my-review`):
180
233
 
181
234
  ```bash
182
- # AI Provider
183
- AI_PROVIDER=gemini
184
- AI_MODEL=gemini-3-flash-preview
185
- GEMINI_API_KEY=<your-gemini-api-key>
235
+ # AI Provider (Gemini via Vertex AI — uses Google Cloud ADC, no API key needed)
236
+ AI_PROVIDER=gemini-vertex
237
+ AI_MODEL=gemini-3.5-flash
238
+ GOOGLE_CLOUD_PROJECT=your-gcp-project
239
+ # GOOGLE_CLOUD_LOCATION=global # optional, defaults to "global"
240
+
241
+ # AI Provider (standalone Gemini API key — alternative to Vertex AI)
242
+ # AI_PROVIDER=gemini
243
+ # AI_MODEL=gemini-3.5-flash
244
+ # GEMINI_API_KEY=<your-gemini-api-key>
186
245
 
187
246
  # GitHub Configuration
188
247
  GITHUB_TOKEN=<your-github-token>
@@ -237,7 +296,7 @@ uv run cicaddy validate --env-file .env.my-review
237
296
  | Variable | Required | Description |
238
297
  |----------|----------|-------------|
239
298
  | `AI_PROVIDER` | Yes | `gemini`, `openai`, `claude`, `anthropic-vertex`, or `gemini-vertex` |
240
- | `AI_MODEL` | Yes | Model identifier (e.g. `gemini-3-flash-preview`) |
299
+ | `AI_MODEL` | Yes | Model identifier (e.g. `gemini-3.5-flash`) |
241
300
  | `GEMINI_API_KEY` / `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` | Yes* | API key matching the provider (*not needed for `anthropic-vertex` or `gemini-vertex`) |
242
301
  | `ANTHROPIC_VERTEX_PROJECT_ID` | No | GCP project ID (required for `anthropic-vertex`, falls back to `GOOGLE_CLOUD_PROJECT`) |
243
302
  | `GOOGLE_CLOUD_PROJECT` | No | GCP project ID for Vertex AI (required for `gemini-vertex`) |
@@ -83,4 +83,4 @@ runs:
83
83
  using: 'docker'
84
84
  image: 'Dockerfile'
85
85
  # After first GHCR publish, switch to pre-built image for faster startup:
86
- # image: 'docker://ghcr.io/redhat-community-ai-tools/cicaddy-action:0.7.0'
86
+ # image: 'docker://ghcr.io/redhat-community-ai-tools/cicaddy-action:0.7.1'
@@ -20,7 +20,7 @@ Add `delegation_mode` and `max_sub_agents` inputs:
20
20
  - uses: redhat-community-ai-tools/cicaddy-action@main
21
21
  with:
22
22
  ai_provider: gemini
23
- ai_model: gemini-3-flash-preview
23
+ ai_model: gemini-3.5-flash
24
24
  ai_api_key: ${{ secrets.AI_API_KEY }}
25
25
  task_file: tasks/pr_review.yml
26
26
  post_pr_comment: 'true'
@@ -0,0 +1,269 @@
1
+ # AI Provider Configuration
2
+
3
+ cicaddy-action supports multiple AI providers. This guide covers provider-specific setup.
4
+
5
+ ## Gemini (API Key)
6
+
7
+ ```yaml
8
+ - uses: redhat-community-ai-tools/cicaddy-action@main
9
+ with:
10
+ ai_provider: gemini
11
+ ai_model: gemini-3.5-flash
12
+ ai_api_key: ${{ secrets.GEMINI_API_KEY }}
13
+ ```
14
+
15
+ ## OpenAI
16
+
17
+ ```yaml
18
+ - uses: redhat-community-ai-tools/cicaddy-action@main
19
+ with:
20
+ ai_provider: openai
21
+ ai_model: gpt-4.5
22
+ ai_api_key: ${{ secrets.OPENAI_API_KEY }}
23
+ ```
24
+
25
+ ## Claude (Anthropic API)
26
+
27
+ ```yaml
28
+ - uses: redhat-community-ai-tools/cicaddy-action@main
29
+ with:
30
+ ai_provider: claude
31
+ ai_model: claude-sonnet-4-6
32
+ ai_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
33
+ ```
34
+
35
+ ## Vertex AI (GCP) — Claude & Gemini
36
+
37
+ Use Google Cloud Workload Identity Federation (WIF) for keyless authentication.
38
+ WIF eliminates static service account keys — GitHub mints a short-lived OIDC token
39
+ per workflow run, and GCP exchanges it for temporary credentials scoped to that job.
40
+
41
+ ### Parameters
42
+
43
+ The examples below use these placeholders. Set them as GitHub
44
+ [repository variables](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables)
45
+ (`vars.*`) so every workflow can reference them:
46
+
47
+ | Placeholder | GitHub variable | How to obtain | Example |
48
+ |-------------|-----------------|---------------|---------|
49
+ | `GCP_PROJECT_ID` | `vars.GCP_PROJECT_ID` | `gcloud config get project` | `my-ai-project` |
50
+ | `GCP_PROJECT_NUM` | `vars.GCP_PROJECT_NUM` | `gcloud projects describe $GCP_PROJECT_ID --format='value(projectNumber)'` | `123456789012` |
51
+ | `GCP_WIF_PROVIDER` | `vars.GCP_WIF_PROVIDER` | Full provider resource name (see setup below) | `projects/123456789012/locations/global/workloadIdentityPools/github-pool/providers/github-provider` |
52
+ | `GCP_SERVICE_ACCOUNT` | `vars.GCP_SERVICE_ACCOUNT` | SA email with Vertex AI permissions | `cicaddy@my-ai-project.iam.gserviceaccount.com` |
53
+ | `GH_ORG` | — | GitHub org or user that owns the repo | `my-org` |
54
+ | `GH_REPO` | — | Repository name | `my-repo` |
55
+ | `GH_OWNER_ID` | — | `gh api orgs/YOUR_ORG --jq '.id'` (only needed for org-wide condition) | `12345678` |
56
+
57
+ ### Prerequisites
58
+
59
+ **One-time GCP setup** — create a Workload Identity Pool and OIDC provider:
60
+
61
+ ```bash
62
+ # Set these for your environment
63
+ export GCP_PROJECT_ID="my-ai-project"
64
+ export GCP_PROJECT_NUM="$(gcloud projects describe $GCP_PROJECT_ID --format='value(projectNumber)')"
65
+ export GH_ORG="my-org"
66
+ export GH_REPO="my-repo"
67
+
68
+ # 1. Create a workload identity pool
69
+ gcloud iam workload-identity-pools create "github-pool" \
70
+ --project="${GCP_PROJECT_ID}" \
71
+ --location="global" \
72
+ --display-name="GitHub Actions Pool"
73
+
74
+ # 2. Create an OIDC provider linked to GitHub Actions
75
+ # The attribute condition restricts which repositories can authenticate.
76
+ # Use a per-repository condition (recommended) or per-org condition.
77
+ #
78
+ # Per-repository (recommended — only YOUR_ORG/YOUR_REPO can authenticate):
79
+ gcloud iam workload-identity-pools providers create-oidc "github-provider" \
80
+ --project="${GCP_PROJECT_ID}" \
81
+ --location="global" \
82
+ --workload-identity-pool="github-pool" \
83
+ --issuer-uri="https://token.actions.githubusercontent.com" \
84
+ --attribute-mapping="google.subject=assertion.sub,attribute.repository=assertion.repository,attribute.repository_owner_id=assertion.repository_owner_id" \
85
+ --attribute-condition="assertion.repository=='${GH_ORG}/${GH_REPO}'"
86
+
87
+ # Per-org alternative (any repo in the org can authenticate):
88
+ # --attribute-condition="assertion.repository_owner_id=='${GH_OWNER_ID}'"
89
+
90
+ # 3. Allow the pool to impersonate a service account (per-repository scope)
91
+ gcloud iam service-accounts add-iam-policy-binding \
92
+ "cicaddy@${GCP_PROJECT_ID}.iam.gserviceaccount.com" \
93
+ --project="${GCP_PROJECT_ID}" \
94
+ --role="roles/iam.workloadIdentityUser" \
95
+ --member="principalSet://iam.googleapis.com/projects/${GCP_PROJECT_NUM}/locations/global/workloadIdentityPools/github-pool/attribute.repository/${GH_ORG}/${GH_REPO}"
96
+ ```
97
+
98
+ The service account needs `roles/aiplatform.user` to invoke Vertex AI models.
99
+
100
+ > **Security**: Both the provider attribute condition (step 2) and the IAM
101
+ > binding (step 3) should be scoped to the specific repository, not just the
102
+ > organization. An org-wide condition lets any repo in the org mint tokens
103
+ > and impersonate the service account. Use `repository_owner_id` (numeric,
104
+ > immutable) if you do need org-level access — never use `repository_owner`
105
+ > (name string, can be re-registered after deletion).
106
+
107
+ ### Claude via Vertex AI
108
+
109
+ ```yaml
110
+ name: PR Review (Claude on Vertex AI)
111
+
112
+ on:
113
+ pull_request:
114
+ types: [opened, synchronize]
115
+
116
+ permissions:
117
+ contents: read
118
+ id-token: write # Required for Workload Identity Federation
119
+ pull-requests: write
120
+
121
+ jobs:
122
+ review:
123
+ runs-on: ubuntu-latest
124
+ steps:
125
+ - uses: actions/checkout@v6
126
+ with:
127
+ fetch-depth: 0
128
+
129
+ - uses: google-github-actions/auth@v3
130
+ with:
131
+ workload_identity_provider: ${{ vars.GCP_WIF_PROVIDER }}
132
+ service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
133
+
134
+ - uses: redhat-community-ai-tools/cicaddy-action@main
135
+ with:
136
+ ai_provider: anthropic-vertex
137
+ ai_model: claude-sonnet-4-6
138
+ vertex_project_id: ${{ vars.GCP_PROJECT_ID }}
139
+ task_file: tasks/pr_review.yml
140
+ post_pr_comment: 'true'
141
+ ```
142
+
143
+ ### Gemini via Vertex AI
144
+
145
+ ```yaml
146
+ name: PR Review (Gemini on Vertex AI)
147
+
148
+ on:
149
+ pull_request:
150
+ types: [opened, synchronize]
151
+
152
+ permissions:
153
+ contents: read
154
+ id-token: write
155
+ pull-requests: write
156
+
157
+ jobs:
158
+ review:
159
+ runs-on: ubuntu-latest
160
+ steps:
161
+ - uses: actions/checkout@v6
162
+ with:
163
+ fetch-depth: 0
164
+
165
+ - uses: google-github-actions/auth@v3
166
+ with:
167
+ workload_identity_provider: ${{ vars.GCP_WIF_PROVIDER }}
168
+ service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
169
+
170
+ - uses: redhat-community-ai-tools/cicaddy-action@main
171
+ with:
172
+ ai_provider: gemini-vertex
173
+ ai_model: gemini-3.5-flash
174
+ google_cloud_project: ${{ vars.GCP_PROJECT_ID }}
175
+ task_file: tasks/pr_review.yml
176
+ post_pr_comment: 'true'
177
+ ```
178
+
179
+ > **Note**: `google_cloud_project` is required for `gemini-vertex`. The
180
+ > `google-github-actions/auth` step sets `GOOGLE_APPLICATION_CREDENTIALS`
181
+ > automatically. No `ai_api_key` is needed.
182
+
183
+ ### Fallback: Service Account Key
184
+
185
+ If WIF is not available (e.g., restricted GCP environments without a Workload
186
+ Identity Pool), you can use a service account JSON key as a fallback:
187
+
188
+ ```yaml
189
+ - uses: google-github-actions/auth@v3
190
+ with:
191
+ credentials_json: ${{ secrets.GCP_SA_KEY }}
192
+
193
+ - uses: redhat-community-ai-tools/cicaddy-action@main
194
+ with:
195
+ ai_provider: anthropic-vertex
196
+ ai_model: claude-sonnet-4-6
197
+ vertex_project_id: ${{ vars.GCP_PROJECT_ID }}
198
+ ```
199
+
200
+ The `google-github-actions/auth` action sets `GOOGLE_APPLICATION_CREDENTIALS`
201
+ automatically in both WIF and SA key modes — never write keys to disk manually
202
+ or echo them in scripts.
203
+
204
+ > **Prefer WIF over service account keys.** SA keys are long-lived secrets
205
+ > that can leak and require manual rotation. WIF tokens are short-lived
206
+ > (~1 hour), scoped to the specific workflow run, and leave no secrets to manage.
207
+
208
+ ### Authentication Method Comparison
209
+
210
+ | | WIF (recommended) | SA Key (fallback) | API Key |
211
+ |-|--------------------|-------------------|---------|
212
+ | Secrets to manage | None | JSON key in GitHub secret | API key in GitHub secret |
213
+ | Token lifetime | ~1 hour (auto-issued) | Until key is revoked | Until key is revoked |
214
+ | Rotation | Automatic | Manual (every 90 days) | Manual |
215
+ | Blast radius | Single workflow run | Unlimited until revoked | Unlimited until revoked |
216
+ | Audit trail | Per-job OIDC claims | SA-level logging | Key-level logging |
217
+ | Scope control | Repo, branch, workflow | SA permissions only | Key permissions only |
218
+
219
+ ## Migration Notes
220
+
221
+ ### Default Vertex AI location changed from `us-east5` to `global`
222
+
223
+ Previous versions defaulted to `us-east5` via the `cloud_ml_region` input. This
224
+ release changes the default to `global` (via the new `google_cloud_location`
225
+ input), which routes requests to the nearest available region.
226
+
227
+ If your workflow relied on the implicit `us-east5` default, add an explicit
228
+ location:
229
+
230
+ ```yaml
231
+ - uses: redhat-community-ai-tools/cicaddy-action@main
232
+ with:
233
+ google_cloud_location: us-east5 # pin to previous default
234
+ ```
235
+
236
+ ### `cloud_ml_region` is deprecated
237
+
238
+ The `cloud_ml_region` input still works but emits a warning. Replace it with
239
+ `google_cloud_location` in your workflows.
240
+
241
+ ## Security Considerations
242
+
243
+ ### `submit_review` and fork pull requests
244
+
245
+ When `submit_review: 'true'` is set, the action submits a formal GitHub review
246
+ (APPROVE or REQUEST\_CHANGES) on behalf of the token owner. If your repository
247
+ accepts pull requests from forks and you use `pull_request_target` to expose
248
+ secrets, an attacker could craft a PR that tricks the AI into approving
249
+ malicious code.
250
+
251
+ Mitigations:
252
+
253
+ - Do **not** combine `submit_review: 'true'` with `pull_request_target` on
254
+ repositories that accept fork PRs.
255
+ - Use `pull_request` (not `pull_request_target`) when possible — it runs in the
256
+ fork's context and cannot access repository secrets.
257
+ - If you must use `pull_request_target`, restrict `submit_review` to trusted
258
+ contributors via a branch protection rule or a job-level `if:` condition.
259
+
260
+ ## Provider Inputs Reference
261
+
262
+ | Input | Required | Description |
263
+ |-------|----------|-------------|
264
+ | `ai_provider` | Yes | `gemini`, `openai`, `claude`, `anthropic-vertex`, or `gemini-vertex` |
265
+ | `ai_model` | Yes | Model identifier |
266
+ | `ai_api_key` | No | API key (not needed for `anthropic-vertex` or `gemini-vertex`) |
267
+ | `vertex_project_id` | No | GCP project ID for Vertex AI Claude (falls back to `google_cloud_project`) |
268
+ | `google_cloud_project` | No | GCP project ID for Vertex AI (required for `gemini-vertex`, optional fallback for `anthropic-vertex`) |
269
+ | `google_cloud_location` | No | Vertex AI location (default: `global`) |
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cicaddy-github"
7
- version = "0.7.0"
7
+ version = "0.7.1"
8
8
  description = "GitHub Actions plugin for cicaddy AI agent framework"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -1,3 +1,3 @@
1
1
  """cicaddy-github: GitHub Actions plugin for cicaddy AI agent framework."""
2
2
 
3
- __version__ = "0.7.0"
3
+ __version__ = "0.7.1"
@@ -207,7 +207,7 @@ class TestSettingsValidation:
207
207
  """GOOGLE_CLOUD_PROJECT is passed through to settings."""
208
208
  env = {
209
209
  "AI_PROVIDER": "gemini-vertex",
210
- "AI_MODEL": "gemini-3-flash-preview",
210
+ "AI_MODEL": "gemini-3.5-flash",
211
211
  "GOOGLE_CLOUD_PROJECT": "my-gcp-project",
212
212
  "GOOGLE_CLOUD_LOCATION": "us-central1",
213
213
  "MCP_SERVERS_CONFIG": "[]",
@@ -223,7 +223,7 @@ class TestSettingsValidation:
223
223
  """GOOGLE_CLOUD_LOCATION defaults to 'global' when not set."""
224
224
  env = {
225
225
  "AI_PROVIDER": "gemini-vertex",
226
- "AI_MODEL": "gemini-3-flash-preview",
226
+ "AI_MODEL": "gemini-3.5-flash",
227
227
  "GOOGLE_CLOUD_PROJECT": "my-gcp-project",
228
228
  "MCP_SERVERS_CONFIG": "[]",
229
229
  }
@@ -239,7 +239,7 @@ class TestSettingsValidation:
239
239
  """GOOGLE_CLOUD_PROJECT absent results in None."""
240
240
  env = {
241
241
  "AI_PROVIDER": "gemini",
242
- "AI_MODEL": "gemini-3-flash-preview",
242
+ "AI_MODEL": "gemini-3.5-flash",
243
243
  "MCP_SERVERS_CONFIG": "[]",
244
244
  }
245
245
  with patch.dict(os.environ, env, clear=False):
@@ -254,7 +254,7 @@ class TestSettingsValidation:
254
254
  """Empty string GOOGLE_CLOUD_PROJECT is not passed through."""
255
255
  env = {
256
256
  "AI_PROVIDER": "gemini",
257
- "AI_MODEL": "gemini-3-flash-preview",
257
+ "AI_MODEL": "gemini-3.5-flash",
258
258
  "GOOGLE_CLOUD_PROJECT": "",
259
259
  "MCP_SERVERS_CONFIG": "[]",
260
260
  }
@@ -1,178 +0,0 @@
1
- # AI Provider Configuration
2
-
3
- cicaddy-action supports multiple AI providers. This guide covers provider-specific setup.
4
-
5
- ## Gemini
6
-
7
- ```yaml
8
- - uses: redhat-community-ai-tools/cicaddy-action@main
9
- with:
10
- ai_provider: gemini
11
- ai_model: gemini-3-flash-preview
12
- ai_api_key: ${{ secrets.GEMINI_API_KEY }}
13
- ```
14
-
15
- ## OpenAI
16
-
17
- ```yaml
18
- - uses: redhat-community-ai-tools/cicaddy-action@main
19
- with:
20
- ai_provider: openai
21
- ai_model: gpt-4.5
22
- ai_api_key: ${{ secrets.OPENAI_API_KEY }}
23
- ```
24
-
25
- ## Claude (Anthropic API)
26
-
27
- ```yaml
28
- - uses: redhat-community-ai-tools/cicaddy-action@main
29
- with:
30
- ai_provider: claude
31
- ai_model: claude-sonnet-4-6
32
- ai_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
33
- ```
34
-
35
- ## Claude via Vertex AI (GCP)
36
-
37
- Uses Google Cloud Workload Identity Federation for keyless authentication — no
38
- service account JSON keys to manage. This is the recommended approach for GCP.
39
-
40
- ```yaml
41
- name: PR Review (Vertex AI)
42
-
43
- on:
44
- pull_request:
45
- types: [opened, synchronize]
46
-
47
- permissions:
48
- contents: read
49
- id-token: write # Required for Workload Identity Federation
50
- pull-requests: write
51
-
52
- jobs:
53
- review:
54
- runs-on: ubuntu-latest
55
- steps:
56
- - uses: actions/checkout@v6
57
- with:
58
- fetch-depth: 0
59
-
60
- - uses: google-github-actions/auth@v3
61
- with:
62
- workload_identity_provider: 'projects/123/locations/global/workloadIdentityPools/github/providers/my-repo'
63
- service_account: 'cicaddy@my-project.iam.gserviceaccount.com'
64
-
65
- - uses: redhat-community-ai-tools/cicaddy-action@main
66
- with:
67
- ai_provider: anthropic-vertex
68
- ai_model: claude-sonnet-4-6
69
- vertex_project_id: my-project
70
- task_file: tasks/pr_review.yml
71
- post_pr_comment: 'true'
72
- ```
73
-
74
- > **Security**: Prefer Workload Identity Federation (shown above) over service
75
- > account keys. If you must use a key, store the JSON as a GitHub secret and pass
76
- > it via `google-github-actions/auth` with `credentials_json`:
77
- > ```yaml
78
- > - uses: google-github-actions/auth@v3
79
- > with:
80
- > credentials_json: ${{ secrets.GCP_SA_KEY }}
81
- > ```
82
- > The auth action sets `GOOGLE_APPLICATION_CREDENTIALS` automatically — never
83
- > write keys to disk manually or echo them in scripts.
84
-
85
- ## Gemini via Vertex AI (GCP)
86
-
87
- Uses Google Cloud authentication (Workload Identity Federation or service account)
88
- to call Gemini models through the Vertex AI API — no Gemini API key needed.
89
-
90
- ```yaml
91
- name: PR Review (Gemini Vertex AI)
92
-
93
- on:
94
- pull_request:
95
- types: [opened, synchronize]
96
-
97
- permissions:
98
- contents: read
99
- id-token: write # Required for Workload Identity Federation
100
- pull-requests: write
101
-
102
- jobs:
103
- review:
104
- runs-on: ubuntu-latest
105
- steps:
106
- - uses: actions/checkout@v6
107
- with:
108
- fetch-depth: 0
109
-
110
- - uses: google-github-actions/auth@v3
111
- with:
112
- workload_identity_provider: 'projects/123/locations/global/workloadIdentityPools/github/providers/my-repo'
113
- service_account: 'cicaddy@my-project.iam.gserviceaccount.com'
114
-
115
- - uses: redhat-community-ai-tools/cicaddy-action@main
116
- with:
117
- ai_provider: gemini-vertex
118
- ai_model: gemini-3-flash-preview
119
- google_cloud_project: my-project
120
- task_file: tasks/pr_review.yml
121
- post_pr_comment: 'true'
122
- ```
123
-
124
- > **Note**: `google_cloud_project` is required for `gemini-vertex`. The
125
- > `google-github-actions/auth` step sets `GOOGLE_APPLICATION_CREDENTIALS`
126
- > automatically.
127
-
128
- ## Migration Notes
129
-
130
- ### Default Vertex AI location changed from `us-east5` to `global`
131
-
132
- Previous versions defaulted to `us-east5` via the `cloud_ml_region` input. This
133
- release changes the default to `global` (via the new `google_cloud_location`
134
- input), which routes requests to the nearest available region.
135
-
136
- If your workflow relied on the implicit `us-east5` default, add an explicit
137
- location:
138
-
139
- ```yaml
140
- - uses: redhat-community-ai-tools/cicaddy-action@main
141
- with:
142
- google_cloud_location: us-east5 # pin to previous default
143
- ```
144
-
145
- ### `cloud_ml_region` is deprecated
146
-
147
- The `cloud_ml_region` input still works but emits a warning. Replace it with
148
- `google_cloud_location` in your workflows.
149
-
150
- ## Security Considerations
151
-
152
- ### `submit_review` and fork pull requests
153
-
154
- When `submit_review: 'true'` is set, the action submits a formal GitHub review
155
- (APPROVE or REQUEST\_CHANGES) on behalf of the token owner. If your repository
156
- accepts pull requests from forks and you use `pull_request_target` to expose
157
- secrets, an attacker could craft a PR that tricks the AI into approving
158
- malicious code.
159
-
160
- Mitigations:
161
-
162
- - Do **not** combine `submit_review: 'true'` with `pull_request_target` on
163
- repositories that accept fork PRs.
164
- - Use `pull_request` (not `pull_request_target`) when possible — it runs in the
165
- fork's context and cannot access repository secrets.
166
- - If you must use `pull_request_target`, restrict `submit_review` to trusted
167
- contributors via a branch protection rule or a job-level `if:` condition.
168
-
169
- ## Provider Inputs Reference
170
-
171
- | Input | Required | Description |
172
- |-------|----------|-------------|
173
- | `ai_provider` | Yes | `gemini`, `openai`, `claude`, `anthropic-vertex`, or `gemini-vertex` |
174
- | `ai_model` | Yes | Model identifier |
175
- | `ai_api_key` | No | API key (not needed for `anthropic-vertex` or `gemini-vertex`) |
176
- | `vertex_project_id` | No | GCP project ID for Vertex AI Claude (falls back to `google_cloud_project`) |
177
- | `google_cloud_project` | No | GCP project ID for Vertex AI (required for `gemini-vertex`, optional fallback for `anthropic-vertex`) |
178
- | `google_cloud_location` | No | Vertex AI location (default: `global`) |
File without changes
File without changes