VladimirRamirez07/incident-response-toolkit
GitHub: VladimirRamirez07/incident-response-toolkit
一套全栈 SOC 平台,实现安全告警实时汇聚、事件分级分类、分析师协作分派与事后报告生成。
Stars: 1 | Forks: 0
# 🛡️ 事件响应工具包












## 🎯 概述
一个全栈安全运营中心 (SOC) 平台,可集中实时安全警报,按严重程度 (P1–P4) 对事件进行分类,将案件分配给分析师,记录完整的事件时间线,并生成可导出的事后分析报告。
## ✨ 功能特性
- 🚨 通过 WebSockets 实现**实时警报**
- 📊 **事件分类** P1 (严重) → P4 (低)
- 👥 将案件**分配**给 SOC 分析师
- 📅 针对每个事件的**完整时间线**追踪
- 📄 可导出的**事后分析 PDF 报告**
- 🔒 基于 FastAPI 的 **RESTful API** + 自动 Swagger 文档
- 🐳 使用 Docker Compose **完全容器化**
## 🏗️ 架构
```
incident-response-toolkit/
│
├── backend/
│ ├── app/
│ │ ├── api/
│ │ │ ├── incidents.py
│ │ │ ├── alerts.py
│ │ │ ├── reports.py
│ │ │ └── websockets.py
│ │ ├── models/
│ │ │ ├── incident.py
│ │ │ ├── user.py
│ │ │ └── alert.py
│ │ ├── schemas/
│ │ │ ├── incident.py
│ │ │ ├── user.py
│ │ │ └── alert.py
│ │ ├── services/
│ │ │ ├── websocket_manager.py
│ │ │ └── report_generator.py
│ │ ├── config.py
│ │ ├── database.py
│ │ └── main.py
│ ├── requirements.txt
│ └── Dockerfile
│
├── frontend/
│ └── src/
│ ├── api/
│ │ ├── client.js
│ │ └── websocket.js
│ ├── components/
│ │ ├── IncidentCard.jsx
│ │ └── AlertBadge.jsx
│ ├── pages/
│ │ └── Dashboard.jsx
│ ├── App.jsx
│ └── main.jsx
│
├── docker-compose.yml
└── README.md
```
## 🚀 快速开始
### 前置条件
- Docker & Docker Compose
- Node.js 20+
- Python 3.11+
### 使用 Docker 运行
```
git clone https://github.com/VladimirRamirez07/incident-response-toolkit.git
cd incident-response-toolkit
docker-compose up --build
```
### 访问地址
| 服务 | URL |
|---------|-----|
| 前端仪表盘 | http://localhost:3000 |
| 后端 API | http://localhost:8000 |
| Swagger API 文档 | http://localhost:8000/docs |
| ReDoc API 文档 | http://localhost:8000/redoc |
## 📡 API 接口
### 事件
| 方法 | 接口 | 描述 |
|--------|----------|-------------|
| GET | `/api/v1/incidents/` | 列出所有事件 |
| POST | `/api/v1/incidents/` | 创建事件 |
| GET | `/api/v1/incidents/{id}` | 获取事件 |
| PUT | `/api/v1/incidents/{id}` | 更新事件 |
| DELETE | `/api/v1/incidents/{id}` | 删除事件 |
### 警报
| 方法 | 接口 | 描述 |
|--------|----------|-------------|
| GET | `/api/v1/alerts/` | 列出所有警报 |
| POST | `/api/v1/alerts/` | 创建警报 (触发 WebSocket) |
| PUT | `/api/v1/alerts/{id}` | 更新警报 |
### 报告
| 方法 | 接口 | 描述 |
|--------|----------|-------------|
| GET | `/api/v1/reports/incidents/{id}/postmortem` | 导出 PDF 报告 |
### WebSocket
| 接口 | 描述 |
|----------|-------------|
| `ws://localhost:8000/api/v1/ws` | 实时警报广播 |
## 🔴 严重级别
| 级别 | 名称 | SLA |
|-------|------|-----|
| 🔴 P1 | 严重 | 立即响应 |
| 🟠 P2 | 高 | 1 小时内响应 |
| 🟡 P3 | 中 | 4 小时内响应 |
| 🟢 P4 | 低 | 24 小时内响应 |
## 🛠️ 技术栈
| 层级 | 技术 |
|-------|-----------|
| 后端 | Python 3.11, FastAPI, SQLAlchemy, Alembic |
| 前端 | React 18, Vite, Recharts, Lucide |
| 数据库 | PostgreSQL 15 |
| 实时通信 | WebSockets |
| 报告 | ReportLab (PDF) |
| 认证 | JWT (python-jose, passlib) |
| DevOps | Docker, Docker Compose |
## 👤 作者
**Vladimir Ramirez**
- GitHub: [@VladimirRamirez07](https://github.com/VladimirRamirez07)
## 📄 许可证
MIT 许可证 — 可自由将此项目用于您的作品集。
标签:AV绕过, Axios, Docker, Docker Compose, FastAPI, MIT开源协议, NIDS, P1-P4严重性分级, PDF报告导出, PostgreSQL, Pydantic, Python, React, ReportLab, RESTful API, SecOps, SOC平台, SQLAlchemy, Swagger, Syscalls, Vite, WebSockets, 事后分析报告, 云安全架构, 告警管理, 告警集中管理, 安全事件分类, 安全运营, 安全运营中心, 安全防御评估, 实时通信, 容器化, 扫描框架, 提示词优化, 无后门, 时间线追踪, 案件分派, 测试用例, 网络安全, 网络映射, 请求拦截, 逆向工具, 隐私保护