Skip to content

efij/awesome-claude-code-security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Awesome Claude Code Security

Awesome Track Awesome List License: CC BY 4.0 PRs Welcome Last Commit

A curated collection of security resources, hardening tools, threat research, and governance frameworks for Claude Code and the AI coding agent ecosystem.

For security engineers, AppSec teams, platform engineers, and anyone deploying Claude Code in production.

Official Docs Β· Hardening Β· MCP Security Β· Tools Β· Enterprise Β· Research


Why this list? Claude Code runs shell commands, edits files, calls APIs, and installs MCP servers β€” all with your user privileges. One malicious .claude/settings.json, a poisoned MCP tool, or a prompt injection hidden in a README can lead to RCE, credential theft, or silent data exfiltration. This list exists to help you harden, govern, and monitor every surface.


Contents


πŸ“‹ Official Security Documentation

Core security documentation published by Anthropic.

  • Security Overview - Architecture reference covering permission model, sandboxing, prompt injection defenses, and privacy safeguards.
  • Configure Permissions - Tiered Allow/Ask/Deny system with tool-specific rules, wildcard patterns, and precedence evaluation.
  • Sandboxing - Filesystem and network isolation using Linux bubblewrap and macOS Seatbelt with domain restrictions.
  • Hooks Reference - PreToolUse, PostToolUse, and ConfigChange hook events for security automation.
  • Hooks Guide - Practical patterns: permission enforcement, injection detection, audit logging.
  • Settings - Hierarchical config scopes (Managed > CLI > Local > Project > User) and sensitive file protection.
  • Authentication - Credential management, secure storage, apiKeyHelper, and enterprise SSO.
  • Data Usage - Retention policies, TLS + AES-256 encryption, telemetry, and training opt-out.
  • Zero Data Retention - Enterprise immediate data deletion with HIPAA BAA coverage.
  • Monitoring and Usage - OpenTelemetry integration for session tracking, token usage, and audit trails.
  • MCP Configuration - MCP server setup, OAuth 2.0, scope hierarchy, enterprise allowlists/denylists.
  • Claude Code on the Web - Cloud execution: isolated VMs, network proxies, git push restrictions, domain allowlists.
  • Amazon Bedrock Integration - IAM policies, AWS Guardrails, credential management, model version pinning.

Anthropic Engineering & Blog

πŸ”’ Hardening and Permissions

Configs, frameworks, and guides for locking down Claude Code.

πŸ“¦ Sandboxing and Isolation

Isolating AI agent code execution from your host system.

  • Arrakis - Self-hosted MicroVM sandbox for AI agents with backtracking, REST API, Python SDK, and Firecracker-based isolation.
  • microsandbox - Open-source self-hosted MicroVM sandboxes with sub-200ms startup, hardware-level isolation via libkrun. ~3.3k stars.
  • agent-infra/sandbox - All-in-one Docker sandbox for AI agents: browser, shell, file, MCP, and VS Code server in a container.
  • sandbox-agent (Rivet) - Run Claude Code and other coding agents in sandboxes controlled over HTTP.
  • codeduet-microvm-ai-agent-sandbox - MicroVM sandbox using Cloud Hypervisor with Linux and Windows guest support and hardware-level isolation.
  • Kubernetes agent-sandbox - Kubernetes CRD for declarative sandbox management with persistent identity for AI agents.
  • SWE-ReX - Sandboxed shell environments for AI code agents with parallel execution and cloud deployment support.
  • awesome-sandbox - Curated list of code sandboxing solutions for AI, comparing isolation approaches.
  • How to Sandbox AI Agents in 2026 - Technical comparison: MicroVMs vs gVisor vs hardened containers for agent isolation.
  • Best Code Execution Sandbox for AI Agents - Ranked comparison of sandbox platforms with security/performance tradeoffs.

πŸͺ Hooks and Guardrails

