fix: 全仓库深度安全审查与优化修复(30 文件,Critical/High/Medium 级缺陷) - #16
Merged
ClassTechStar merged 35 commits intoAug 9, 2026
Merged
Conversation
ClassTechStar
force-pushed
the
fix/comprehensive-bugfix-and-optimization
branch
from
August 9, 2026 12:16
800dff8 to
7d73cf2
Compare
…tOfRange on empty option IDs
ClassTechStar
force-pushed
the
fix/comprehensive-bugfix-and-optimization
branch
from
August 9, 2026 12:21
7d73cf2 to
05e51b3
Compare
- ci.yml: Remove redundant working-directory from RenderService step to prevent path nesting error (cd + working-directory conflict) - gateway/package.json: Revert @types/express to ^5.0.0 to match the generated package-lock.json, fixing npm ci failure - FileService/Program.cs: Add explicit null-check for values[0] in GatewayUser to fix CS8602 compiler warning
…ue even when empty string
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 对 GalReview 仓库进行了全面的代码审查与深度优化,覆盖 8 个微服务、网关、前端和部署配置,共修复 30+ 个文件中的 Critical / High / Medium 级缺陷。
修复分类
Critical(安全漏洞)
TryTransitionJob调用未隔离,MongoDB 不可达时 job 永久卡死trust proxy硬编码为 1,匿名限流可被 X-Forwarded-For 绕过USER $APP_UID或USER ocruserHigh(安全/可用性)
ex.Message直接返回给客户端,泄露内部异常细节ReadBoundedAsync(64KB 上限)??失效env()改用v.length > 0检查clearTimeout在 try 体内,异常路径定时器泄漏next(err)委托 Express@types/express: ^5.0.0与运行时 express v4 不匹配^4.17.21signal?: AbortSignal参数Medium/Low(性能/健壮性)
CountDocuments(Empty)全表扫描EstimatedDocumentCount()CryptographicOperations.FixedTimeEquals部署配置优化
--chown确保文件属主正确ASPNETCORE_URLS=http://+:8080测试
文件清单(30 文件)
Gateway(5): config.ts, index.ts, errorHandler.ts, health.ts, package.json
Frontend(4): poll.ts, workflow.ts, KnowledgePointsPage.tsx, server.mjs
GalGameService(4): Program.cs, CreditBillingClient.cs, MongoGameStore.cs, appsettings.json
PracticeService(3): ReciteQuestionGenerator.cs, SharedPracticePackageStore.cs, ModelScoring.cs
RenderService(2): adapter.ts, sessions.ts
FileService(1): Program.cs
CreditService(1): Program.cs
OCRService(1): app.py
Dockerfile(6): AuthService, FileService, OCRService, CreditService, PracticeService, KnowledgeService
配置/CI/部署(7): compose.integration.yaml, ci.yml, nginx.conf, .env.windows.production.example, gateway/.env.example, appsettings.Development.json, deploy env