Cc security compliance

From markus41/claude · View interactive version

Cc security compliance is an AI agent skill from the GitHub repository markus41/claude. Claude Code security and compliance — permissions model, settings.json allowlists/denylists, enterprise managed settings, audit logging, secrets handling, SOC2/HIPAA/GDPR patterns. Use this skill whenever configuring permissions, auditing a setup for security, handling secrets, preparing for complia

How to use this skill

Skill file

Security & Compliance

Baseline security + enterprise compliance patterns for Claude Code.

Permission model

Permissions live in .claude/settings.json:

{
  "permissions": {
    "allow": ["Read", "Write", "Edit", "Glob", "Grep", "Bash(npm *)"],
    "deny":  ["Bash(rm -rf /)", "Bash(sudo *)", "Bash(curl * | sh)"],
    "ask":   ["WebFetch", "Bash(git push *)", "Bash(npm publish *)"]
  }
}

Permission modes

| Mode | Behavior |

|---|---|

| ask | Prompt for every tool use |

| acceptEdits | Auto-accept Read/Write/Edit; prompt for others |

| auto | Minimal prompting |

| bypassPermissions | Skip prompts (dangerous; CI only) |

| plan | Plan mode — no file writes |

Set via claude --permission-mode <mode> or in settings.json → permissionMode.

Secrets handling

Never in repo:

Where secrets go:

Install the protect-sensitive-files hook (via cc_kb_hook_recipe("protect-sensitive-files")) to prevent accidental writes to .env / credentials.

Audit logging

Enterprise deployments log all tool calls for compliance:

{
  "hooks": {
    "PostToolUse": [
      { "matcher": "*", "hooks": [{ "type": "command", "command": "bash .claude/hooks/audit-log.sh" }] }
    ]
  }
}

audit-log.sh appends JSON lines to a log shipping to SIEM (Splunk, Elastic, Datadog). Key fields: timestamp, session_id, tool_name, tool_input_hash (not raw input if sensitive), decision, duration_ms.

Enterprise managed settings

For org-wide enforcement, use managed settings at the OS level:

Managed settings override user settings. Use for: denylist of dangerous commands, required hooks (audit), forbidden MCP servers.

Compliance frameworks

SOC2 Type II

HIPAA (healthcare)

GDPR

Security audit checklist

Run security-compliance-advisor agent for a full audit. Minimum checks:

MCP delegation

| Need | Tool |

|---|---|

| Settings schema | cc_docs_settings_schema |

| Audit checklist | cc_docs_checklist("security") |

| Model for review | cc_docs_model_recommend("security review") → Opus |

| Hook recipe for protection | cc_kb_hook_recipe("protect-sensitive-files") |

Anti-patterns

Reference

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.