Agent Security logo

Agent Security

OrganizationPopular
wgpsec
agent-security

AI Agent 系统安全测试方法论。当目标系统使用 AI Agent 执行工具调用、多 Agent 协作、 或自主决策时触发。覆盖 OWASP Agentic AI Security Top 10 (ASI01-ASI10): 目标劫持、工具滥用、身份权限、供应链、代码执行、记忆投毒、多 Agent 通信、 级联故障、人机信任利用、失控 Agent。

Overview

Publisherwgpsec
RepositoryAboutSecurity
Skill nameagent-security
Stars
1.7K
Forks
242
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wgpsec on GitHub. Read the source before you install it.

Installation

Install the Agent Security AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wgpsec/AboutSecurity.git /tmp/AboutSecurity
mkdir -p .claude/skills
cp -r /tmp/AboutSecurity/skills/ai-security/agent-security .claude/skills/agent-security
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Agent Security in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Agent Security on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Agent Security is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

AI Agent 安全测试方法论

概述

AI Agent 与普通 LLM 应用的本质区别在于自主行动能力——Agent 拥有工具调用、代码执行、持久记忆和多步规划能力,这意味着一次成功的注入不再只是生成错误文本,而是可以触发真实的系统操作。攻击面从"模型输出"扩展到了"工具执行链、Agent 间通信、持久化状态"的全栈。

深入参考


OWASP ASI01-ASI10 风险速查

编号风险名称核心测试要点
ASI01目标劫持直接/间接注入能否改变 Agent 执行目标
ASI02工具滥用未授权工具调用、参数注入、描述投毒
ASI03身份与权限Agent 权限是否遵循最小权限、凭据隔离
ASI04供应链第三方 Skill/Plugin/MCP Server 是否可信
ASI05代码执行沙箱逃逸、任意命令注入
ASI06记忆投毒持久化上下文/历史对话是否可被污染
ASI07多 Agent 通信Agent 间消息伪造、信任传递链漏洞
ASI08级联故障单 Agent 失败是否引发链式崩溃
ASI09人机信任用户是否无条件信任 Agent 输出并执行
ASI10失控 Agent是否存在有效的终止/回滚机制

方法论概览

Phase 0: Agent 架构侦察

  • 识别 Agent 类型(单体 ReAct / 多 Agent 编排 / 代码执行型)和底层框架(LangChain/AutoGen/CrewAI 等)
  • 枚举 Agent 可用工具集、权限边界、通信拓扑(Hub-Spoke / Mesh / 层级)
  • 确认人类监督节点(Human-in-the-loop)的位置和覆盖范围

Phase 1: 目标劫持测试 (ASI01)

  • 通过直接对话和间接数据源(文件、网页、API 返回)注入偏离指令,验证 Agent 是否执行非预期操作
  • 关键判断:Agent 的目标锁定机制是否能抵抗上下文窗口中的对抗性指令

Phase 2: 工具滥用测试 (ASI02)

  • 构造恶意工具参数(路径遍历、命令拼接),测试 Agent 是否盲目传递用户可控输入到工具调用
  • 测试工具描述投毒——恶意描述能否改变 Agent 对工具的使用方式(详见 mcp-security

Phase 3: 供应链与代码执行 (ASI04/ASI05)

  • 审查第三方 Skill/Plugin/Rules 文件是否包含隐藏指令或后门
  • 代码执行型 Agent:测试沙箱隔离强度,尝试文件系统访问、网络外联、进程逃逸

Phase 4: 记忆投毒与持久化 (ASI06)

  • 向 Agent 的对话历史或长期记忆注入恶意上下文,验证是否在后续会话中被激活
  • 测试记忆的写入/读取权限控制——非特权交互能否修改系统级记忆

Phase 5: 多 Agent 通信安全 (ASI07)

  • 在多 Agent 系统中伪造来自其他 Agent 的消息,测试接收方是否验证消息来源
  • 检查信任传递链:若 Agent A 信任 Agent B,攻击 B 能否间接控制 A

Phase 6: 监控与 Kill Switch (ASI08/ASI10)

  • 验证级联故障:单个 Agent 异常输出是否被下游 Agent 无条件信任并放大
  • 测试终止机制(Kill Switch)的有效性——Agent 在失控状态下能否被可靠中断

实战检测清单

1. [ ] Agent 类型与架构已识别?工具集、权限模型、通信拓扑已枚举?
2. [ ] 目标劫持:间接数据源注入能否改变 Agent 执行流?
3. [ ] 工具滥用:用户输入是否直接拼接到工具参数?
4. [ ] 权限边界:Agent 是否运行在最小权限下?凭据是否隔离?
5. [ ] 供应链:第三方组件是否经过安全审计?
6. [ ] 代码执行:沙箱是否能阻止文件/网络/进程访问?
7. [ ] 记忆系统:是否有写入权限控制?历史是否可被投毒?
8. [ ] 多 Agent:消息来源是否验证?信任传递链是否可被利用?
9. [ ] 级联故障:异常是否被隔离?是否存在全局 Kill Switch?

参考资源

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Agent Security AI skill do?

AI Agent 系统安全测试方法论。当目标系统使用 AI Agent 执行工具调用、多 Agent 协作、 或自主决策时触发。覆盖 OWASP Agentic AI Security Top 10 (ASI01-ASI10): 目标劫持、工具滥用、身份权限、供应链、代码执行、记忆投毒、多 Agent 通信、 级联故障、人机信任利用、失控 Agent。

Why use Agent Security on TypingMind?

Because you install it once and use it with any model. Agent Security is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Agent Security in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wgpsec/AboutSecurity/tree/master/skills/ai-security/agent-security. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Agent Security?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Agent Security?

As many as you like. As long as a model supports skills, you can use Agent Security with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Agent Security AI skill free?

It is published on GitHub by wgpsec. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