aig-agent-redteam

Conduct authorized red-team security assessments of AI agents, MCP servers, and AI infrastructure.

6.1k|568|Updated Dec 25, 2024
One-click install
npx skills add https://github.com/Tencent/AI-Infra-Guard --skill aig-agent-redteam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aig-agent-redteam
Source: https://github.com/Tencent/AI-Infra-Guard/tree/main/skills/aig-agent-redteam
Command: npx skills add https://github.com/Tencent/AI-Infra-Guard --skill aig-agent-redteam

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, openai, pyyaml, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

AI agents, MCP servers, Skills, and AI infrastructure expose new attack surfaces—prompt injection, indirect injection, tool abuse, data leakage, privilege escalation, SSRF, and supply-chain poisoning—that traditional security tools do not cover. This Skill turns an agent into an authorized red-team operator that models trust boundaries, generates attack hypotheses, validates them with harmless canaries, and produces a penetration-test-style report.

Core Features & Use Cases

  • Adaptive Mutation Testing: 79 strategy operators plus 13 chainable encodings, selected via a defense-signal lookup table, with a minimum 30-payload coverage requirement across dataset, mutated, and hand-crafted samples.
  • Static Code & Supply-Chain Audit: Traces attacker-controlled inputs to privileged sinks in Skill packages, MCP servers, and code repositories, checking tool descriptions and dependencies for agent poisoning.
  • Infrastructure Fingerprinting: HTTP probing with AI product fingerprint and CVE matching reusing Tencent AI-Infra-Guard data (Ollama, vLLM, Dify, etc.).
  • Use Case: A developer asks their IDE agent to run a security exercise; the Skill audits installed Skills and MCP servers, runs injection payloads against the agent itself, and delivers a severity-rated Markdown/HTML report with evidence chains and remediation steps.

Quick Start

Ask your agent to run a security exercise on itself or on a specified target such as an MCP server, code repository, or AI service URL, and confirm the authorization scope when prompted.

Frequently Asked Questions about aig-agent-redteam

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I red-team test my AI agent for prompt injection?

Install the Skill into an agent client like Claude Code, CodeBuddy, or Cursor, then ask it to run a security exercise. It models the agent's capabilities and trust boundaries, sends at least 30 injection payloads with adaptive mutation, and reports which boundaries held or failed.

What attack surfaces does AI agent security testing cover?

Coverage includes prompt injection, indirect injection via files, webpages, RAG and MCP outputs, tool abuse, data leakage, privilege escalation, SSRF, supply-chain poisoning in Skills and MCP servers, and infrastructure exposure of AI services with fingerprint and CVE matching.

Can this test MCP servers and Skill packages for supply-chain risks?

Yes. The code-audit module statically analyzes Skill packages, MCP servers, and plugins, tracing attacker-controlled inputs to privileged sinks like shell, filesystem, and network, and checking tool descriptions and dependencies for instructions that could poison the host agent.

Does the red-team skill work with Claude Code and Cursor?

Yes. It supports Claude Code, CodeBuddy, Cursor, and any agent client that supports Skills. Installation uses npx skills add from the GitHub repository, or manual copying into the client's skills directory, requiring only node and git.

Is red-team testing with this skill safe for production agents?

Testing requires explicit authorization and scope confirmation before execution. It uses harmless canaries, temporary files, and local mock endpoints instead of real secrets, blocks destructive actions without approval, and keeps all test data on the local machine.

Why does dynamic testing require at least 30 payloads?

The 30-payload minimum ensures statistical coverage across three sources: at least 10 dataset samples, 10 operator-mutated samples, and 10 hand-crafted first-principles samples. If fewer are sent, the report must state that dynamic coverage is insufficient rather than claiming adequate testing.