Fegi176/SentinelView

GitHub: Fegi176/SentinelView

一个聚合多个开源威胁情报源并提供可视化仪表板的Web应用,用于提升安全威胁的识别与响应效率。

Stars: 0 | Forks: 0

# SentinelView视图 一款网络安全OSINT威胁情报web应用程序。 ## 截图 ![概览仪表板](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/e64bc9578d061059.jpg) *概览 — 严重性分类、快速统计以及近期关键威胁信息流* ![地理视图 — 3D地球仪](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/0469eb4a19061059.jpg) *地理视图 — 带有实时攻击弧可视化效果的交互式3D威胁地球仪* ![威胁信息流](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/0136e275c5061100.jpg) *威胁信息流 — 可过滤的情报队列及完整的威胁详情面板* ![分析 — 图表](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/0d37602e24061101.jpg) *分析 — 威胁趋势时间线、严重性随时间变化、行业风险以及评分分布* ![分析 — 来源健康状况](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/fb8f246b15061101.jpg) *分析 — 每个数据源的摄取健康状况表(AlienVault OTX, NIST NVD, MITRE ATT&CK, abuse.ch, RSS 信息流)* ## 概述 SentinelView 汇聚、丰富、存储并可视化来自公共和API支持数据源的威胁情报。后端运行 FastAPI,PostgreSQL 存储威胁数据,前端提供仪表板以展示数据源健康状况、趋势、地理分布和威胁详情。 ## 技术栈 ![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white) ![FastAPI](https://img.shields.io/badge/FastAPI-009688?style=for-the-badge&logo=fastapi&logoColor=white) ![SQLAlchemy](https://img.shields.io/badge/SQLAlchemy-D71F00?style=for-the-badge&logo=sqlalchemy&logoColor=white) ![Pydantic](https://img.shields.io/badge/Pydantic-E92063?style=for-the-badge&logo=pydantic&logoColor=white) ![PostgreSQL](https://img.shields.io/badge/PostgreSQL-4169E1?style=for-the-badge&logo=postgresql&logoColor=white) ![spaCy](https://img.shields.io/badge/spaCy-09A3D5?style=for-the-badge&logo=spacy&logoColor=white) ![React](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB) ![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-06B6D4?style=for-the-badge&logo=tailwindcss&logoColor=white) ![Recharts](https://img.shields.io/badge/Recharts-22B5BF?style=for-the-badge&logo=chartdotjs&logoColor=white) ![Leaflet](https://img.shields.io/badge/Leaflet-199900?style=for-the-badge&logo=leaflet&logoColor=white) ![Docker](https://img.shields.io/badge/Docker-2496ED?style=for-the-badge&logo=docker&logoColor=white) ![Nginx](https://img.shields.io/badge/Nginx-009639?style=for-the-badge&logo=nginx&logoColor=white) ![GitHub Actions](https://img.shields.io/badge/GitHub_Actions-2088FF?style=for-the-badge&logo=githubactions&logoColor=white) ![pytest](https://img.shields.io/badge/pytest-0A9EDC?style=for-the-badge&logo=pytest&logoColor=white) ## 项目结构 ``` SentinelView/ |-- backend/ # FastAPI backend | |-- scrapers/ # OSINT data collection modules | |-- nlp/ # NLP and severity enrichment | `-- routers/ # API routes (threats + stats + admin) |-- frontend/ # React frontend |-- tests/ # Backend tests |-- docker-compose.yml |-- .env # Local secrets/config, not committed `-- pytest.ini ``` 数据库Schema在启动时由`backend/database.py`中的`Base.metadata.create_all()`和`ensure_database_schema()`创建并进行轻量级迁移——没有Alembic迁移历史。 ## 配置 将`.env.example`复制为`.env`并填入所需值。 重要变量: ``` POSTGRES_USER= POSTGRES_PASSWORD= POSTGRES_DB= DATABASE_URL= OTX_API_KEY= ALIENVAULT_OTX_API_KEY= ABUSECH_AUTH_KEY= THREATFOX_AUTH_KEY= MALWAREBAZAAR_AUTH_KEY= ``` 在Docker内部,`docker-compose.yml`会覆盖`DATABASE_URL`,使后端使用`db`服务。 ## Docker启动 启动整个服务栈: ``` docker compose up -d --build ``` 访问: ``` Frontend: http://localhost:3000 Backend: http://localhost:8000 Docs: http://localhost:8000/docs ``` 停止服务栈而不删除数据库数据: ``` docker compose down ``` ## 全新数据库数据摄取 当后端启动且`threats`表为空时,会自动运行: ``` run_full_pipeline() _run_mitre_pipeline() ``` `run_full_pipeline()` 拉取: - RSS信息流 - AlienVault OTX - NIST NVD - abuse.ch ThreatFox - abuse.ch MalwareBazaar `_run_mitre_pipeline()` 拉取 MITRE ATT&CK。 AlienVault OTX 限制为`30`页,每页`50`个脉冲(pulses),因此一次运行最多可拉取`1500`个OTX脉冲。 ## 验证数据 已存储的威胁总数: ``` docker compose exec -T db psql -U sentinelview -d sentinelview -c "select count(*) from threats;" ``` 按来源分类的威胁: ``` docker compose exec -T db psql -U sentinelview -d sentinelview -c "select source_name, count(*) from threats group by source_name order by count desc;" ``` 抓取日志: ``` docker compose exec -T db psql -U sentinelview -d sentinelview -c "select source_name, status, articles_found, new_articles, error_message from scrape_logs order by id;" ``` 数据源健康状况API: ``` curl http://localhost:8000/api/stats/source-health ``` ## 手动数据摄取命令 运行常规的完整数据处理流程: ``` docker compose exec -T backend python -c "from backend.scheduler import run_full_pipeline; run_full_pipeline()" ``` 仅运行MITRE处理: ``` docker compose exec -T backend python -c "from backend.scheduler import _run_mitre_pipeline; _run_mitre_pipeline()" ``` 仅拉取AlienVault OTX数据而不保存到数据库: ``` docker compose exec -T backend python -c "from backend.scrapers.otx_scraper import OtxScraper; print(len(OtxScraper().scrape()))" ``` ## 测试 当在本地安装了Python依赖后: ``` python -m pytest ``` ## 许可证 MIT — 请参阅 [许可证](LICENSE)。
标签:3D地球, AV绕过, Docker, ESC4, FastAPI, GPT, Mutation, OSINT, PostgreSQL, Pydantic, Python, React, spaCy, SQLAlchemy, Syscalls, Tailwind CSS, 严重性评分, 代码示例, 仪表板, 可视化, 地理信息, 威胁情报, 威胁聚合, 威胁馈送, 安全规则引擎, 安全运营, 安全防御评估, 开发者工具, 情报收集, 扫描框架, 数据分析, 无后门, 测试用例, 源健康监控, 漏洞研究, 漏洞管理, 网络威胁, 网络安全, 请求拦截, 趋势分析, 逆向工具, 隐私保护