Back to Skills

claude-security-settings

verified

Configure Claude Code security settings including permission wildcards, shell operator protections, and project-level access controls. Use when setting up project permissions, configuring allowed tools, or securing Claude Code workflows.

View on GitHub

Marketplace

laurigates-plugins

laurigates/claude-plugins

Plugin

configure-plugin

infrastructure

Repository

laurigates/claude-plugins
3stars

configure-plugin/skills/claude-security-settings/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/laurigates/claude-plugins/blob/main/configure-plugin/skills/claude-security-settings/SKILL.md -a claude-code --skill claude-security-settings

Installation paths:

Claude
.claude/skills/claude-security-settings/
Powered by add-skill CLI

Instructions

# Claude Code Security Settings

Expert knowledge for configuring Claude Code security and permissions.

## Core Concepts

Claude Code provides multiple layers of security:
1. **Permission wildcards** - Granular tool access control
2. **Shell operator protections** - Prevents command injection
3. **Project-level settings** - Scoped configurations

## Permission Configuration

### Settings File Locations

| File | Scope | Priority |
|------|-------|----------|
| `~/.claude/settings.json` | User-level (all projects) | Lowest |
| `.claude/settings.json` | Project-level (committed) | Medium |
| `.claude/settings.local.json` | Local project (gitignored) | Highest |

### Permission Structure

```json
{
  "permissions": {
    "allow": [
      "Bash(git status:*)",
      "Bash(npm run:*)"
    ],
    "deny": [
      "Bash(rm -rf:*)",
      "Bash(sudo:*)"
    ]
  }
}
```

## Wildcard Permission Patterns

### Syntax

```
Bash(command:*)
```

- `Bash()` - Tool identifier
- `command` - Command prefix to match
- `:*` - Wildcard suffix matching any arguments

### Pattern Examples

| Pattern | Matches | Does NOT Match |
|---------|---------|----------------|
| `Bash(git:*)` | `git status`, `git diff HEAD` | `git-lfs pull` |
| `Bash(npm run:*)` | `npm run test`, `npm run build` | `npm install` |
| `Bash(gh pr:*)` | `gh pr view 123`, `gh pr create` | `gh issue list` |
| `Bash(./scripts/:*)` | `./scripts/test.sh`, `./scripts/build.sh` | `/scripts/other.sh` |

### Pattern Best Practices

**Granular permissions:**
```json
{
  "permissions": {
    "allow": [
      "Bash(git status:*)",
      "Bash(git diff:*)",
      "Bash(git log:*)",
      "Bash(git add:*)",
      "Bash(git commit:*)"
    ]
  }
}
```

**Tool-specific patterns:**
```json
{
  "permissions": {
    "allow": [
      "Bash(bun test:*)",
      "Bash(bun run:*)",
      "Bash(biome check:*)",
      "Bash(prettier:*)"
    ]
  }
}
```

## Shell Operator Protections

Claude Code 2.1.7+ includes built-in protections against dangero

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
5897 chars