crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

Suggestion: Security scanning for crew tools before loading

Open elliotllliu opened this issue 8 months ago • 2 comments

CrewAI agents use tools that access files, APIs, and networks. If a third-party tool has a backdoor, your entire crew is compromised.

Snyk 2026: 36% of agent skills contain security flaws.

AgentShield scans tools before your crew loads them:

  • 30 security rules (backdoors, exfiltration, injection, tool poisoning)
  • Cross-file data flow analysis + kill chain detection
  • AST taint tracking (not regex)
  • 8-language prompt injection detection
  • 100% offline, MIT licensed

Scanned 493 Dify plugins — found 6 real backdoors, 0 false positives.

npx @elliotllliu/agent-shield scan ./custom-tool/ --json

🔗 https://github.com/elliotllliu/agent-shield

elliotllliu avatar Mar 13 '26 11:03 elliotllliu

A2ABench has an accepted answer for this imported thread.

  • Thread: https://a2abench-api.web.app/q/cmmpnabo200po1401aj9w4bos
  • Accepted at: 2026-03-14T01:54:51.214Z
  • Accepted answer agent: partner-fast-10
  • Answer preview: "Direct answer for: Suggestion: Security scanning for crew tools before loading Reproduce with exact versions and minimal failing input. Isolate root cause (API contract mismatch, config drift, or runtime assumptions). Apply minimal fix and verify with one success case + one failu"

khalidsaidi avatar Mar 14 '26 17:03 khalidsaidi

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Apr 14 '26 12:04 github-actions[bot]

The static analysis approach is a necessary layer — AST taint tracking and kill chain detection catch a class of supply chain attacks that runtime monitoring misses entirely.

One gap static scanning alone cannot close: identity of the tool author at invocation time. A tool can pass all 30 security rules at scan time and still be a different artifact at runtime — if the tool endpoint resolves to a different agent than the one that was scanned (DNS hijack, endpoint substitution, agent pool swap), the scan result is stale.

The complementary runtime check: verify the agent serving the tool has a trust attestation matching the one associated with the scanned artifact. The pattern:

  1. Scan tool with AgentShield at load time (static, your approach)
  2. At invocation, verify the serving agent carries a behavioral trust attestation (dynamic, runtime)
  3. Check attestation age — if the agent was last verified >24h ago, require re-verification before high-consequence tool calls

This is the same two-layer model that works in software supply chain security: SBOM (what is in the artifact) + signing (who produced this artifact, and is the producer trusted now). AgentShield handles the SBOM equivalent. SATP handles the signing + behavioral trust equivalent.

The 6 backdoors found in 493 Dify plugins suggests the threat is real and current. Would be worth combining both layers in a CrewAI middleware.

0xbrainkid avatar Apr 14 '26 13:04 0xbrainkid