Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pkg/cli/workflows/test-ai-inference-github-models.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions pkg/cli/workflows/test-claude-add-issue-comment.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions pkg/cli/workflows/test-claude-add-issue-labels.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions pkg/cli/workflows/test-claude-command.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions pkg/cli/workflows/test-claude-create-issue.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions pkg/cli/workflows/test-claude-create-pull-request.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions pkg/cli/workflows/test-claude-mcp.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions pkg/cli/workflows/test-claude-push-to-pr-branch.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions pkg/cli/workflows/test-claude-update-issue.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions pkg/cli/workflows/test-playwright-accessibility-contrast.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion pkg/workflow/claude_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ import (
// ClaudeSettingsGenerator generates Claude Code settings configurations
type ClaudeSettingsGenerator struct{}

// PermissionsConfiguration represents the permissions section of Claude settings
type PermissionsConfiguration struct {
Allow []string `json:"allow,omitempty"`
Deny []string `json:"deny,omitempty"`
}

// ClaudeSettings represents the structure of Claude Code settings.json
type ClaudeSettings struct {
Hooks *HookConfiguration `json:"hooks,omitempty"`
Permissions *PermissionsConfiguration `json:"permissions,omitempty"`
Hooks *HookConfiguration `json:"hooks,omitempty"`
}

// HookConfiguration represents the hooks section of settings
Expand All @@ -34,6 +41,19 @@ type HookEntry struct {
// GenerateSettingsJSON generates Claude Code settings JSON for network permissions
func (g *ClaudeSettingsGenerator) GenerateSettingsJSON() string {
settings := ClaudeSettings{
Permissions: &PermissionsConfiguration{
Allow: []string{
"Bash(npm run lint)",
"Bash(npm run test:*)",
"Read(~/.zshrc)",
},
Deny: []string{
"Bash(curl:*)",
"Read(./.env)",
"Read(./.env.*)",
"Read(./secrets/**)",
},
},
Hooks: &HookConfiguration{
PreToolUse: []PreToolUseHook{
{
Expand Down
Loading
Loading