@intentsolutionsio/jeremy-github-actions-gcp 2.1.0
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.
- package/.claude-plugin/plugin.json +25 -0
- package/LICENSE +21 -0
- package/README.md +410 -0
- package/agents/gh-actions-gcp-expert.md +599 -0
- package/hooks/hooks.json +26 -0
- package/package.json +48 -0
- package/scripts/validate-workflow.sh +72 -0
- package/skills/gh-actions-validator/SKILL.md +62 -0
- package/skills/gh-actions-validator/references/ARD.md +72 -0
- package/skills/gh-actions-validator/references/PRD.md +67 -0
- package/skills/gh-actions-validator/references/errors.md +24 -0
- package/skills/gh-actions-validator/references/examples.md +8 -0
- package/skills/gh-actions-validator/scripts/setup-wif.sh +59 -0
- package/skills/gh-actions-validator/scripts/validate-workflow.sh +56 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jeremy-github-actions-gcp",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "GitHub Actions CI/CD workflows for Google Cloud and Vertex AI deployments",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Jeremy Longshore",
|
|
7
|
+
"email": "jeremy@intentsolutions.io"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/jeremylongshore/claude-code-plugins",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"github-actions",
|
|
13
|
+
"google-cloud",
|
|
14
|
+
"workload-identity-federation",
|
|
15
|
+
"wif",
|
|
16
|
+
"vertex-ai",
|
|
17
|
+
"agent-engine",
|
|
18
|
+
"deployment",
|
|
19
|
+
"ci-cd",
|
|
20
|
+
"security",
|
|
21
|
+
"best-practices",
|
|
22
|
+
"oidc",
|
|
23
|
+
"iam"
|
|
24
|
+
]
|
|
25
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jeremy Longshore
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
# Jeremy GitHub Actions GCP
|
|
2
|
+
|
|
3
|
+
GitHub Actions expert for Google Cloud and Vertex AI deployments with Workload Identity Federation (WIF), comprehensive security validation, and deployment best practices enforcement.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This plugin ensures secure, production-ready CI/CD pipelines for Vertex AI Agent Engine and Google Cloud services. It enforces Workload Identity Federation (WIF) instead of JSON service account keys, validates post-deployment health, and implements GitHub Actions best practices.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
/plugin install jeremy-github-actions-gcp@claude-code-plugins-plus
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
✅ **Workload Identity Federation (WIF)**: Keyless authentication from GitHub to GCP
|
|
18
|
+
✅ **Vertex AI Agent Engine**: Automated deployment and validation pipelines
|
|
19
|
+
✅ **Security Enforcement**: No JSON keys, least privilege IAM, secrets scanning
|
|
20
|
+
✅ **Post-Deployment Validation**: Comprehensive health checks for deployed agents
|
|
21
|
+
✅ **A2A Protocol Compliance**: AgentCard validation and endpoint testing
|
|
22
|
+
✅ **Automated Hooks**: Pre-commit validation of workflow files
|
|
23
|
+
✅ **Best Practices**: OIDC permissions, security scanning, monitoring setup
|
|
24
|
+
|
|
25
|
+
## Components
|
|
26
|
+
|
|
27
|
+
### Agent
|
|
28
|
+
- **gh-actions-gcp-expert**: Expert in GitHub Actions for Vertex AI / GCP deployments
|
|
29
|
+
|
|
30
|
+
### Skills (Auto-Activating)
|
|
31
|
+
- **gh-actions-validator**: Validates and enforces GitHub Actions best practices
|
|
32
|
+
- **Tool Permissions**: Read, Write, Edit, Grep, Glob, Bash
|
|
33
|
+
- **Version**: 1.0.0 (2026 schema compliant)
|
|
34
|
+
|
|
35
|
+
### Hooks
|
|
36
|
+
- **PreToolUse**: Validates workflow files before writing/editing
|
|
37
|
+
- Triggers on: `.github/workflows/*.yml`, `.github/workflows/*.yaml`
|
|
38
|
+
- Runs: `scripts/validate-workflow.sh`
|
|
39
|
+
|
|
40
|
+
## Quick Start
|
|
41
|
+
|
|
42
|
+
### Natural Language Activation
|
|
43
|
+
|
|
44
|
+
Simply mention what you need:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
"Create GitHub Actions workflow for Vertex AI deployment"
|
|
48
|
+
"Set up Workload Identity Federation for my project"
|
|
49
|
+
"Deploy ADK agent to Vertex AI Engine with CI/CD"
|
|
50
|
+
"Validate my GitHub Actions security"
|
|
51
|
+
"Automate Vertex AI agent deployment"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The skill auto-activates and enforces best practices.
|
|
55
|
+
|
|
56
|
+
## Validation Rules Enforced
|
|
57
|
+
|
|
58
|
+
### 1. Workload Identity Federation (WIF) Mandatory
|
|
59
|
+
|
|
60
|
+
❌ **NEVER ALLOWED - JSON Service Account Keys**:
|
|
61
|
+
```yaml
|
|
62
|
+
# ❌ FORBIDDEN
|
|
63
|
+
- uses: google-github-actions/auth@v2
|
|
64
|
+
with:
|
|
65
|
+
credentials_json: ${{ secrets.GCP_SA_KEY }} # ❌ BLOCKS HOOK
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
✅ **REQUIRED - WIF with OIDC**:
|
|
69
|
+
```yaml
|
|
70
|
+
# ✅ ENFORCED
|
|
71
|
+
permissions:
|
|
72
|
+
id-token: write # ✅ REQUIRED for WIF
|
|
73
|
+
|
|
74
|
+
- uses: google-github-actions/auth@v2
|
|
75
|
+
with:
|
|
76
|
+
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
|
|
77
|
+
service_account: ${{ secrets.WIF_SERVICE_ACCOUNT }}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 2. OIDC Permissions Required
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
# ✅ ENFORCED - Must have id-token: write
|
|
84
|
+
permissions:
|
|
85
|
+
contents: read
|
|
86
|
+
id-token: write # REQUIRED for WIF
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 3. IAM Least Privilege
|
|
90
|
+
|
|
91
|
+
❌ **Overly Permissive Roles Blocked**:
|
|
92
|
+
- `roles/owner` - ❌ Blocked
|
|
93
|
+
- `roles/editor` - ❌ Blocked
|
|
94
|
+
|
|
95
|
+
✅ **Least Privilege Roles Required**:
|
|
96
|
+
- `roles/run.admin` - Cloud Run deployments
|
|
97
|
+
- `roles/iam.serviceAccountUser` - Service account impersonation
|
|
98
|
+
- `roles/aiplatform.user` - Vertex AI operations
|
|
99
|
+
|
|
100
|
+
### 4. Post-Deployment Validation
|
|
101
|
+
|
|
102
|
+
For Vertex AI deployments, validation is **REQUIRED**:
|
|
103
|
+
```yaml
|
|
104
|
+
- name: Post-Deployment Validation
|
|
105
|
+
run: |
|
|
106
|
+
python scripts/validate-deployment.py \
|
|
107
|
+
--agent-id=production-agent
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Validation Checklist**:
|
|
111
|
+
- ✅ Agent state is RUNNING
|
|
112
|
+
- ✅ Code Execution Sandbox enabled (7-14 day TTL)
|
|
113
|
+
- ✅ Memory Bank configured
|
|
114
|
+
- ✅ A2A Protocol compliant (AgentCard accessible)
|
|
115
|
+
- ✅ Model Armor enabled (prompt injection protection)
|
|
116
|
+
- ✅ VPC Service Controls configured
|
|
117
|
+
- ✅ Service account has minimal permissions
|
|
118
|
+
- ✅ Monitoring and alerting configured
|
|
119
|
+
|
|
120
|
+
### 5. Security Scanning
|
|
121
|
+
|
|
122
|
+
**Recommended** (warnings if missing):
|
|
123
|
+
```yaml
|
|
124
|
+
- name: Scan for secrets
|
|
125
|
+
uses: trufflesecurity/trufflehog@main
|
|
126
|
+
|
|
127
|
+
- name: Vulnerability scanning
|
|
128
|
+
uses: aquasecurity/trivy-action@master
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Workflow Templates
|
|
132
|
+
|
|
133
|
+
### Template 1: Vertex AI Agent Engine Deployment
|
|
134
|
+
|
|
135
|
+
```yaml
|
|
136
|
+
name: Deploy Vertex AI Agent
|
|
137
|
+
|
|
138
|
+
on:
|
|
139
|
+
push:
|
|
140
|
+
branches: [main]
|
|
141
|
+
paths:
|
|
142
|
+
- 'agent/**'
|
|
143
|
+
|
|
144
|
+
permissions:
|
|
145
|
+
contents: read
|
|
146
|
+
id-token: write
|
|
147
|
+
|
|
148
|
+
env:
|
|
149
|
+
AGENT_ID: 'production-agent'
|
|
150
|
+
REGION: 'us-central1'
|
|
151
|
+
|
|
152
|
+
jobs:
|
|
153
|
+
deploy:
|
|
154
|
+
runs-on: ubuntu-latest
|
|
155
|
+
|
|
156
|
+
steps:
|
|
157
|
+
- name: Checkout
|
|
158
|
+
uses: actions/checkout@v4
|
|
159
|
+
|
|
160
|
+
- name: Authenticate to GCP (WIF)
|
|
161
|
+
uses: google-github-actions/auth@v2
|
|
162
|
+
with:
|
|
163
|
+
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
|
|
164
|
+
service_account: ${{ secrets.WIF_SERVICE_ACCOUNT }}
|
|
165
|
+
|
|
166
|
+
- name: Set up Python
|
|
167
|
+
uses: actions/setup-python@v5
|
|
168
|
+
with:
|
|
169
|
+
python-version: '3.11'
|
|
170
|
+
cache: 'pip'
|
|
171
|
+
|
|
172
|
+
- name: Install dependencies
|
|
173
|
+
run: pip install -r requirements.txt
|
|
174
|
+
|
|
175
|
+
- name: Validate Agent Config
|
|
176
|
+
run: python scripts/validate-agent-config.py
|
|
177
|
+
|
|
178
|
+
- name: Deploy to Vertex AI Engine
|
|
179
|
+
run: |
|
|
180
|
+
python scripts/deploy-agent.py \
|
|
181
|
+
--project-id=${{ secrets.GCP_PROJECT_ID }} \
|
|
182
|
+
--agent-id=${{ env.AGENT_ID }}
|
|
183
|
+
|
|
184
|
+
- name: Post-Deployment Validation
|
|
185
|
+
run: |
|
|
186
|
+
python scripts/validate-deployment.py \
|
|
187
|
+
--agent-id=${{ env.AGENT_ID }}
|
|
188
|
+
|
|
189
|
+
- name: Setup Monitoring
|
|
190
|
+
run: |
|
|
191
|
+
python scripts/setup-monitoring.py \
|
|
192
|
+
--agent-id=${{ env.AGENT_ID }}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Template 2: WIF Setup (One-Time)
|
|
196
|
+
|
|
197
|
+
```yaml
|
|
198
|
+
name: Setup Workload Identity Federation
|
|
199
|
+
|
|
200
|
+
on:
|
|
201
|
+
workflow_dispatch:
|
|
202
|
+
|
|
203
|
+
permissions:
|
|
204
|
+
contents: read
|
|
205
|
+
|
|
206
|
+
jobs:
|
|
207
|
+
setup-wif:
|
|
208
|
+
runs-on: ubuntu-latest
|
|
209
|
+
|
|
210
|
+
steps:
|
|
211
|
+
- name: Checkout
|
|
212
|
+
uses: actions/checkout@v4
|
|
213
|
+
|
|
214
|
+
- name: Authenticate (one-time setup key)
|
|
215
|
+
uses: google-github-actions/auth@v2
|
|
216
|
+
with:
|
|
217
|
+
credentials_json: ${{ secrets.GCP_SETUP_KEY }}
|
|
218
|
+
|
|
219
|
+
- name: Run WIF setup script
|
|
220
|
+
run: bash scripts/setup-wif.sh
|
|
221
|
+
|
|
222
|
+
- name: Output WIF configuration
|
|
223
|
+
run: cat wif-config.txt
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Template 3: Security Validation
|
|
227
|
+
|
|
228
|
+
```yaml
|
|
229
|
+
name: Security Checks
|
|
230
|
+
|
|
231
|
+
on:
|
|
232
|
+
pull_request:
|
|
233
|
+
push:
|
|
234
|
+
branches: [main]
|
|
235
|
+
|
|
236
|
+
permissions:
|
|
237
|
+
contents: read
|
|
238
|
+
security-events: write
|
|
239
|
+
|
|
240
|
+
jobs:
|
|
241
|
+
security:
|
|
242
|
+
runs-on: ubuntu-latest
|
|
243
|
+
|
|
244
|
+
steps:
|
|
245
|
+
- name: Checkout
|
|
246
|
+
uses: actions/checkout@v4
|
|
247
|
+
|
|
248
|
+
- name: Scan for secrets
|
|
249
|
+
uses: trufflesecurity/trufflehog@main
|
|
250
|
+
|
|
251
|
+
- name: Vulnerability scan
|
|
252
|
+
uses: aquasecurity/trivy-action@master
|
|
253
|
+
with:
|
|
254
|
+
scan-type: 'fs'
|
|
255
|
+
format: 'sarif'
|
|
256
|
+
output: 'trivy-results.sarif'
|
|
257
|
+
|
|
258
|
+
- name: Upload to GitHub Security
|
|
259
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
260
|
+
with:
|
|
261
|
+
sarif_file: 'trivy-results.sarif'
|
|
262
|
+
|
|
263
|
+
- name: Validate no service account keys
|
|
264
|
+
run: |
|
|
265
|
+
if find . -name "*service-account*.json"; then
|
|
266
|
+
echo "❌ Service account keys detected"
|
|
267
|
+
exit 1
|
|
268
|
+
fi
|
|
269
|
+
|
|
270
|
+
- name: Validate WIF usage
|
|
271
|
+
run: |
|
|
272
|
+
if grep -r "credentials_json" .github/workflows/; then
|
|
273
|
+
echo "❌ JSON credentials detected (use WIF)"
|
|
274
|
+
exit 1
|
|
275
|
+
fi
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
## Hook Validation
|
|
279
|
+
|
|
280
|
+
The plugin includes a **PreToolUse** hook that validates workflow files **before** they're written:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
# Automatically runs on .github/workflows/*.yml files
|
|
284
|
+
|
|
285
|
+
scripts/validate-workflow.sh <workflow-file>
|
|
286
|
+
|
|
287
|
+
# Validates:
|
|
288
|
+
# ✅ No JSON service account keys (credentials_json)
|
|
289
|
+
# ✅ OIDC permissions present (id-token: write)
|
|
290
|
+
# ✅ No overly permissive IAM roles (owner/editor)
|
|
291
|
+
# ✅ No hardcoded credentials
|
|
292
|
+
# ⚠️ Vertex AI deployments have validation steps
|
|
293
|
+
# ⚠️ Production workflows have security scanning
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
## Use Cases
|
|
297
|
+
|
|
298
|
+
### Use Case 1: Migrate from JSON Keys to WIF
|
|
299
|
+
|
|
300
|
+
**Problem**: Using insecure JSON service account keys in workflows
|
|
301
|
+
|
|
302
|
+
**Solution**: Plugin enforces WIF and blocks JSON keys
|
|
303
|
+
```
|
|
304
|
+
User: "Create deployment workflow for Vertex AI"
|
|
305
|
+
|
|
306
|
+
Plugin provides:
|
|
307
|
+
1. WIF-based authentication workflow
|
|
308
|
+
2. One-time WIF setup script
|
|
309
|
+
3. Post-deployment validation
|
|
310
|
+
4. Hook prevents JSON key usage
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Use Case 2: Secure Vertex AI Deployment
|
|
314
|
+
|
|
315
|
+
**Problem**: Need production-ready CI/CD for ADK agents
|
|
316
|
+
|
|
317
|
+
**Solution**: Comprehensive deployment pipeline with validation
|
|
318
|
+
```
|
|
319
|
+
User: "Deploy my ADK agent to Vertex AI Engine"
|
|
320
|
+
|
|
321
|
+
Plugin provides:
|
|
322
|
+
1. GitHub Actions workflow with WIF
|
|
323
|
+
2. Pre-deployment config validation
|
|
324
|
+
3. Automated deployment script
|
|
325
|
+
4. Post-deployment health checks
|
|
326
|
+
5. Monitoring dashboard setup
|
|
327
|
+
6. A2A protocol validation
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### Use Case 3: Enforce Security Best Practices
|
|
331
|
+
|
|
332
|
+
**Problem**: Workflows missing security scanning or using weak IAM
|
|
333
|
+
|
|
334
|
+
**Solution**: Hook validation + skill enforcement
|
|
335
|
+
```
|
|
336
|
+
User: "Update my deployment workflow"
|
|
337
|
+
|
|
338
|
+
Plugin validates:
|
|
339
|
+
1. No JSON keys (blocks if found)
|
|
340
|
+
2. OIDC permissions required
|
|
341
|
+
3. IAM least privilege
|
|
342
|
+
4. Security scanning recommended
|
|
343
|
+
5. Post-deployment validation required
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
## Integration with Other Plugins
|
|
347
|
+
|
|
348
|
+
### jeremy-adk-orchestrator
|
|
349
|
+
- Provides CI/CD for ADK agent deployments
|
|
350
|
+
- Automates A2A protocol validation
|
|
351
|
+
|
|
352
|
+
### jeremy-vertex-validator
|
|
353
|
+
- GitHub Actions calls validator for post-deployment checks
|
|
354
|
+
- Production readiness scoring
|
|
355
|
+
|
|
356
|
+
### jeremy-vertex-engine
|
|
357
|
+
- CI/CD triggers vertex-engine-inspector
|
|
358
|
+
- Continuous health monitoring
|
|
359
|
+
|
|
360
|
+
### jeremy-adk-terraform
|
|
361
|
+
- GitHub Actions deploys Terraform infrastructure
|
|
362
|
+
- Automated provisioning
|
|
363
|
+
|
|
364
|
+
## Best Practices Summary
|
|
365
|
+
|
|
366
|
+
### Security (ENFORCED)
|
|
367
|
+
✅ Workload Identity Federation (WIF) - no JSON keys
|
|
368
|
+
✅ OIDC permissions (`id-token: write`)
|
|
369
|
+
✅ IAM least privilege (no owner/editor)
|
|
370
|
+
✅ Attribute-based access control
|
|
371
|
+
✅ No hardcoded credentials
|
|
372
|
+
✅ Secrets scanning (Trufflehog)
|
|
373
|
+
✅ Vulnerability scanning (Trivy)
|
|
374
|
+
|
|
375
|
+
### Vertex AI Specific (ENFORCED)
|
|
376
|
+
✅ Code Execution Sandbox (7-14 day TTL)
|
|
377
|
+
✅ Memory Bank enabled
|
|
378
|
+
✅ A2A Protocol compliance
|
|
379
|
+
✅ Model Armor enabled
|
|
380
|
+
✅ Post-deployment validation
|
|
381
|
+
✅ Monitoring dashboards
|
|
382
|
+
✅ Alerting policies
|
|
383
|
+
|
|
384
|
+
### CI/CD (RECOMMENDED)
|
|
385
|
+
✅ Conditional job execution
|
|
386
|
+
✅ Dependency caching
|
|
387
|
+
✅ Concurrent jobs
|
|
388
|
+
✅ Rollback strategies
|
|
389
|
+
✅ Health check endpoints
|
|
390
|
+
|
|
391
|
+
## Requirements
|
|
392
|
+
|
|
393
|
+
- Google Cloud Project with Vertex AI enabled
|
|
394
|
+
- GitHub repository with Actions enabled
|
|
395
|
+
- WIF configured (one-time setup)
|
|
396
|
+
- Python 3.10+ (for deployment scripts)
|
|
397
|
+
- gcloud CLI
|
|
398
|
+
|
|
399
|
+
## License
|
|
400
|
+
|
|
401
|
+
MIT
|
|
402
|
+
|
|
403
|
+
## Support
|
|
404
|
+
|
|
405
|
+
- Issues: https://github.com/jeremylongshore/claude-code-plugins/issues
|
|
406
|
+
- Discussions: https://github.com/jeremylongshore/claude-code-plugins/discussions
|
|
407
|
+
|
|
408
|
+
## Version
|
|
409
|
+
|
|
410
|
+
1.0.0 (2025) - Initial release with WIF enforcement, Vertex AI validation, security scanning, and automated hooks
|