Skip to content

About

Turnkey starter template integrating AgentShield with Anthropic Claude Code for secure, sandboxed terminal AI coding and tool execution.

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

0 stars

Watchers

0 watching

Forks

Claude Code AgentShield Starter 🛡️

Use this template Secured by AgentShield License: Apache-2.0 Trust Center

Turnkey starter repository for Claude Code & Claude Desktop equipped with real-time PreToolUse secret defense hooks, kernel sandboxing, and adversarial leak blocking.

Documentation • Interactive Playground • Security Advisories • Trust Center


⚡ What is this?

When autonomous coding agents (Claude Code, Cursor, Windsurf) run shell commands or inspect directories, untrusted model outputs or adversarial prompt injection payloads can trick them into exfiltrating credentials (cat .env, cat /proc/self/environ, or printenv).

This repository is pre-configured with AgentShield PreToolUse hooks. Every command Claude Code runs is dynamically intercepted:

  1. Syscalls accessing /proc/*/environ or SSH keys are blocked.
  2. Credentials and API keys in stdout/stderr are masked into [REDACTED_SECRET] tokens.
  3. Unapproved network egress is prevented with strict CIDR filtering.

🚀 1-Click Quickstart

1. Click "Use this template"

Click the green Use this template button above to create your own secure agent workspace.

2. Clone & Inspect Hook Configuration

git clone https://github.com/YOUR_ORG/YOUR_REPO.git
cd YOUR_REPO

The .claude/config.json hook is already wired up:

{
  "hooks": {
    "PreToolUse": "npx @ritualdev-lab/agentshield exec \"$TOOL_COMMAND\""
  }
}

3. Test Adversarial Redaction

Run an adversarial process probe command wrapped in the AgentShield defense kernel:

npm run test:adversarial

You will observe that all volatile environment variables are masked with zero leaked secrets.


🛡️ Repository Structure

├── .claude/
│   └── config.json          # PreToolUse hook configuration for Claude Code
├── .agentshield.json        # Sandboxing profile, redaction rules, and egress CIDRs
├── .env.example             # Safe template for local credentials
├── src/
│   └── demo-tool.js         # Example tool demonstrating zero-leak output
├── test/
│   └── verify-defense.test.js # Automated verification test suite
└── .github/workflows/
    └── verify-defense.yml   # CI PR security gate blocking leaked secrets

📄 License & Responsible Disclosure



💖 Sponsor & Support

If you find this project valuable, consider supporting our open-source development:

Sponsor on Dodo Payments Interactive Donation Portal GitHub Sponsors


🛡️ Community & Governance

About

Turnkey starter template integrating AgentShield with Anthropic Claude Code for secure, sandboxed terminal AI coding and tool execution.

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages