You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add Claude code review workflow with per-repo API key security
- Add reusable claude-code-review.yml workflow with configurable review focus
- Require each repository to provide its own ANTHROPIC_API_KEY secret
- Implement cost tracking and security isolation through per-repo API keys
- Add comprehensive documentation with setup instructions
- Include example workflow for consuming repositories
- Enhance test validation to check secret requirements in reusable workflows
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
prompt="Please review these files for security vulnerabilities, potential exploits, and security best practices. Focus on: authentication, authorization, input validation, data sanitization, and secrets handling."
82
+
;;
83
+
"performance")
84
+
prompt="Please review these files for performance issues, inefficient algorithms, memory leaks, and optimization opportunities."
85
+
;;
86
+
"best-practices")
87
+
prompt="Please review these files for code quality, maintainability, and adherence to best practices for the respective languages and frameworks."
88
+
;;
89
+
*)
90
+
prompt="Please review these files for code quality, potential bugs, security issues, and suggest improvements."
Reusable Claude AI GitHub Actions workflows and config for dotCMS and related projects
3
+
4
+
## Important: Security and Cost Management
5
+
6
+
**⚠️ API Key Requirement**: All workflows in this repository require each consuming repository to provide its own Anthropic API key. This is a mandatory security and cost management requirement.
7
+
8
+
**Why we require per-repository API keys:**
9
+
10
+
1.**Cost Tracking & Accountability**: Each repository's Claude AI usage is tracked separately in the Anthropic console, allowing for detailed cost attribution and budget management per project.
11
+
12
+
2.**Security Isolation**: If a repository experiences unauthorized or excessive usage, it only affects that repository's API key and budget, not a shared organizational key.
13
+
14
+
3.**Usage Control**: Individual repositories can set their own API limits and monitoring, preventing runaway costs from affecting other projects.
15
+
16
+
4.**Compliance**: Many organizations require API key isolation for audit trails and security compliance.
17
+
18
+
**What this means for you:**
19
+
- You **must** configure an `ANTHROPIC_API_KEY` secret in your repository
20
+
- You **must** pass this secret to the reusable workflow in the `secrets:` section
21
+
- The workflow will **fail** if the API key is not provided
22
+
- Each repository is responsible for its own API costs and usage
23
+
24
+
## Available Workflows
25
+
26
+
### Claude Code Review (`claude-code-review.yml`)
27
+
Provides AI-powered code review using Claude AI for pull requests and commits.
| `files_to_review` | Comma-separated list of specific files to review | No | All changed files |
84
+
| `review_focus` | Review focus area | No | `general` |
85
+
| `max_files` | Maximum number of files to review | No | `10` |
86
+
87
+
**Review Focus Options:**
88
+
- `general`: Overall code quality, bugs, and improvements
89
+
- `security`: Security vulnerabilities and best practices
90
+
- `performance`: Performance issues and optimizations
91
+
- `best-practices`: Code quality and maintainability
92
+
93
+
### 4. Required Secrets
94
+
95
+
| Secret | Description | Required | Notes |
96
+
|--------|-------------|----------|-------|
97
+
| `ANTHROPIC_API_KEY` | Your repository's Anthropic API key | **Yes** | Must be configured in each consuming repository. The workflow will fail without this secret. |
98
+
99
+
**⚠️ Critical**: The `ANTHROPIC_API_KEY` secret is mandatory and must be passed to the reusable workflow. This is not optional - it's a security and cost management requirement. See the "Security and Cost Management" section above for details.
100
+
101
+
## Examples
102
+
103
+
See the `examples/` directory for complete workflow examples.
0 commit comments