Repository navigation
feat(security): 新增恶意请求识别、访客详情与网关安全加固 - #34
Merged
Merged
Conversation
added 6 commits
October 31, 2026 13:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
本 PR 汇总网关安全加固、访客详情、Cloudflare Turnstile 修复、SPA 路由修复,以及新增的本地自适应威胁检测和 Jev 恶意请求批量识别。
主要目标:
主要变更
安全中心:访客详情
/security/visitors页面和菜单入口本地自适应威胁检测
.env、.git、路径穿越、配置文件、云元数据、脚本 webshell、actuator、MCP/SSE 等高危路径即时阻断8 = 自适应拦截Jev 恶意请求识别
0.8、周期4h、回看24h、单轮最多20个 IP/、JS/CSS、图片、视频、音频、字体、常见文档和静态资源目录jev-yyyyMMdd-HHmmss-人工/jev-yyyyMMdd-HHmmss-自动Jev 持久化后台队列
jev_threat_batch.status = 'queued',接口立即返回JevThreatWorkerService消费数据库队列running,避免重复执行queued任务继续处理running任务会标记失败,避免僵尸任务永久占用队列安全加固与修复
X-Content-Type-Options、X-Frame-Options、Referrer-Policy和Permissions-PolicyUseDefaultFiles()和MapFallbackToFile("index.html")提供标准 SPA 路由回退本地构建边界
web/dist数据库变更
user_version = 3jev_threat_state:保存每 IP 判断水位线和最近结果jev_threat_batch:保存 queued/running/completed/failed 队列状态jev_threat_evaluation:保存模型概率、耗时、token 和错误信息CREATE TABLE IF NOT EXISTS自动创建data/stats.db验证
238/238通过/api/v1/statistics/visitorsAPI 实测正常JevThreatWorkerService执行已知验证边界
queued任务,但不会恢复已经处于running的同一次模型调用建议 Review 重点
回滚
gateway.config、appsettings.json和data/stats.db