plugins/claude-code-expert/archive/v7.6.0/skills/permissions-security/SKILL.md
# Claude Code Permissions & Security Complete reference for the permission model and security features. ## Permission Modes Claude Code operates in one of several permission modes: ### Default Mode (`default`) - Prompts on first use of each tool type - User approves/denies each tool call - Safest mode for general use ### Accept Edits Mode (`acceptEdits`) - Auto-approves file edits (Read, Write, Edit) - Still asks for Bash commands and other tools - Good balance for code-focused work ### Pl
npx skillsauth add markus41/claude plugins/claude-code-expert/archive/v7.6.0/skills/permissions-securityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Complete reference for the permission model and security features.
Claude Code operates in one of several permission modes:
default)acceptEdits)plan)Shift+Tab or --permission-mode plandontAsk)bypassPermissions)--dangerously-skip-permissions flagShift+Tab — Cycle through permission modes interactively--permission-mode <mode> — Set mode at startupIn settings.json or .claude/settings.json:
{
"permissions": {
"allow": [
"Read",
"Write",
"Edit",
"Glob",
"Grep",
"Bash(npm test)",
"Bash(npm run *)",
"Bash(npx tsc *)",
"Bash(git status)",
"Bash(git diff *)",
"Bash(git log *)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(ls *)",
"Bash(mkdir *)",
"Bash(cat *)",
"Bash(head *)",
"Bash(tail *)",
"Bash(wc *)",
"Bash(echo *)",
"Bash(pwd)",
"Bash(which *)",
"Bash(node *)",
"Bash(python3 *)",
"WebFetch",
"WebSearch",
"TodoWrite",
"NotebookEdit",
"Agent"
]
}
}
{
"permissions": {
"deny": [
"Bash(rm -rf /)",
"Bash(sudo *)",
"Bash(curl * | bash)",
"Bash(wget * | bash)",
"Bash(chmod 777 *)",
"Bash(> /dev/sda)",
"Bash(mkfs *)",
"Bash(dd if=*)",
"Bash(:(){ :|:& };:)"
]
}
}
| Pattern | Example | Matches |
|---------|---------|---------|
| Exact tool | "Read" | All Read calls |
| Bash prefix | "Bash(npm test)" | Exactly npm test |
| Bash glob | "Bash(npm *)" | Any npm command |
| MCP wildcard | "mcp__server__*" | All tools from server |
| MCP specific | "mcp__fs__read_file" | Specific MCP tool |
Read — Read file contentsGlob — Find files by patternGrep — Search file contentsTodoWrite — Manage todo listWrite — Create/overwrite filesEdit — Modify existing filesBash — Execute shell commandsWebFetch — Fetch web contentWebSearch — Search the webNotebookEdit — Edit Jupyter notebooksAgent — Spawn sub-agents (inherits parent permissions)AskUserQuestion — Always allowed (asks user questions)Skill — Invoke slash commands{
"permissions": {
"allow": [
"Read",
"Glob",
"Grep",
"Bash(npm test)",
"Bash(npx tsc --noEmit)"
]
}
}
Use hooks to guard sensitive paths:
#!/bin/bash
# PreToolUse hook
INPUT=$(cat)
TOOL=$(echo "$INPUT" | jq -r '.tool_name')
PATH_ARG=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // ""')
# Block access to secrets
if echo "$PATH_ARG" | grep -qE '\.(env|pem|key|secret)$'; then
echo '{"decision": "deny", "reason": "Access to secret files is blocked"}'
exit 0
fi
echo '{"decision": "approve"}'
{
"permissions": {
"allow": [
"Bash(npm *)",
"Bash(npx *)",
"Bash(git *)",
"Bash(ls *)",
"Bash(cat *)"
],
"deny": [
"Bash(rm *)",
"Bash(sudo *)",
"Bash(curl *)",
"Bash(wget *)"
]
}
}
{
"permissions": {
"allow": [
"mcp__filesystem__read_file",
"mcp__filesystem__list_directory"
],
"deny": [
"mcp__filesystem__write_file",
"mcp__filesystem__delete_file"
]
}
}
During a session, when Claude requests a tool:
Session permissions reset when Claude Code restarts. For persistent permissions, add them to settings.json.
Enterprise admins can push managed settings that users cannot override:
{
"managedSettings": {
"permissions": {
"deny": [
"Bash(curl *)",
"Bash(wget *)",
"WebFetch",
"WebSearch"
]
},
"model": "claude-sonnet-4-6",
"hooks": {
"PostToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "bash /opt/audit/log-tool-use.sh"
}
]
}
]
}
}
}
.mcp.json (use env vars).env files in .gitignoretools
Build Teams-native agents with the Teams SDK (formerly Teams AI Library v2) — App class, activity routing, adaptive cards, streaming, AI-generated labels, feedback, message extensions, Teams-as-MCP-server, and the bring-your-own-AI pattern with Agent Framework.
tools
Run agents on Microsoft Foundry (formerly Azure AI Foundry) Agent Service — prompt agents vs hosted agents, threads/runs and the Responses API, built-in tools (Bing grounding, code interpreter, file search, MCP, OpenAPI, A2A), connected agents, Entra agent identity, SDKs, and observability/evaluations.
tools
Build and host custom engine agents with the Microsoft 365 Agents SDK — AgentApplication, the Activity protocol, channel reach via Azure Bot Service, hosting Agent Framework or Semantic Kernel engines, and the Agents Toolkit/Playground workflow. Successor to the Bot Framework SDK.
tools
Design, govern, and extend Microsoft Copilot Studio agents — topics, generative orchestration, knowledge, tools and MCP, agent flows, autonomous triggers, publishing channels, Copilot Credits pricing, and solution-based ALM on Power Platform.