agentshield  by affaan-m

AI agent security scanner

Created 1 month ago
297 stars

Top 89.6% on SourcePulse

GitHubView on GitHub
Project Summary

AgentShield addresses the critical gap in security tooling for the rapidly expanding AI agent ecosystem. It provides automated scanning for vulnerabilities in AI agent configurations, MCP servers, and tool permissions, targeting developers and users of AI agents, particularly within the Claude Code environment. AgentShield offers significant benefits by detecting and flagging security risks before they can be exploited, integrating seamlessly into development workflows.

How It Works

AgentShield scans AI agent configurations, primarily focusing on the .claude/ directory, using a comprehensive set of 102 rules across five categories: Secrets, Permissions, Hooks, MCP Servers, and Agent Configurations. It employs a multi-layered approach, including static analysis of configuration files and an advanced three-agent adversarial pipeline (Opus 4.6) for deep security auditing. The tool generates a graded security report and offers an auto-fix engine for safely remediating identified vulnerabilities.

Quick Start & Requirements

  • Primary install/run command: npx ecc-agentshield scan or npm install -g ecc-agentshield followed by agentshield scan.
  • Non-default prerequisites: Node.js and npm are required for installation. An ANTHROPIC_API_KEY environment variable is necessary for the --opus adversarial analysis feature.
  • Links: GitHub App integration is available at https://github.com/apps/ecc-tools.

Highlighted Details

  • Opus 4.6 Deep Analysis: Features a three-agent pipeline (Red Team, Blue Team, Auditor) powered by Claude Opus 4.6 for adversarial simulation and risk assessment.
  • Auto-Fix Engine: Automatically remediates certain vulnerabilities, such as replacing hardcoded secrets with environment variable references and tightening wildcard permissions.
  • MiniClaw Runtime: Includes a minimal, sandboxed AI agent runtime with an HTTP API, designed with a robust security model and zero external runtime dependencies.
  • Multiple Integrations: Available as a standalone CLI, GitHub Action, ECC Plugin, and GitHub App, facilitating integration into various development and CI/CD pipelines.
  • Runtime Confidence Scoring: Differentiates findings based on their likelihood of being active runtime configurations versus template examples or documentation.

Maintenance & Community

AgentShield is part of the "Everything Claude Code" ecosystem, which boasts over 42,000 stars. It was developed at the Claude Code Hackathon in February 2026. The primary developer is @affaanmustafa.

Licensing & Compatibility

The project is released under the MIT license, which is permissive and generally compatible with commercial use and closed-source linking.

Limitations & Caveats

Analysis of non-shell hook execution requires further language-aware interpretation beyond current signals. Security coverage for skill-md prompt text is narrower than for agent-md and CLAUDE.md. The npm package's root export points to the CLI, not a stable library module, making direct programmatic import of scanner internals unsupported. Some example or tutorial bundles might be misinterpreted as live configurations. The MiniClaw dashboard source code is not yet published as a separate npm subpath.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
28
Issues (30d)
9
Star History
249 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems").

codegate by stacklok

5.7%
793
AI agent security and management tool
Created 1 year ago
Updated 10 months ago
Starred by Dan Guido Dan Guido(Cofounder of Trail of Bits), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
1 more.

cai by aliasrobotics

3.1%
8k
Cybersecurity AI (CAI) is an open framework for building AI-driven cybersecurity tools
Created 1 year ago
Updated 2 days ago
Feedback? Help us improve.