VladimirRamirez07/incident-response-toolkit

GitHub: VladimirRamirez07/incident-response-toolkit

一套全栈 SOC 平台,实现安全告警实时汇聚、事件分级分类、分析师协作分派与事后报告生成。

Stars: 1 | Forks: 0

# 🛡️ 事件响应工具包 ![Python](https://img.shields.io/badge/Python-3.11-3776AB?style=flat-square&logo=python&logoColor=white) ![FastAPI](https://img.shields.io/badge/FastAPI-0.110-009688?style=flat-square&logo=fastapi&logoColor=white) ![React](https://img.shields.io/badge/React-18-61DAFB?style=flat-square&logo=react&logoColor=black) ![Vite](https://img.shields.io/badge/Vite-5.0-646CFF?style=flat-square&logo=vite&logoColor=white) ![PostgreSQL](https://img.shields.io/badge/PostgreSQL-15-336791?style=flat-square&logo=postgresql&logoColor=white) ![Docker](https://img.shields.io/badge/Docker-Compose-2496ED?style=flat-square&logo=docker&logoColor=white) ![SQLAlchemy](https://img.shields.io/badge/SQLAlchemy-2.0-D71F00?style=flat-square&logo=sqlalchemy&logoColor=white) ![Pydantic](https://img.shields.io/badge/ Pydantic-2.6-E92063?style=flat-square&logo=pydantic&logoColor=white) ![WebSockets](https://img.shields.io/badge/WebSockets-Real--time-010101?style=flat-square&logo=socketdotio&logoColor=white) ![ReportLab](https://img.shields.io/badge/ReportLab-PDF-FF0000?style=flat-square&logo=adobeacrobatreader&logoColor=white) ![Axios](https://img.shields.io/badge/Axios-1.6-5A29E4?style=flat-square&logo=axios&logoColor=white) ![License](https://img.shields.io/badge/License-MIT-green?style=flat-square) ## 🎯 概述 一个全栈安全运营中心 (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, 事后分析报告, 云安全架构, 告警管理, 告警集中管理, 安全事件分类, 安全运营, 安全运营中心, 安全防御评估, 实时通信, 容器化, 扫描框架, 提示词优化, 无后门, 时间线追踪, 案件分派, 测试用例, 网络安全, 网络映射, 请求拦截, 逆向工具, 隐私保护