|
1 | 1 | --- |
2 | 2 | title: "Agent Permissions" |
3 | 3 | sidebarTitle: "Agent Permissions" |
4 | | -icon: "user-shield" |
| 4 | +icon: "shield-check" |
5 | 5 | --- |
6 | 6 |
|
7 | | -Agent Permissions allow you to configure what actions the AI agent is allowed to perform across your organization. These settings provide fine-grained control over the agent's capabilities, ensuring it operates within your team's preferred workflows and security boundaries. |
| 7 | +Configure what actions the AI agent is allowed to perform across your organization. These permission settings provide fine-grained control over agent capabilities to ensure they operate within your security and workflow requirements. |
8 | 8 |
|
9 | | -## Accessing Agent Permissions |
| 9 | +## Available Permissions |
10 | 10 |
|
11 | | -Agent Permission settings are applied globally for your entire organization. You can access and modify these settings by navigating to: |
| 11 | +### Enable PR Creation |
12 | 12 |
|
13 | | -[**codegen.com/settings/permissions**](https://codegen.com/settings/permissions) |
| 13 | +Control whether the codegen agent is able to create pull requests in your repositories in response to user requests. |
14 | 14 |
|
15 | | -<Frame caption="Agent Permissions UI at codegen.com/settings/permissions"> |
16 | | - <img src="/images/agent-permissions.png" alt="Agent Permissions Configuration" /> |
17 | | -</Frame> |
| 15 | +**When enabled:** |
18 | 16 |
|
19 | | -## Available Permission Settings |
| 17 | +- Agents can create new pull requests with code changes |
| 18 | +- PRs include detailed descriptions and context |
| 19 | +- Automatic linking to related issues and discussions |
| 20 | +- Supports your standard code review workflow |
20 | 21 |
|
21 | | -### Enable PR Creation |
| 22 | +**When disabled:** |
| 23 | + |
| 24 | +- Agents can still analyze code and provide suggestions |
| 25 | +- Code changes are proposed but not committed |
| 26 | +- Manual PR creation required for implementing changes |
| 27 | +- Useful for read-only or advisory agent roles |
22 | 28 |
|
23 | | -**Control whether the codegen agent is able to create pull requests in your repositories in response to user requests.** |
| 29 | +### Enable Rules Detection |
24 | 30 |
|
25 | | -When enabled, the agent can automatically create pull requests when implementing features, fixing bugs, or making other code changes. When disabled, the agent will make changes locally but won't create PRs, requiring manual PR creation. |
| 31 | +Allow the agent to automatically detect and apply rules from various rule files in your repositories. |
26 | 32 |
|
27 | | -- **Default**: Enabled |
28 | | -- **Use Case**: Disable if you prefer manual PR creation or have strict PR workflows |
| 33 | +**Supported rule file formats:** |
29 | 34 |
|
30 | | -### Enable Rules Detection |
| 35 | +- `.cursorrules` - Cursor AI editor rules |
| 36 | +- `.cursor/rules/*.mdc` - Structured rule files in Cursor directory |
| 37 | +- `.windsurfrules` - Windsurf AI editor rules |
| 38 | +- `CLAUDE.md` - Claude-specific instructions |
| 39 | +- `AGENTS.md` - General agent instructions |
| 40 | +- `AGENT.md` - Agent-specific rules |
| 41 | + |
| 42 | +**When enabled:** |
| 43 | + |
| 44 | +- Agents automatically discover and apply repository-specific rules |
| 45 | +- Rules are version-controlled alongside your code |
| 46 | +- Consistent behavior across team members and environments |
| 47 | +- Supports existing AI editor workflows |
| 48 | + |
| 49 | +**When disabled:** |
| 50 | + |
| 51 | +- Only manually configured repository rules are applied |
| 52 | +- No automatic file-based rule detection |
| 53 | +- Simpler rule management through web interface only |
| 54 | + |
| 55 | +### Enforce Organization-wide Signed Commits |
| 56 | + |
| 57 | +When enabled, **ALL** repositories in this organization will be required to use signed commits via GitHub's API. Individual repositories cannot override this security policy. |
| 58 | + |
| 59 | +**Security benefits:** |
| 60 | + |
| 61 | +- Cryptographic verification of commit authenticity |
| 62 | +- Enhanced audit trail for code changes |
| 63 | +- Compliance with security policies requiring commit signing |
| 64 | +- Protection against commit impersonation |
| 65 | + |
| 66 | +**Important considerations:** |
| 67 | + |
| 68 | +- This is an organization-wide enforcement policy |
| 69 | +- Individual repositories cannot disable this requirement |
| 70 | +- Ensures consistent security posture across all projects |
| 71 | +- May require additional setup for team members' GPG keys |
| 72 | + |
| 73 | +<Warning> |
| 74 | + Enabling organization-wide signed commits affects all repositories and cannot |
| 75 | + be overridden at the repository level. Ensure your team is prepared for this |
| 76 | + requirement before enabling. |
| 77 | +</Warning> |
| 78 | + |
| 79 | +## Configuration |
| 80 | + |
| 81 | +Agent permissions are configured at the organization level and provide security boundaries for all agent operations within your organization. |
| 82 | + |
| 83 | +Access your agent permissions at: |
| 84 | + |
| 85 | +<Card |
| 86 | + title="Configure Agent Permissions" |
| 87 | + icon="shield-check" |
| 88 | + href="https://codegen.com/settings/permissions" |
| 89 | +> |
| 90 | + Control what actions agents are allowed to perform in your organization. |
| 91 | +</Card> |
| 92 | + |
| 93 | +## Permission Combinations |
| 94 | + |
| 95 | +### Development Teams |
31 | 96 |
|
32 | | -**Allow the agent to automatically detect and apply rules from .cursorrules and .windsurfrules files in your repositories.** |
| 97 | +``` |
| 98 | +✅ Enable PR Creation |
| 99 | +✅ Enable Rules Detection |
| 100 | +❌ Enforce Signed Commits (unless required) |
| 101 | +``` |
33 | 102 |
|
34 | | -This setting enables the agent to automatically discover and follow coding standards, style guides, and other rules defined in your repository's configuration files. |
| 103 | +Standard setup for most development teams wanting full agent capabilities. |
35 | 104 |
|
36 | | -- **Default**: Enabled |
37 | | -- **Use Case**: Disable if you want to manually control rule application or don't use these rule files |
| 105 | +### Security-Conscious Organizations |
38 | 106 |
|
39 | | -### Enable Linear Self-Assign |
| 107 | +``` |
| 108 | +✅ Enable PR Creation |
| 109 | +✅ Enable Rules Detection |
| 110 | +✅ Enforce Signed Commits |
| 111 | +``` |
40 | 112 |
|
41 | | -**Allow the codegen agent to self-assign Linear issues, enabling it to spin off other agents.** |
| 113 | +Maximum security with full agent functionality and commit verification. |
42 | 114 |
|
43 | | -When enabled, the agent can assign itself to Linear issues and potentially delegate work to other agent instances for parallel processing. |
| 115 | +### Read-Only Advisory Mode |
44 | 116 |
|
45 | | -- **Default**: Enabled |
46 | | -- **Use Case**: Disable if you prefer manual issue assignment or want to limit agent autonomy |
| 117 | +``` |
| 118 | +❌ Enable PR Creation |
| 119 | +✅ Enable Rules Detection |
| 120 | +❌ Enforce Signed Commits |
| 121 | +``` |
47 | 122 |
|
48 | | -### Enable Linear Auto State Change |
| 123 | +Agents provide analysis and suggestions without making direct code changes. |
49 | 124 |
|
50 | | -**When enabled, the agent will automatically move Linear issues to 'Started' state when self-assigning them.** |
| 125 | +### Compliance-First Approach |
51 | 126 |
|
52 | | -This setting automates the workflow by updating issue status when the agent begins work, providing better visibility into what the agent is actively working on. |
| 127 | +``` |
| 128 | +✅ Enable PR Creation |
| 129 | +❌ Enable Rules Detection |
| 130 | +✅ Enforce Signed Commits |
| 131 | +``` |
53 | 132 |
|
54 | | -- **Default**: Disabled |
55 | | -- **Use Case**: Enable for automatic issue tracking and improved project visibility |
| 133 | +Strict control with manual rule management and required commit signing. |
56 | 134 |
|
57 | 135 | ## Best Practices |
58 | 136 |
|
59 | | -### Security Considerations |
| 137 | +**Start Conservative:** |
60 | 138 |
|
61 | | -- Review permission settings regularly to ensure they align with your team's security policies |
62 | | -- Consider disabling PR creation in production environments if you require manual review processes |
63 | | -- Monitor agent activity when enabling self-assignment features |
| 139 | +- Begin with limited permissions and expand as trust builds |
| 140 | +- Enable rules detection to leverage existing team practices |
| 141 | +- Consider PR creation permissions based on repository criticality |
64 | 142 |
|
65 | | -### Workflow Integration |
| 143 | +**Security Considerations:** |
66 | 144 |
|
67 | | -- Enable Linear Auto State Change if your team relies on Linear for project tracking |
68 | | -- Coordinate permission settings with your existing CI/CD and review processes |
69 | | -- Consider your team's preferred level of automation when configuring these settings |
| 145 | +- Enable signed commits for organizations with compliance requirements |
| 146 | +- Review agent-created PRs before merging, especially initially |
| 147 | +- Monitor agent activity through analytics and audit logs |
70 | 148 |
|
71 | | -## Related Documentation |
| 149 | +**Team Alignment:** |
72 | 150 |
|
73 | | -- [Repository Rules](/settings/repo-rules) - Configure repository-specific behavior |
74 | | -- [Linear Integration](/integrations/linear) - Set up Linear workspace integration |
75 | | -- [Model Configuration](/settings/model-configuration) - Configure LLM settings |
| 151 | +- Ensure team understands which permissions are enabled |
| 152 | +- Provide training on rule file formats if using rules detection |
| 153 | +- Establish clear processes for agent-created PRs |
76 | 154 |
|
| 155 | +<Note> |
| 156 | + Permission settings provide essential guardrails for agent operations while |
| 157 | + maintaining the flexibility to customize based on your organization's security |
| 158 | + and workflow requirements. |
| 159 | +</Note> |
0 commit comments