Hook systems and runtime enforcement for Claude Code.

  • claude-code-safety-net - Plugin intercepting destructive git/filesystem commands before execution. Semantic argument parsing distinguishes safe from dangerous operations.
  • Lasso claude-hooks - Prompt injection defense hooks: scans files, web fetches, and command output in real-time. Detects 50+ injection patterns in READMEs, HTML comments, and docs.
  • claude-code-hooks-mastery - Advanced hook patterns and techniques for Claude Code security automation.
  • claudekit - Toolkit of custom commands, hooks, and security utilities for Claude Code.
  • claude-code-hooks-multi-agent-observability - Real-time monitoring for multi-agent Claude Code sessions via hook event tracking.
  • claude-code-showcase - Comprehensive project configuration example with hooks, skills, agents, commands, and GitHub Actions workflows.
  • NeMo Guardrails - NVIDIA's toolkit for programmable LLM guardrails with Colang language for dialog flow control. ~4.5k stars.

πŸ”Œ MCP Security

Securing the Model Context Protocol ecosystem.

Scanners and Auditors

  • Snyk agent-scan - Professional security scanner for AI agents, MCP servers, and skills covering 15+ risk categories.
  • mcp-scan (Invariant Labs) - MCP security scanner with proxy mode for real-time scanning without infrastructure changes.
  • Cisco MCP Scanner - Cisco's scanner for detecting threats and security findings in MCP servers.
  • MCP Security Scanner (SARIF) - Static + dynamic checks for path traversal, auth gaps, prompt injection. Outputs SARIF for GitHub code scanning.
  • AWS MCP Security Scanner - Integrates Checkov, Semgrep, and Bandit for comprehensive code security analysis via MCP.
  • SecureMCP - Audit MCP for OAuth leaks, prompt injection, rogue servers, and tool poisoning.
  • mcpserver-audit - Pre-use safety examination tool with vulnerability database.
  • MCP Security Audit (npm) - Audits npm dependencies in MCP servers for known vulnerabilities via registry.

Gateways and Proxies

  • Microsoft MCP Gateway - Reverse proxy for MCP servers in Kubernetes with OAuth 2.0 (Azure Entra ID), RBAC, and session-aware routing.
  • Hypr MCP Gateway - OAuth proxy with dynamic client registration, prompt analytics, and MCP firewall for enterprise-grade servers.
  • Secure MCP Gateway (Enkrypt) - Admin-level gateway with guardrails at each MCP server to block injection, exfiltration, and unauthorized access.
  • Lasso MCP Gateway - Plugin-based gateway that intercepts and sanitizes sensitive information across MCP orchestration.
  • IBM ContextForge - Open-source registry and proxy federating MCP/A2A/REST APIs with centralized governance and discovery.
  • awesome-mcp-gateways - Curated list of MCP gateway products and solutions.

Standards and Checklists

Research

πŸ’‰ Prompt Injection and Agent Threats

Attacks and defenses for AI coding agents.

Claude Code Specific

Tools and Frameworks

  • promptfoo - CLI for red-teaming LLM apps. Adaptive attack generation, CI/CD integration. Used by Shopify, Discord, Microsoft. ~6k stars.
  • Garak - NVIDIA-backed red-teaming toolkit: 37+ probe modules for injection, jailbreaks, encoding bypasses, data extraction. Apache 2.0.
  • PyRIT (Microsoft) - Python Risk Identification Tool for generative AI. Enterprise red-teaming framework for Azure environments.
  • Rebuff (Protect AI) - Multi-layered prompt injection detection: heuristics, LLM analysis, vector DB of known attacks, canary tokens.
  • HouYi - Automated prompt injection testing framework for LLM-integrated applications.
  • Open-Prompt-Injection - Academic benchmark with DataSentinel and PromptLocate defenses.
  • promptmap - Security scanner for custom LLM apps. White-box and black-box prompt injection testing.
  • awesome-prompt-injection - Curated resource on prompt injection vulnerabilities in ML models.
  • tldrsec/prompt-injection-defenses - Every practical and proposed defense against prompt injection, maintained by tl;dr sec.

Research

πŸ”‘ Secrets and Data Leakage

Preventing credential exposure, data exfiltration, and transcript leakage.

