cicaddy-github 0.6.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.6.0 → cicaddy_github-0.7.1}/.agents/skills/cicaddy-action/SKILL.md +15 -7
  2. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/.github/workflows/pr-review.yml +2 -2
  3. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/AGENTS.md +10 -7
  4. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/PKG-INFO +94 -36
  5. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/README.md +92 -34
  6. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/action.yml +12 -7
  7. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/docs/delegation.md +3 -3
  8. cicaddy_github-0.7.1/docs/providers.md +269 -0
  9. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/entrypoint.sh +36 -8
  10. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/pyproject.toml +2 -2
  11. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/__init__.py +1 -1
  12. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/config/settings.py +11 -1
  13. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tests/unit/test_settings.py +77 -0
  14. cicaddy_github-0.6.0/docs/providers.md +0 -93
  15. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/.github/dependabot.yml +0 -0
  16. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/.github/workflows/changelog.yml +0 -0
  17. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/.github/workflows/ci.yml +0 -0
  18. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/.github/workflows/release.yml +0 -0
  19. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/.gitignore +0 -0
  20. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/.pre-commit-config.yaml +0 -0
  21. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/CLAUDE.md +0 -0
  22. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/CODE_OF_CONDUCT.md +0 -0
  23. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/CONTRIBUTING.md +0 -0
  24. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/Dockerfile +0 -0
  25. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/LICENSE +0 -0
  26. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/config/__init__.py +0 -0
  27. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/github_integration/__init__.py +0 -0
  28. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/github_integration/agents.py +0 -0
  29. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/github_integration/analyzer.py +0 -0
  30. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/github_integration/detector.py +0 -0
  31. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/github_integration/go_dep_review_tools.py +0 -0
  32. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/github_integration/tools.py +0 -0
  33. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/plugin.py +0 -0
  34. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/security/__init__.py +0 -0
  35. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/security/leak_detector.py +0 -0
  36. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/src/cicaddy_github/validation.py +0 -0
  37. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tasks/changelog_report.yml +0 -0
  38. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tasks/go_dep_impact_review.yml +0 -0
  39. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tasks/pr_review.yml +0 -0
  40. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/templates/report_template.html +0 -0
  41. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tests/__init__.py +0 -0
  42. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tests/conftest.py +0 -0
  43. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tests/unit/__init__.py +0 -0
  44. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tests/unit/test_agents.py +0 -0
  45. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tests/unit/test_analyzer.py +0 -0
  46. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tests/unit/test_detector.py +0 -0
  47. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tests/unit/test_go_dep_review.py +0 -0
  48. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tests/unit/test_leak_detector.py +0 -0
  49. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tests/unit/test_plugin.py +0 -0
  50. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tests/unit/test_review_delegation_hooks.py +0 -0
  51. {cicaddy_github-0.6.0 → cicaddy_github-0.7.1}/tests/unit/test_tools.py +0 -0
