parin0127-png/edith
GitHub: parin0127-png/edith
EDITH 是一款多智能体 AI 安全情报平台,通过自动路由和多种大模型协同,为开发者和安全团队提供从代码仓库扫描到 CVE 情报分析的一站式安全审计能力。
Stars: 0 | Forks: 0
# EDITH — AI 驱动的安全情报平台
/edith.git
cd edith
```
### 安装依赖项
```
pip install -r requirements.txt
```
## 获取你的 API Keys
EDITH 需要几个免费的 API keys。它们都有免费层级,只需几分钟即可设置完成。
### 1. Groq API Key *(必需)*
1. 前往 [console.groq.com/keys](https://console.groq.com/keys)
2. 注册或登录 → 点击 **Create API Key**
3. 复制该 key —— 它以 `gsk_` 开头
### 2. Mistral API Key *(必需)*
1. 前往 [console.mistral.ai/api-keys](https://console.mistral.ai/api-keys/)
2. 注册或登录 → 点击 **Create new key**
3. 复制该 key
### 3. Google Safe Browsing API Key *(可选)*
1. 前往 [Google Cloud Console → Safe Browsing API](https://console.cloud.google.com/apis/library/safebrowsing.googleapis.com)
2. 启用该 API → **Credentials → Create Credentials → API Key**
3. 复制该 key —— 它以 `AIza` 开头
### 4. VirusTotal API Key *(可选)*
1. 在 [virustotal.com](https://www.virustotal.com/) 创建一个免费账号
2. 进入你的个人资料页 → **API Key** → 复制它
### 配置 `.env`
在项目根目录中创建一个 `.env` 文件:
```
GROQ=your_groq_api_key_here
MISTRAL=your_mistral_api_key_here
SAFE_BROWSING=your_google_safe_browsing_key_here
VT=your_virustotal_api_key_here
```
## 运行项目
### 1. 启动后端
```
uvicorn main:app --reload --port 8000
```
API 服务器: `http://127.0.0.1:8000`
### 2. 启动前端服务
```
cd UI
python -m http.server 5500
```
前端: `http://127.0.0.1:5500`
### 3. 在浏览器中打开 EDITH
```
http://127.0.0.1:5500/index.html
```
## 使用 EDITH
| 步骤 | 操作 |
|------|--------|
| **1. 注册 / 登录** | 在登录页面上创建一个操作员账户 |
| **2. 设置** *(一次性)* | 输入你的 API keys,或者跳过并稍后从 Settings 中添加 |
| **3. 仪表板** | 粘贴任何输入内容 —— 日志、配置、仓库 URL、消息 —— 然后点击 **Analyze Context**。EDITH 会自动选择合适的工具。 |
| **4. 工具** | 使用 Tools 标签页进行快速查询:Safe Browsing、VirusTotal、IP Info、DNS Lookup |
| **5. 设置** | 随时通过齿轮图标更新你的 API keys |
## 安全与保障
- 所有 AI 输出在展示给用户之前,都会经过 **纯代码的安全 pipeline** 处理
- 在扫描内容中发现的 API keys 和机密信息将被 **自动拦截或打码**
- 检测并拦截 **提示词注入(Prompt-injection)攻击**
- 结果在缓存前会在本地进行 **Fernet 加密**
- 使用的所有工具都是 **合法、公开且纯粹用于防御的** —— 不包含攻击性或侵入性的扫描
## 作者
**Parin Prajapati**
📧 [parin0127@gmail.com](mailto:parin0127@gmail.com)
*提交至 Microsoft Agents League Hackathon 2026 —— 🎨 创意应用赛道*
## 许可证
本项目基于 [MIT License](LICENSE) 授权。
[](https://www.python.org/)
[](https://fastapi.tiangolo.com/)
[](https://groq.com/)
[](https://mistral.ai/)
[](#license)
[](#)
[](https://aka.ms/agentsleague/register)
**一个像攻击者一样思考的多智能体 AI 安全平台 —— 并用通俗易懂的语言进行解释。**
[演示视频](#demo-video) · [功能](#features) · [架构](#how-edith-works) · [快速开始](#getting-started) · [作者](#author)
## 🏆 Microsoft Agents League 2026 — 创意应用赛道
EDITH 已提交至 [Microsoft Agents League Hackathon 2026](https://aka.ms/agentsleague/register) 的 **创意应用**(Creative Apps)赛道。它是一款使用 AI 辅助开发构建的创新型 AI 驱动安全应用,展示了如何将 Agentic AI 创造性地应用于现实世界的网络安全问题。
## 演示视频
## 概述
**EDITH** (**E**ven **D**ead **I**'m **T**he **H**ero) 是一个受 Tony Stark 的 AI 系统启发的 AI 驱动的安全情报平台。
给 EDITH 一个 GitHub 仓库、一个 API 规范、一个云配置、一个 Dockerfile、一个依赖包列表、一条可疑消息,或者仅仅是一个 URL —— 它就会自动将你的输入路由到合适的 AI 安全工具中,像攻击者一样对其进行分析,并用通俗易懂的语言解释一切。
专为开发人员、安全团队和非技术用户打造。
## 目录
- [EDITH 的工作原理](#how-edith-works)
- [功能](#features)
- [技术栈](#tech-stack)
- [项目结构](#project-structure)
- [快速开始](#getting-started)
- [获取你的 API Keys](#getting-your-api-keys)
- [运行项目](#running-the-project)
- [使用 EDITH](#using-edith)
- [安全与保障](#safety--security)
- [作者](#author)
- [许可证](#license)
## EDITH 的工作原理
EDITH 通过结构化的 **多智能体 pipeline** 运行每个请求。每个智能体负责一项工作,并通过一个小型 JSON 文件将其输出传递到下一阶段。
```
User Input
│
▼
┌──────────────────────────────┐
│ Agent 1 — System Brain │ Loads system context and capabilities
└─────────────┬────────────────┘
│
▼
┌──────────────────────────────┐
│ Agent 2 — Tool Decider │ Reads input, picks the right security tool
└─────────────┬────────────────┘
│
▼
┌──────────────────────────────┐
│ Agent 3 — Model Allocator │ Picks the best AI model for the task
└─────────────┬────────────────┘
│
▼
┌──────────────────────────────┐
│ Agent 4 — Executor │ Runs the tool with fallback protection
└─────────────┬────────────────┘
│
▼
┌──────────────────────────────┐
│ Safety Pipeline (No AI) │ Blocks secrets, injections & redacts PII
└─────────────┬────────────────┘
│
▼
Final Result → User
```
**设计上的弹性容错:** 如果某个工具失败或返回不佳的结果,Executor 会回退到安全的默认设置 —— 没有重试循环,不会浪费 API 调用。
**代码级安全:** Safety Pipeline 完全基于正则表达式 —— 不涉及任何 AI —— 并且在每次输出到达用户之前都会对其运行。
## 功能
### AI 安全工具
| # | 功能 | 作用 |
|---|---------|--------------|
| 1 | **Repo Scanner** | 扫描公开的 GitHub 仓库,查找暴露的机密、硬编码的凭证和有风险的配置文件 |
| 2 | **API Security Tester** | 分析 OpenAPI 规范,找出损坏的身份验证、缺失的速率限制和暴露的 endpoints |
| 3 | **Threat Report Generator** | 将原始的安全发现转换为整洁、专业的渗透测试风格报告 |
| 4 | **Social Engineering Analyzer** | 检测消息中的网络钓鱼、冒充、紧迫感诱导和操纵策略 |
| 5 | **Cloud Misconfiguration Auditor** | 在云配置中查找暴露的存储桶、薄弱的 IAM 策略和不良的安全组 |
| 6 | **Malicious Package Detector** | 从 `requirements.txt` 中标记出有抢注(typosquatting)嫌疑、被劫持或可疑的软件包 |
| 7 | **Dockerfile / CI Pipeline Auditor** | 检测提权风险、硬编码的机密以及不安全的基础镜像 |
| 8 | **AI Red Team Agent** | 收集真实的 OSINT(HTTP 标头、WHOIS、DNS 记录)并模拟攻击者的操作演练 |
| 9 | **Live CVE Intelligence Agent** | 查询 NVD 数据库中关于特定技术/版本的真实 CVE,并解释风险及修复方法 |
### 内置网络工具
| 工具 | 用途 |
|------|---------|
| **Google Safe Browsing** | 检查 URL 是否被标记为恶意软件、网络钓鱼或垃圾软件 |
| **VirusTotal** | 使用 70 多种防病毒引擎扫描 URL |
| **IP Info** | 返回任何 IP 地址的 ISP、地理位置和主机名数据 |
| **DNS Lookup** | 解析域名的 IPv4/IPv6、主机名和可达性 |
## 技术栈
| 层级 | 技术 |
|-------|-----------|
| 后端 | FastAPI (Python) |
| 前端 | HTML + Tailwind CSS + Vanilla JS |
| 主 LLM | Groq (`llama-3.3-70b-versatile`, `gpt-oss` 模型) |
| 辅助 LLM | Mistral (`mistral-large-latest`, `mistral-small-latest`, `ministral`) |
| 安全 APIs | Google Safe Browsing · VirusTotal · ipinfo.io · NVD CVE Database |
| 输出存储 | Fernet 加密的本地文件 —— 无需数据库 |
| AI 辅助开发 | GitHub Copilot (在整个开发过程中使用) |
## 项目结构
```
EDITH/
├── agents/
│ ├── brain.py # Agent 1 — System Brain
│ ├── tool_decider.py # Agent 2 — Tool Decider
│ ├── model_allocator.py # Agent 3 — Model Allocator
│ ├── executor.py # Agent 4 — Executor
│ ├── token_reviewer.py # Token usage auditor
│ └── self_improver.py # Prompt optimization agent
├── cyber/
│ ├── safe_browsing.py
│ ├── virustotal.py
│ ├── ipinfo.py
│ └── dns_lookup.py
├── features/
│ ├── repo_scanner.py
│ ├── api_tester.py
│ ├── threat_report_generator.py
│ ├── social_engineering.py
│ ├── cloud_auditor.py
│ ├── package_detector.py
│ ├── dockerfile_auditor.py
│ ├── red_team.py
│ └── cve_agent.py
├── pipelines/
│ ├── pipeline.py # Main orchestration pipeline
│ └── safety_pipeline.py # Output filtering (no AI)
├── utils/
│ ├── client.py # LLM client + token logger
│ └── safety_box.py # Encrypted result storage
├── UI/
│ ├── index.html # Login / Register
│ ├── setup.html # API key setup
│ ├── dashboard.html # Main interface
│ ├── style.css
│ └── script.js
├── main.py # FastAPI entry point
├── .env # API keys (not committed)
└── requirements.txt
```
## 快速开始
### 前置条件
- Python 3.10 或更高版本
- 现代网络浏览器
- (可选)VS Code 或任何代码编辑器
### 克隆仓库
```
git clone https://github.com/
由 Parin Prajapati 构建 · Microsoft Agents League 2026 · 创意应用赛道
标签:AI安全助手, AV绕过, DevSecOps, FastAPI, 上游代理, 多智能体, 威胁情报, 实时处理, 密码管理, 开发者工具, 漏洞分析, 路径探测, 逆向工具