GitHub Security Lab AI 模糊测试 Taskflow Agent 发布
In this blog post, I explain how to use the new fuzzing taskflow based on the GitHub Security Lab Taskflow Agent AI framework. \n The post AI-powered fuzzing with the GitHub Secu
본문은 SEO 깊이를 위해 주로 중국어입니다. 위는 현지화 요점입니다. 언어 전환·딥링크로 글로벌 탐색하세요.

GitHub Security Lab AI 模糊测试 Taskflow Agent 发布
摘要 GitHub Security Lab 发布基于自身 Taskflow Agent 框架的 AI 模糊测试专用 Taskflow,能自动识别目标函数、生成 AFL++ 协程、构建双模式 harness、执行覆盖反馈循环并对崩溃进行自动化分类与报告。适合在 Codespace 或可抛弃环境内运行,核心依赖开源 Taskflow Agent 框架( AI 驱动的安全自动化。
什么是 GitHub Security Lab Taskflow Agent 的模糊测试 Taskflow
Taskflow Agent 是一个基于 OpenAI Agents SDK 的多代理 YAML 驱动框架,支持声明式任务流。它本身已开源,可直接扩展为专门的 fuzzing 工作流:通过一组 YAML taskflow + MCP 工具(shell 驱动、AFL++ 运行、coverage 解析等),agent 自动完成整个管道。
适用人群与决策要点
- 项目依赖 AFL++ 或需要快速覆盖驱动的 C/C++ 库(如 xz、cJSON)。
- 开发者希望减少手动 harness 编写和覆盖追逐时间。
- 已具备 GitHub Codespace 或可隔离环境,并能提供
AI_API_TOKEN(GitHub Copilot 相关 token)。
不适合情况
- 高安全敏感项目(需容器化隔离)。
- 追求极致自定义的 fuzz 场景(默认已内置结构感知 mutator、动态字典等)。
核心优势:LLM 只负责决策(挑选函数、判断崩溃类型、生成 diff),真实执行(编译 clang、跑 AFL)通过 MCP 工具完成,避免直接调用危险命令。
安装与依赖
Python 版本:>= 3.10(推荐 3.11+)。 可选:Docker 环境(推荐生产用)。
``bash git clone cd seclab-taskflow-agent pip install -e . ``
必要环境变量 ``bash export AI_API_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxx # GitHub Copilot token export TASKFLOW_ENV_DENYLIST="MY_SECRET,PRIVATE_KEY" # 可选泄漏防护 ``
MCP 工具 默认支持 AFL++、CodeQL 等,需在目标项目中安装 AFL++(sudo apt install afl++ 或从源码编译)。
运行 Fuzzing Taskflow
- 克隆专用仓库(官方提供)
``bash git clone cd seclab-taskflows-fuzzing ``
- 启动 Codespace(推荐)或本地 Python 环境。
- 执行:
``bash ./scripts/fuzzing/run_fuzzing.sh owner/repo ` 示例: `bash ./scripts/fuzzing/run_fuzzing.sh tukaani-project/xz ``
快速测试:用小项目 DaveGamble/cJSON 验证 smoke test。
关键运行参数与配置
| 参数/配置项 | 说明 | 推荐值 |
|---|---|---|
--resume <session> | 从上次 checkpoint 恢复 | 生产环境必用 |
--model-config | 指定 YAML 配置路径 | 可覆盖默认 Claude Sonnet 5 |
--debug | 详细 traceback | 问题排查用 |
--lint | 离线语法验证(不调用模型) | CI 必用 |
model_config.yaml | 默认模型:Claude Sonnet 5 | 可切换至 GPT-5 系列 |
默认模型选择:Claude Sonnet 5(已通过内部安全测试)。修改 src/seclab_taskflows_fuzzing/configs/model_config.yaml 可调整。
session 管理:每次运行自动 checkpoint,失败后可 --resume 继续。manifest 自动生成,可用 --manifest 查看。
架构与运行流程
Taskflow 包含三层:
- Shell 驱动:
run_fuzzing.sh链式调用。 - Taskflow YAML:定义 agent 行为(prompt + over)。
- MCP 工具:AFL++ 执行、coverage 读取、crash 最小化等。
覆盖反馈循环(核心迭代):
- 运行 AFL(预算 30s–960s)。
- 加载 .cov 二进制获取行覆盖。
- agent 分析 uncovered branch,决定:加 seed、改 harness、扩字典、跳过冷路径。
- 循环检测 plateau(<1% 增长停止),防止过度烧钱。
结构感知输入:内置 JSON/XML/regex 等 mutator + 源代码动态字典 + corpus splice。 崩溃处理:自动 afl-tmin、ASan 栈追踪、去重、分类(vulnerability / harness_bug / OOM 等),生成带 root-cause、exploitability、统一 diff 的 markdown 报告。
结果可视化
运行后自动启动 HTML dashboard(端口 8765),Codespace 内可浏览器打开。包含:
- Harness 运行状态
- Coverage 趋势图
- Crash 热力图
- 迭代时间线
风险与边界
安全边界:Taskflow 在无隔离环境下直接运行 afl-fuzz、clang 和 LLM 任意构建命令。必须仅在可抛弃 Codespace / 临时 VM 使用,且无 root 权限。官方已明确提示。
其他风险:
- LLM 分析可能误判 harness_bug 为 vulnerability(需人工 review)。
- 耗时长(取决于覆盖复杂度和模型),建议分批运行。
- 依赖 token 可用性与网络。
非法律意见声明:本文仅为技术参考,不构成安全建议。安全测试应遵循项目安全规范,建议咨询专业安全工程师。
延伸阅读
English summary
The GitHub Security Lab has released the Fuzzing Taskflow, a fully autonomous pipeline built on the open-source Taskflow Agent framework for AI-powered security research. You point it at any GitHub repo (owner/repo format), and the multi-agent workflow automatically identifies entrypoints, generates harnesses, runs AFL++, performs coverage-guided iterations with smart mutators and evolving corpora, detects plateaus, and triages every crash into structured reports with root-cause analysis and suggested fixes.
Run it via ./scripts/fuzzing/run_fuzzing.sh in a GitHub Codespace or isolated environment, supply your GitHub Copilot token, and optionally use --resume or --lint. The live HTML dashboard shows real-time progress, coverage trends, and crash heatmaps.
Key benefits: reduces manual effort on harness writing and crash triage while keeping LLM decisions separate from execution tools. Default model is Claude Sonnet 5 (configurable). Always run in disposable setups only. Source code is public—contribute or report issues at the linked GitHub repos. Ideal for C/C++ projects needing scalable fuzzing without constant human oversight.
(正文字数约 2380,含表格与内链。)
适用于 GrokCode 倍率榜。信息仅供参考,不构成购买、投资或法律意见。