@@ -117,12 +117,20 @@ can reference them as bash variables (`INPUT_AI_PROVIDER`, `INPUT_AI_API_KEY`, e
117
117
 
118
118
  | Input | Required | Description |
119
119
  |-------|----------|-------------|
120
- | `ai_provider` | Yes | `gemini`, `openai`, `claude` |
120
+ | `ai_provider` | Yes | `gemini`, `openai`, `claude`, `anthropic-vertex`, `gemini-vertex` |
121
121
  | `ai_model` | Yes | Model identifier |
122
- | `ai_api_key` | Yes* | AI provider API key (mapped to provider-specific env var) |
122
+ | `ai_api_key` | No* | AI provider API key (not needed for `anthropic-vertex` or `gemini-vertex`) |
123
+ | `vertex_project_id` | No | GCP project ID for Vertex AI Claude (falls back to `google_cloud_project`) |
124
+ | `google_cloud_project` | No | GCP project ID for Vertex AI (required for `gemini-vertex`) |
125
+ | `google_cloud_location` | No | Vertex AI location (default: `global`) |
123
126
  | `task_file` | No | Path to DSPy YAML task file |
124
127
  | `task_prompt` | No | Inline task prompt |
125
128
  | `post_pr_comment` | No | Post results as PR comment (default: `false`) |
129
+ | `submit_review` | No | Submit formal PR review with APPROVE/REQUEST_CHANGES (default: `false`) |
130
+ | `run_govulncheck` | No | Run govulncheck for vulnerability reachability analysis (default: `false`) |
131
+ | `dep_review_severity_threshold` | No | Minimum semver bump to analyze: `minor` or `major` (default: `minor`) |
132
+ | `delegation_mode` | No | `none` (default) or `auto` for sub-agent delegation |
133
+ | `max_sub_agents` | No | Max concurrent sub-agents, 1-10 (default: `3`) |
126
134
  | `github_token` | No | GitHub token (default: `${{ github.token }}`) |
127
135
  | `mcp_servers_config` | No | JSON array of MCP server configs |
128
136
  | `slack_webhook_url` | No | Slack webhook URL |
@@ -225,10 +233,10 @@ the `safe-to-review` label. The label is auto-removed on new pushes to prevent
225
233
  TOCTOU bypasses.
226
234
 
227
235
  ```yaml
228
- - uses: redhat-community-ai-tools/cicaddy-action@v0.6.0
236
+ - uses: redhat-community-ai-tools/cicaddy-action@v0.7.1
229
237
  with:
230
238
  ai_provider: gemini
231
- ai_model: gemini-3-flash-preview
239
+ ai_model: gemini-3.5-flash
232
240
  ai_api_key: ${{ secrets.AI_API_KEY }}
233
241
  task_file: tasks/pr_review.yml
234
242
  post_pr_comment: 'true'
@@ -244,7 +252,7 @@ file and use `uv run cicaddy run --env-file <file>`.
244
252
  ```bash
245
253
  # AI Provider
246
254
  AI_PROVIDER=gemini
247
- AI_MODEL=gemini-3-flash-preview
255
+ AI_MODEL=gemini-3.5-flash
248
256
  GEMINI_API_KEY=<key>
249
257
 
250
258
  # GitHub Configuration
@@ -398,7 +406,7 @@ Or inline via `DELEGATION_AGENTS` JSON env var.
398
406
  - uses: redhat-community-ai-tools/cicaddy-action@main
399
407
  with:
400
408
  ai_provider: gemini
401
- ai_model: gemini-3-flash-preview
409
+ ai_model: gemini-3.5-flash
402
410
  ai_api_key: ${{ secrets.AI_API_KEY }}
403
411
  task_file: tasks/pr_review.yml
404
412
  post_pr_comment: 'true'
@@ -411,7 +419,7 @@ Or inline via `DELEGATION_AGENTS` JSON env var.
411
419
  ```bash
412
420
  # .env.my-review
413
421
  AI_PROVIDER=gemini
414
- AI_MODEL=gemini-3-flash-preview
422
+ AI_MODEL=gemini-3.5-flash
415
423
  GEMINI_API_KEY=<key>
416
424
  GITHUB_TOKEN=<token>
417
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'
@@ -65,7 +65,7 @@ cicaddy-action/
65
65
 
66
66
  ### Dependencies
67
67
 
68
- - Depends on `cicaddy>=0.8.0` (core library) and `PyGithub>=2.1.0`
68
+ - Depends on `cicaddy>=0.11.0` (core library) and `PyGithub>=2.1.0`
69
69
  - Follows the same agent/factory patterns as the core library
70
70
  - Extends `BaseAIAgent` from cicaddy
71
71
 
@@ -97,7 +97,7 @@ The cicaddy-github plugin provides:
97
97
  |----------|---------|-------------|
98
98
  | `DELEGATION_MODE` | `none` | `none` or `auto` |
99
99
  | `MAX_SUB_AGENTS` | `3` | Max concurrent sub-agents (1-10) |
100
- | `SUB_AGENT_MAX_ITERS` | `10` | Iterations per sub-agent (1-15) |
100
+ | `SUB_AGENT_MAX_ITERS` | `5` | Iterations per sub-agent (1-15) |
101
101
  | `DELEGATION_AGENTS_DIR` | `.agents/delegation` | Custom agent YAML directory (relative to repo root) |
102
102
  | `DELEGATION_AGENTS` | (empty) | JSON config for inline custom sub-agent definitions |
103
103
  | `TRIAGE_PROMPT` | (empty) | Custom triage instructions |
@@ -113,14 +113,17 @@ All inputs use **underscores** (not hyphens) for Docker container compatibility:
113
113
 
114
114
  | Input | Required | Description |
115
115
  |-------|----------|-------------|
116
- | `ai_provider` | Yes | `gemini`, `openai`, `claude`, `anthropic-vertex` |
116
+ | `ai_provider` | Yes | `gemini`, `openai`, `claude`, `anthropic-vertex`, `gemini-vertex` |
117
117
  | `ai_model` | Yes | Model identifier |
118
- | `ai_api_key` | No* | AI provider API key (not needed for `anthropic-vertex`) |
119
- | `vertex_project_id` | No | GCP project ID (required for `anthropic-vertex`) |
120
- | `cloud_ml_region` | No | Vertex AI region (default: `us-east5`) |
118
+ | `ai_api_key` | No* | AI provider API key (not needed for `anthropic-vertex` or `gemini-vertex`) |
119
+ | `vertex_project_id` | No | GCP project ID for Vertex AI Claude (falls back to `google_cloud_project`) |
120
+ | `cloud_ml_region` | No | **Deprecated**: use `google_cloud_location` |
121
+ | `google_cloud_project` | No | GCP project ID for Vertex AI (required for `gemini-vertex`) |
122
+ | `google_cloud_location` | No | Vertex AI location (default: `global`) |
121
123
  | `task_file` | No | Path to DSPy YAML task file |
122
124
  | `task_prompt` | No | Inline task prompt |
123
125
  | `post_pr_comment` | No | Post results as PR comment (default: `false`) |
126
+ | `submit_review` | No | Submit formal PR review with APPROVE/REQUEST_CHANGES (default: `false`) |
124
127
  | `github_token` | No | GitHub token (default: `${{ github.token }}`) |
125
128
  | `mcp_servers_config` | No | JSON array of MCP server configs |
126
129
  | `slack_webhook_url` | No | Slack webhook URL |
@@ -176,7 +179,7 @@ Create an env file and use `uv run cicaddy run --env-file <file>`:
176
179
  ```bash
177
180
  # AI Provider
178
181
  AI_PROVIDER=gemini
179
- AI_MODEL=gemini-3-flash-preview
182
+ AI_MODEL=gemini-3.5-flash
180
183
  GEMINI_API_KEY=<key>
181
184
 
182
185
  # GitHub Configuration
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cicaddy-github
3
- Version: 0.6.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
@@ -9,7 +9,7 @@ Author: Wayne Sun
9
9
  License: Apache-2.0
10
10
  License-File: LICENSE
11
11
  Requires-Python: >=3.11
12
- Requires-Dist: cicaddy>=0.10.0
12
+ Requires-Dist: cicaddy>=0.11.0
13
13
  Requires-Dist: detect-secrets>=1.4.0
14
14
  Requires-Dist: pygithub>=2.1.0
15
15
  Provides-Extra: test
@@ -28,10 +28,33 @@ GitHub Action that wraps [cicaddy](https://github.com/waynesun09/cicaddy) for ru
28
28
  - **Sub-agent delegation** for parallel specialized reviews (security, architecture, performance, etc.)
29
29
  - **Go dependency impact analysis** for Go dependency update PRs with risk classification
30
30
  - **Changelog report generation** from git tag diffs and release notes
31
- - **Multiple AI providers**: Gemini, OpenAI, Claude, Claude via Vertex AI
31
+ - **Multiple AI providers**: Gemini, OpenAI, Claude, Claude via Vertex AI, Gemini via Vertex AI
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,17 +194,20 @@ 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
 
150
203
  | Input | Required | Description |
151
204
  |-------|----------|-------------|
152
- | `ai_provider` | Yes | AI provider: `gemini`, `openai`, `claude`, `anthropic-vertex` |
205
+ | `ai_provider` | Yes | AI provider: `gemini`, `openai`, `claude`, `anthropic-vertex`, `gemini-vertex` |
153
206
  | `ai_model` | Yes | Model identifier |
154
- | `ai_api_key` | No | AI provider API key (not needed for `anthropic-vertex`) |
155
- | `vertex_project_id` | No | GCP project ID (required for `anthropic-vertex`) |
156
- | `cloud_ml_region` | No | Vertex AI region (default: `us-east5`) |
207
+ | `ai_api_key` | No | AI provider API key (not needed for `anthropic-vertex` or `gemini-vertex`) |
208
+ | `vertex_project_id` | No | GCP project ID for Vertex AI Claude (falls back to `google_cloud_project`) |
209
+ | `google_cloud_project` | No | GCP project ID for Vertex AI (required for `gemini-vertex`, optional fallback for `anthropic-vertex`) |
210
+ | `google_cloud_location` | No | Vertex AI location (default: `global`) |
157
211
  | `task_file` | No | Path to DSPy YAML task file |
158
212
  | `task_prompt` | No | Inline task prompt (alternative to task_file) |
159
213
  | `report_template` | No | Path to custom HTML report template |
@@ -198,10 +252,16 @@ uv pip install -e ".[test]"
198
252
  **2. Create an env file** (e.g. `.env.my-review`):
199
253
 
200
254
  ```bash
201
- # AI Provider
202
- AI_PROVIDER=gemini
203
- AI_MODEL=gemini-3-flash-preview
204
- 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>
205
265
 
206
266
  # GitHub Configuration
207
267
  GITHUB_TOKEN=<your-github-token>
@@ -255,11 +315,12 @@ uv run cicaddy validate --env-file .env.my-review
255
315
 
256
316
  | Variable | Required | Description |
257
317
  |----------|----------|-------------|
258
- | `AI_PROVIDER` | Yes | `gemini`, `openai`, `claude`, or `anthropic-vertex` |
259
- | `AI_MODEL` | Yes | Model identifier (e.g. `gemini-3-flash-preview`) |
260
- | `GEMINI_API_KEY` / `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` | Yes* | API key matching the provider (*not needed for `anthropic-vertex`) |
261
- | `ANTHROPIC_VERTEX_PROJECT_ID` | No | GCP project ID (required for `anthropic-vertex`) |
262
- | `CLOUD_ML_REGION` | No | Vertex AI region (default: `us-east5`) |
318
+ | `AI_PROVIDER` | Yes | `gemini`, `openai`, `claude`, `anthropic-vertex`, or `gemini-vertex` |
319
+ | `AI_MODEL` | Yes | Model identifier (e.g. `gemini-3.5-flash`) |
320
+ | `GEMINI_API_KEY` / `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` | Yes* | API key matching the provider (*not needed for `anthropic-vertex` or `gemini-vertex`) |
321
+ | `ANTHROPIC_VERTEX_PROJECT_ID` | No | GCP project ID (required for `anthropic-vertex`, falls back to `GOOGLE_CLOUD_PROJECT`) |
322
+ | `GOOGLE_CLOUD_PROJECT` | No | GCP project ID for Vertex AI (required for `gemini-vertex`) |
323
+ | `GOOGLE_CLOUD_LOCATION` | No | Vertex AI location (default: `global`) |
263
324
  | `GITHUB_TOKEN` | Yes | GitHub personal access token |
264
325
  | `GITHUB_REPOSITORY` | Yes | Target repo in `owner/repo` format |
265
326
  | `GITHUB_EVENT_NAME` | No | Set to `pull_request` for auto-detection (optional if `GITHUB_PR_NUMBER` is set) |
@@ -271,9 +332,6 @@ uv run cicaddy validate --env-file .env.my-review
271
332
  | `SUB_AGENT_MAX_ITERS` | No | Max iterations per sub-agent, 1-15 (default: `5`) |
272
333
  | `AI_TASK_FILE` | No | Path to DSPy YAML task file for custom workflows |
273
334
  | `RUN_GOVULNCHECK` | No | Run govulncheck for reachability analysis (`true`/`false`) |
274
- | `DELEGATION_MODE` | No | `none` or `auto` for sub-agent delegation |
275
- | `MAX_SUB_AGENTS` | No | Maximum concurrent sub-agents (default: `3`) |
276
- | `SUB_AGENT_MAX_ITERS` | No | Max iterations per sub-agent (default: `10`) |
277
335
  | `DELEGATION_AGENTS_DIR` | No | Custom agent YAML directory (default: `.agents/delegation`) |
278
336
  | `DELEGATION_AGENTS` | No | JSON config for inline custom sub-agents |
279
337
  | `TRIAGE_PROMPT` | No | Custom triage instructions |
@@ -8,10 +8,33 @@ GitHub Action that wraps [cicaddy](https://github.com/waynesun09/cicaddy) for ru
8
8
  - **Sub-agent delegation** for parallel specialized reviews (security, architecture, performance, etc.)
9
9
  - **Go dependency impact analysis** for Go dependency update PRs with risk classification
10
10
  - **Changelog report generation** from git tag diffs and release notes
11
- - **Multiple AI providers**: Gemini, OpenAI, Claude, Claude via Vertex AI
11
+ - **Multiple AI providers**: Gemini, OpenAI, Claude, Claude via Vertex AI, Gemini via Vertex AI
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,17 +174,20 @@ 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
 
130
183
  | Input | Required | Description |
131
184
  |-------|----------|-------------|
132
- | `ai_provider` | Yes | AI provider: `gemini`, `openai`, `claude`, `anthropic-vertex` |
185
+ | `ai_provider` | Yes | AI provider: `gemini`, `openai`, `claude`, `anthropic-vertex`, `gemini-vertex` |
133
186
  | `ai_model` | Yes | Model identifier |
134
- | `ai_api_key` | No | AI provider API key (not needed for `anthropic-vertex`) |
135
- | `vertex_project_id` | No | GCP project ID (required for `anthropic-vertex`) |
136
- | `cloud_ml_region` | No | Vertex AI region (default: `us-east5`) |
187
+ | `ai_api_key` | No | AI provider API key (not needed for `anthropic-vertex` or `gemini-vertex`) |
188
+ | `vertex_project_id` | No | GCP project ID for Vertex AI Claude (falls back to `google_cloud_project`) |
189
+ | `google_cloud_project` | No | GCP project ID for Vertex AI (required for `gemini-vertex`, optional fallback for `anthropic-vertex`) |
190
+ | `google_cloud_location` | No | Vertex AI location (default: `global`) |
137
191
  | `task_file` | No | Path to DSPy YAML task file |
138
192
  | `task_prompt` | No | Inline task prompt (alternative to task_file) |
139
193
  | `report_template` | No | Path to custom HTML report template |
@@ -178,10 +232,16 @@ uv pip install -e ".[test]"
178
232
  **2. Create an env file** (e.g. `.env.my-review`):
179
233
 
180
234
  ```bash
181
- # AI Provider
182
- AI_PROVIDER=gemini
183
- AI_MODEL=gemini-3-flash-preview
184
- 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>
185
245
 
186
246
  # GitHub Configuration
187
247
  GITHUB_TOKEN=<your-github-token>
@@ -235,11 +295,12 @@ uv run cicaddy validate --env-file .env.my-review
235
295
 
236
296
  | Variable | Required | Description |
237
297
  |----------|----------|-------------|
238
- | `AI_PROVIDER` | Yes | `gemini`, `openai`, `claude`, or `anthropic-vertex` |
239
- | `AI_MODEL` | Yes | Model identifier (e.g. `gemini-3-flash-preview`) |
240
- | `GEMINI_API_KEY` / `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` | Yes* | API key matching the provider (*not needed for `anthropic-vertex`) |
241
- | `ANTHROPIC_VERTEX_PROJECT_ID` | No | GCP project ID (required for `anthropic-vertex`) |
242
- | `CLOUD_ML_REGION` | No | Vertex AI region (default: `us-east5`) |
298
+ | `AI_PROVIDER` | Yes | `gemini`, `openai`, `claude`, `anthropic-vertex`, or `gemini-vertex` |
299
+ | `AI_MODEL` | Yes | Model identifier (e.g. `gemini-3.5-flash`) |
300
+ | `GEMINI_API_KEY` / `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` | Yes* | API key matching the provider (*not needed for `anthropic-vertex` or `gemini-vertex`) |
301
+ | `ANTHROPIC_VERTEX_PROJECT_ID` | No | GCP project ID (required for `anthropic-vertex`, falls back to `GOOGLE_CLOUD_PROJECT`) |
302
+ | `GOOGLE_CLOUD_PROJECT` | No | GCP project ID for Vertex AI (required for `gemini-vertex`) |
303
+ | `GOOGLE_CLOUD_LOCATION` | No | Vertex AI location (default: `global`) |
243
304
  | `GITHUB_TOKEN` | Yes | GitHub personal access token |
244
305
  | `GITHUB_REPOSITORY` | Yes | Target repo in `owner/repo` format |
245
306
  | `GITHUB_EVENT_NAME` | No | Set to `pull_request` for auto-detection (optional if `GITHUB_PR_NUMBER` is set) |
@@ -251,9 +312,6 @@ uv run cicaddy validate --env-file .env.my-review
251
312
  | `SUB_AGENT_MAX_ITERS` | No | Max iterations per sub-agent, 1-15 (default: `5`) |
252
313
  | `AI_TASK_FILE` | No | Path to DSPy YAML task file for custom workflows |
253
314
  | `RUN_GOVULNCHECK` | No | Run govulncheck for reachability analysis (`true`/`false`) |
254
- | `DELEGATION_MODE` | No | `none` or `auto` for sub-agent delegation |
255
- | `MAX_SUB_AGENTS` | No | Maximum concurrent sub-agents (default: `3`) |
256
- | `SUB_AGENT_MAX_ITERS` | No | Max iterations per sub-agent (default: `10`) |
257
315
  | `DELEGATION_AGENTS_DIR` | No | Custom agent YAML directory (default: `.agents/delegation`) |
258
316
  | `DELEGATION_AGENTS` | No | JSON config for inline custom sub-agents |
259
317
  | `TRIAGE_PROMPT` | No | Custom triage instructions |
@@ -6,26 +6,31 @@ branding:
6
6
 
7
7
  inputs:
8
8
  ai_provider:
9
- description: 'AI provider: gemini, openai, claude, anthropic-vertex'
9
+ description: 'AI provider: gemini, openai, claude, anthropic-vertex, gemini-vertex'
10
10
  required: true
11
11
  ai_model:
12
12
  description: 'Model identifier'
13
13
  required: true
14
14
  ai_api_key:
15
- description: 'AI provider API key (not required for anthropic-vertex, which uses GCP ADC)'
15
+ description: 'AI provider API key (not required for anthropic-vertex or gemini-vertex, which use GCP ADC)'
16
16
  required: false
17
17
  vertex_project_id:
18
- description: 'GCP project ID for Vertex AI Claude (required when ai_provider is anthropic-vertex)'
18
+ description: 'GCP project ID for Vertex AI Claude (falls back to google_cloud_project if not set)'
19
19
  required: false
20
20
  cloud_ml_region:
21
- description: 'Vertex AI region (default: us-east5)'
21
+ description: 'DEPRECATED: Use google_cloud_location instead. Vertex AI region for anthropic-vertex.'
22
+ required: false
23
+ google_cloud_project:
24
+ description: 'GCP project ID for Vertex AI (required for gemini-vertex, optional fallback for anthropic-vertex)'
25
+ required: false
26
+ google_cloud_location:
27
+ description: 'Vertex AI location (default: global)'
22
28
  required: false
23
- default: 'us-east5'
24
29
  task_file:
25
30
  description: 'Path to DSPy YAML task file'
26
31
  required: false
27
32
  task_prompt:
28
- description: 'Inline task prompt (alternative to task-file)'
33
+ description: 'Inline task prompt (alternative to task_file)'
29
34
  required: false
30
35
  report_template:
31
36
  description: 'Path to custom HTML report template'
@@ -78,4 +83,4 @@ runs:
78
83
  using: 'docker'
79
84
  image: 'Dockerfile'
80
85
  # After first GHCR publish, switch to pre-built image for faster startup:
81
- # image: 'docker://ghcr.io/redhat-community-ai-tools/cicaddy-action:0.6.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'
@@ -45,7 +45,7 @@ uv run cicaddy run --env-file .env.my-review --delegation-mode auto --max-sub-ag
45
45
  |-----------------|---------|-------------|
46
46
  | `DELEGATION_MODE` / `delegation_mode` | `none` | `none` (single-agent) or `auto` (AI-powered delegation) |
47
47
  | `MAX_SUB_AGENTS` / `max_sub_agents` | `3` | Maximum concurrent sub-agents (1-10) |
48
- | `SUB_AGENT_MAX_ITERS` | `10` | Max inference iterations per sub-agent (1-15, env var only) |
48
+ | `SUB_AGENT_MAX_ITERS` | `5` | Max inference iterations per sub-agent (1-15, env var only) |
49
49
  | `DELEGATION_AGENTS_DIR` | `.agents/delegation` | Directory for user-defined sub-agent YAML files (env var only) |
50
50
  | `DELEGATION_AGENTS` | (empty) | JSON config for inline custom sub-agent definitions (env var only) |
51
51
  | `TRIAGE_PROMPT` | (empty) | Optional custom instructions for the triage AI (env var only) |
@@ -156,7 +156,7 @@ When using `task_file` with `delegation_mode: auto`, the task definition is prov
156
156
 
157
157
  ## Cost Considerations
158
158
 
159
- Delegation multiplies AI inference calls. With defaults (`MAX_SUB_AGENTS=3`, `SUB_AGENT_MAX_ITERS=10`), a single PR review can use up to 1 (triage) + 3×10 (sub-agents) + 1 (aggregation) = **32 AI calls** versus 1-15 for single-agent mode. Tune `MAX_SUB_AGENTS` and `SUB_AGENT_MAX_ITERS` based on your AI provider tier and rate limits.
159
+ Delegation multiplies AI inference calls. With defaults (`MAX_SUB_AGENTS=3`, `SUB_AGENT_MAX_ITERS=5`), a single PR review can use up to 1 (triage) + 3×5 (sub-agents) + 1 (aggregation) = **17 AI calls** versus 1-15 for single-agent mode. Tune `MAX_SUB_AGENTS` and `SUB_AGENT_MAX_ITERS` based on your AI provider tier and rate limits.
160
160
 
161
161
  ## Troubleshooting
162
162