AI-Infra-Guard is an AI security red-teaming platform that scans agents, skills, MCP servers, and AI infrastructure and evaluates LLM jailbreak resistance. It is used to identify security risks and vulnerabilities in AI systems. Catalogue add-ons support its scanning and evaluation workflows.
Borrowing it
Nothing to install: this file belongs to Tencent/AI-Infra-Guard. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Tencent/AI-Infra-Guard/main/AGENTS.mdgit clone --depth 1 https://github.com/Tencent/AI-Infra-GuardWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/tencent/ai-infra-guard/agents-md)<a href="https://agentmods.dev/instructions/tencent/ai-infra-guard/agents-md"><img src="https://agentmods.dev/badge/instructions/tencent/ai-infra-guard/agents-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00998 | $0.00998 |
| Opus 5 | $0.00499 | $0.00499 |
| Sonnet 5 | $0.00200 | $0.00200 |
| Haiku 4.5 | $0.00100 | $0.00100 |
Grade A, and why
AI-Infra-Guard AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
项目定位
AI-Infra-Guard 是一个混合技术栈的 AI 安全扫描平台,核心由以下部分组成:
- Go 主应用(Web 服务、CLI、任务管理、规则引擎)
- Python 子模块(
mcp-scan、agent-scan、AIG-PromptSecurity) - 规则与知识库数据(
data/fingerprints、data/vuln、data/vuln_en、data/mcp、data/eval) - Docker 部署编排(
docker-compose.yml、docker-compose.images.yml)
目录速览
cmd/cli:Go CLI 入口(scan、webserver)common/websocket:Web/API 服务与任务接口internal/mcp:MCP 扫描与插件机制pkg/:数据库、HTTP、漏洞结构等基础库cmd/agent:Agent 进程入口(通过 WebSocket 接入主服务)agent-scan/:Agent 工作流扫描框架(Python)mcp-scan/:MCP 代码/动态扫描框架(Python)AIG-PromptSecurity/:提示词安全评测组件(Python)
本地开发常用命令
Go 服务
# 构建主程序
go build -o ai-infra-guard ./cmd/cli/main.go
# 启动 Web 服务
./ai-infra-guard webserver --server 127.0.0.1:8088
# 或执行基础扫描
./ai-infra-guard scan -t http://127.0.0.1:8088
Agent 进程
go build -o agent ./cmd/agent
AIG_SERVER=127.0.0.1:8088 ./agent
Docker 启动
# 使用预构建镜像
docker-compose -f docker-compose.images.yml up -d
# 使用本地源码构建镜像
docker-compose up -d
Python 子模块
# MCP 扫描
pip install -r mcp-scan/requirements.txt
python mcp-scan/main.py --repo /path/to/project
# Agent 扫描
pip install -r agent-scan/requirements.txt
python agent-scan/main.py --repo /path/to/project --agent_provider /path/to/provider.yaml
# Prompt Security
pip install -r AIG-PromptSecurity/requirements.txt
测试与校验要求
必做校验(按改动范围执行)
# Go 单测
go test ./...
# YAML 规则格式校验(与 CI 保持一致)
go build -o yamlcheck ./cmd/yamlcheck
./yamlcheck data/fingerprints data/vuln data/vuln_en
说明
- 修改
data/下规则时,必须通过yamlcheck。 - 修改 API/任务结构时,需同步检查
api.md、api_zh.md与docs/swagger.yaml。 - 修改 Python 子模块时,至少完成对应入口脚本的冒烟运行。
代码与提交流程约定
- 优先做最小必要改动,避免无关重构。
- 保持现有中英双语风格(注释/文档按周边文件风格保持一致)。
- 不要提交敏感信息(API Key、Token、真实地址、日志隐私数据)。
- 不要删除或覆盖现有规则库文件,除非任务明确要求。
- 新增规则文件时,遵循现有目录与命名习惯。
安全注意事项(项目特性)
- 当前 Web 平台默认不含完整鉴权机制,不应直接暴露公网。
webserver监听非127.0.0.1地址会带来额外风险,需明确隔离环境。- 涉及扫描目标、附件上传、模型配置时,注意日志中不要泄露密钥。
CI/CD 关联约束
.github/workflows/yaml-lint.yml会对data/**变更执行 YAML 校验。- 镜像发布由
.github/workflows/docker-publish.yml管理。 - Release 打包由
.github/workflows/create-release.yml管理。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 99 lines · 998 tokens per session scan A cd59cd69b1af
AI-Infra-Guard AGENTS.md is an instructions file published in the GitHub repository Tencent/AI-Infra-Guard (6,166 stars, last pushed today), licensed Apache-2.0. It adds 998 tokens to every session, about $0.0050 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.