Prevention Tools

  • TruffleHog - Find, verify, and analyze leaked credentials. 800+ secret types, live verification. Essential for pre-commit scanning in AI workflows. ~18k stars.
  • Gitleaks - Fast secrets scanner using regex and entropy. High precision, low false positives. ~19k stars.
  • ggshield (GitGuardian) - Detect 500+ secret types with advanced validation. Pre-commit hooks, CI integration, and real-time scanning.
  • LLM Guard (Protect AI) - Input/output security toolkit: PII detection, toxicity filtering, secrets scanning for LLM interactions. ~4k stars.
  • ml-model-data-leak-layer - PII leak detection in LLM-generated content using ML and regex patterns.
  • GitHub Secret Protection - Push protection with AI-powered detection. Enabled by default on public repos since 2024.

Claude Code Specific

🏒 Enterprise Governance and Policy

Rolling out Claude Code securely across teams and organizations.

βš™οΈ Secure CI/CD and Automation

Running Claude Code safely in pipelines and automated workflows.

  • claude-code-action - Official GitHub Action for CI/CD. v1.0: auto mode detection, interactive + automation modes.
  • claude-code-security-review - Official AI-powered security review Action for PRs. OWASP-aligned analysis, found vulnerabilities in Claude Code itself.
  • GitHub Actions Docs - Official reference for Claude Code in GitHub Actions: triggers, configuration, permissions.
  • StepSecurity Harden-Runner - Network monitoring and tamper-proof audit logs for Claude Code Actions β€” critical since claude-code-action has unrestricted network access.
  • CLAUDE.md CI/CD Wiki - Community patterns for CLAUDE.md configuration in CI/CD pipelines.
  • Claude Code Headless Mode - Non-interactive --print and -p flags for scripted security workflows and automation.

πŸ“¦ Plugins, Extensions, and Supply Chain

Managing trust and risk in the Claude Code plugin ecosystem.

πŸ€– Agent Orchestration and Loop Safety

Multi-agent workflows, sub-agents, and automated loop security.

πŸ–₯️ OS and Endpoint Hardening

Platform-specific security for Claude Code workstations.

πŸ› οΈ Security Tools and Scanners

Tools for auditing, scanning, and testing Claude Code and its ecosystem.

Claude Code Specific

MCP Scanners

LLM Security Toolkits

  • LLM Guard (Protect AI) - Input/output validation, PII detection, toxicity filtering, secrets scanning. ~4k stars.
  • NeMo Guardrails (NVIDIA) - Programmable guardrails with Colang for dialog flow control and vulnerability scanning. ~4.5k stars.
  • promptfoo - Red-team LLM apps: adaptive attacks, CI/CD integration, declarative configs. ~6k stars.
  • Garak (NVIDIA) - Generative AI red-teaming: 37+ probes, 23 backends, prompt injection to data extraction.
  • PyRIT (Microsoft) - Enterprise red-teaming for generative AI in Azure environments.
  • Vigil - Detect prompt injections, jailbreaks, and risky LLM inputs.
  • Langfuse Security & Guardrails - Observability platform with built-in security and guardrail integrations.

Secrets Scanners

  • TruffleHog - 800+ credential types with live verification. Scans Git, filesystems, cloud storage. ~18k stars.
  • Gitleaks - Regex + entropy secrets detection. Fast, accurate, minimal false positives. ~19k stars.
  • ggshield (GitGuardian) - 500+ secret types with pre-commit and CI integration.

πŸ› Vulnerability Research and Disclosures

Published CVEs, exploits, and security research on Claude Code.

πŸ“ Frameworks and Standards

Industry frameworks applicable to AI coding agent security.

πŸ“š Research, Talks, and Writeups

High-quality security research, conference material, and technical analysis.

Conference Material

Technical Research

Vendor Research

πŸ”„ Competitor and Adjacent Controls

How other AI coding tools handle security β€” useful for comparison and gap analysis.

βœ… Checklists and Templates

Ready-to-use security checklists, policy templates, and configuration references.

🌐 Community and Ecosystem

Related lists, communities, and ecosystem resources.


Star History

Star History Chart

Contributing

Contributions welcome! Please read the contribution guidelines first.

This is a curated list β€” quality over quantity. See the inclusion criteria before submitting.

License

CC BY 4.0

This work is licensed under a Creative Commons Attribution 4.0 International License.

About

A awesome curated list of security resources, hardening tools, threat research, and governance frameworks specifically for Claude Code

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors