Repository navigation
chore(MSDK-4510): Set default read-only permissions in claude workflow - #265
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
PR Summary by QodoDefault Claude workflow permissions to read-only
AI Description
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Workflow hardening leaves the Claude job's write scopes unchanged
|
|
PR Summary: Set repository-level default permissions to read-only in the Claude workflow; the claude job still overrides and grants the specific write scopes it requires.
|
|
Reviewed up to commit:65c8137b10568f42550b89c98ed6b7a2c6e80ff1 Additional SuggestionOthers- Add a brief comment in the PR or directly above the top-level permissions block stating the intent and the tracked ticket (MSDK-4510) and rule being addressed (e.g. CKV2_GHA_1). This helps future reviewers understand why the default was tightened and avoids accidental reversion.# Default to read-only for any job; tightened per MSDK-4510 to satisfy CKV2_GHA_1.
permissions:
contents: read |
User description
Summary
permissions: contents: readto.github/workflows/claude.yml, so any job without its own block defaults to read-only.claudejob keeps its existing job-level permissions (contents,pull-requests,id-tokenwrite;actionsread), whichclaude-code-actionneeds. No behaviour change for the integration.Addresses the Apiiro / Checkov finding
CKV2_GHA_1("Ensure top-level permissions are not set to write-all") tracked in MSDK-4510.Notes
permissionsblock before and nowrite-allanywhere; the finding points at the job-level block (line 34). This change is least-privilege hardening and is expected to satisfy a top-level check, but Checkov was not run locally, so please confirm in Apiiro after merge.@claude, so it was not exercised in CI here. YAML parses correctly.🤖 Generated with Claude Code
CodeAnt-AI Description
Set read-only default permissions for the Claude workflow
What Changed
Impact
✅ Reduced default workflow write access✅ Claude workflow permissions remain unchanged💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit