Skip to content

Commit 9d9944c

Browse files
committed
更新国际化文本,添加安全性和性能相关的提示内容,增强用户对系统安全和性能的理解。确保多语言支持的准确性和一致性。
1 parent 899362b commit 9d9944c

2 files changed

Lines changed: 86 additions & 8 deletions

File tree

src/messages/en.json

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,27 @@
194194
"coreProcesses": {
195195
"name": "Core Processes",
196196
"prompts": {
197-
"mainFlow": "Please describe the typical processing steps and key function call sequence from frontend to backend when a user performs a main operation."
197+
"mainFlow": "Please describe the typical processing steps and key function call sequence from frontend to backend when a user performs a main operation.",
198+
"inputValidation": "For user inputs (such as URL parameters, form fields, HTTP headers), how does the system process and filter them? Are there any unvalidated or insufficiently sanitized input points that could lead to injection vulnerabilities (such as XSS, SQL injection, command injection)?",
199+
"authMechanism": "How are the system's authentication and authorization mechanisms implemented? Are there potential risk points for bypassing authentication, privilege escalation, or unauthorized access (IDOR)?",
200+
"sessionManagement": "How are sessions managed? Are there risks of session fixation, session hijacking, or cross-site request forgery (CSRF)?",
201+
"dependencySecurity": "Do third-party libraries or components used in the project have known public vulnerabilities (CVEs)? How are these dependencies checked and updated?",
202+
"sensitiveInfoExposure": "Are there hardcoded credentials, API keys, or other sensitive information in the code, configuration files, or logs? Do error messages reveal too much system detail?",
203+
"fileUploadHandling": "If the project supports file uploads, how are the type, size, and content of uploaded files validated? Is there a risk of uploading arbitrary files or path traversal?",
204+
"apiSecurity": "Do the project's API interfaces have access control? Are there risks of data leakage, unauthorized access, or abuse (such as unlimited retries, data traversal)?",
205+
"businessLogicVulnerabilities": "In core business processes, are there logical defects that could be maliciously exploited, such as bypassing payment, order fraud, or data tampering?",
206+
"configSecurity": "Are there security vulnerabilities in server, database, or middleware configurations, such as default credentials, unnecessary open ports, or insecure default settings?",
207+
"passwordPolicy": "How are user passwords stored (e.g., are they salted and hashed)? Are there weaknesses in password complexity, reset, and recovery mechanisms?",
208+
"clickjackingRisk": "Have front-end pages taken measures to prevent clickjacking (such as X-Frame-Options header)?",
209+
"ssrfRisk": "Are there functionality points in the system that allow users to control requests sent to internal or other servers, potentially leading to Server-Side Request Forgery (SSRF) vulnerabilities?",
210+
"xxeRisk": "If the project processes XML data, is the XML parser configured securely to prevent XML External Entity (XXE) attacks?",
211+
"deserializationVulnerabilities": "If the project uses object serialization and deserialization, is the input data trustworthy? Is there a risk of executing arbitrary code through deserialization?",
212+
"debuggingFunctions": "Are there debugging functions, interfaces, or backdoors in the production environment that should not exist?",
213+
"httpSecurityHeaders": "Does the web application use recommended HTTP security headers, such as CSP (Content Security Policy), HSTS (HTTP Strict Transport Security), etc.?",
214+
"rateLimiting": "Are there appropriate rate limits for sensitive operations such as login attempts and API calls to prevent brute force attacks or resource exhaustion attacks?",
215+
"unsafeRedirects": "Can URL redirection or request forwarding functions in the system be controlled by malicious users, leading to phishing or directing users to malicious sites?",
216+
"errorHandling": "How does the system handle errors or exceptions? Does it expose too many internal implementation details or stack trace information to users?",
217+
"securityAuditing": "Does the system record sufficient security-related logs (such as login attempts, permission changes, key operations) for post-event auditing and tracking suspicious behavior?"
198218
}
199219
},
200220
"components": {
@@ -312,9 +332,28 @@
312332
}
313333
},
314334
"performance": {
315-
"name": "Performance Critical Paths",
316-
"prompts": {
317-
"bottlenecks": "In typical operations, which code paths or computational links may have the greatest impact on performance? Does the project have targeted optimizations?"
335+
"name": "Performance",
336+
"prompts": {
337+
"bottleneckIdentification": "Which parts or operations in the project are most likely to become performance bottlenecks? What methods or tools are typically used to locate them?",
338+
"keyPerformanceIndicators": "What key performance indicators (KPIs) does the project focus on (such as response time, throughput, concurrent users)? What are the target values for these indicators?",
339+
"databasePerformance": "How efficient are database queries? Are there slow queries, unreasonable indexes, or excessive database interactions affecting performance?",
340+
"memoryUsage": "How is the application's memory usage? Are there memory leaks, unreasonable memory allocations, or frequent garbage collection (GC) issues?",
341+
"cpuUsageAnalysis": "Which types of calculations or operations consume the most CPU resources? Are there specific optimizations to reduce CPU load?",
342+
"networkIO": "How do network requests (such as API calls, resource loading) latency and throughput affect overall performance? Are there optimization measures (such as compression, CDN)?",
343+
"cachingStrategies": "What caching strategies (such as data caching, page caching, CDN caching) are used in the project to improve performance? How are cache hit rates and update mechanisms implemented?",
344+
"asyncConcurrentProcessing": "How are asynchronous processing and concurrency mechanisms (such as thread pools, coroutines, message queues) used to optimize response speed and improve system throughput?",
345+
"algorithmEfficiency": "Are there inefficient algorithms or data structures in the code that could become performance bottlenecks?",
346+
"frontendOptimization": "In terms of frontend performance, such as page loading speed (FCP, LCP), rendering efficiency, resource size, and user interaction response, what are the main optimization approaches and focus areas?",
347+
"codeLevelOptimization": "At the code writing level, has the project adopted some common performance optimization techniques (such as reducing loop nesting, avoiding unnecessary calculations, lazy loading)?",
348+
"performanceTesting": "How does the project conduct performance testing (such as stress testing, load testing, benchmark testing)? How do test results guide optimization?",
349+
"scalabilityDesign": "How does the current architecture perform and scale horizontally/vertically when load increases?",
350+
"resourceManagement": "Is the management of key system resources (such as database connection pools, thread pools) efficient to avoid resource exhaustion or contention?",
351+
"thirdPartyDependencies": "How do external API calls or third-party libraries' performance affect overall system performance? Are there monitoring and response strategies?",
352+
"startupTime": "How does the application's startup time and initialization process affect user-perceived performance or system availability? Is there room for optimization?",
353+
"loggingImpact": "Do the level and method of logging significantly affect performance? Does the performance monitoring system itself introduce non-negligible overhead?",
354+
"specificScenarioTuning": "Has specialized performance tuning been done for specific high-concurrency or large data volume scenarios in the project?",
355+
"performanceRegression": "Are there mechanisms to prevent regression of optimized performance points? How are potential performance issues detected early in the development process?",
356+
"configurationImpact": "In the project's configuration files, which parameters have direct or indirect important impacts on performance (such as thread count, cache size, timeout settings)?"
318357
}
319358
},
320359
"codeReuse": {

src/messages/zh.json

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,27 @@
260260
"coreProcesses": {
261261
"name": "核心流程",
262262
"prompts": {
263-
"mainFlow": "请描述当用户执行主要操作时,从前端到后端的典型处理步骤和关键函数调用顺序。"
263+
"mainFlow": "请描述当用户执行主要操作时,从前端到后端的典型处理步骤和关键函数调用顺序。",
264+
"inputValidation": "对于用户输入(如URL参数、表单字段、HTTP头部),系统是如何进行处理和过滤的?是否存在未经验证或未充分净化的输入点,可能导致注入类漏洞(如XSS、SQL注入、命令注入)?",
265+
"authMechanism": "系统的认证和授权机制是如何实现的?是否存在绕过认证、权限提升或越权访问(IDOR)的潜在风险点?",
266+
"sessionManagement": "会话(Session)是如何管理的?是否存在会话固定、会话劫持或跨站请求伪造(CSRF)的风险?",
267+
"dependencySecurity": "项目依赖的第三方库或组件版本是否存在已知的公开漏洞(CVE)?如何检查和更新这些依赖?",
268+
"sensitiveInfoExposure": "代码、配置文件或日志中是否存在硬编码的凭证、API密钥或其他敏感信息?错误信息是否会泄露过多的系统细节?",
269+
"fileUploadHandling": "如果项目支持文件上传,对上传文件的类型、大小和内容是如何校验的?是否存在上传任意文件或路径遍历的风险?",
270+
"apiSecurity": "项目的API接口是否有访问控制?是否存在数据泄露、未授权访问或滥用(如无限次重试、数据遍历)的风险?",
271+
"businessLogicVulnerabilities": "在核心业务流程中,是否存在可以被恶意利用的逻辑缺陷,例如绕过支付、刷单、数据篡改等?",
272+
"configSecurity": "服务器、数据库或中间件的配置是否存在安全隐患,例如默认凭证、不必要的开放端口、不安全的默认设置?",
273+
"passwordPolicy": "用户密码是如何存储的(例如,是否加盐哈希)?密码复杂度、重置和找回机制是否存在薄弱环节?",
274+
"clickjackingRisk": "前端页面是否采取了防点击劫持的措施(如X-Frame-Options头部)?",
275+
"ssrfRisk": "系统是否存在功能点允许用户控制发往内部或其他服务器的请求,可能导致SSRF漏洞?",
276+
"xxeRisk": "如果项目处理XML数据,XML解析器是否配置安全,以防止XXE攻击?",
277+
"deserializationVulnerabilities": "如果项目使用了对象的序列化和反序列化,输入的数据是否可信?是否存在利用反序列化执行任意代码的风险?",
278+
"debuggingFunctions": "生产环境中是否残留了不应存在的调试功能、接口或后门?",
279+
"httpSecurityHeaders": "Web应用是否使用了推荐的HTTP安全头部,如CSP (Content Security Policy)、HSTS (HTTP Strict Transport Security)等?",
280+
"rateLimiting": "对于登录尝试、API调用等敏感操作,是否有适当的速率限制来防止暴力破解或资源耗尽攻击?",
281+
"unsafeRedirects": "系统中的URL重定向或请求转发功能是否可能被恶意用户控制,导致钓鱼或将用户导向恶意站点?",
282+
"errorHandling": "当发生错误或异常时,系统是如何处理的?是否会向用户暴露过多内部实现细节或堆栈跟踪信息?",
283+
"securityAuditing": "系统是否记录了足够的安全相关日志(如登录尝试、权限变更、关键操作),以便于事后审计和追踪可疑行为?"
264284
}
265285
},
266286
"components": {
@@ -378,9 +398,28 @@
378398
}
379399
},
380400
"performance": {
381-
"name": "性能关键路径",
382-
"prompts": {
383-
"bottlenecks": "在典型操作中,哪些代码路径或计算环节可能对性能影响最大?项目是否有针对性的优化?"
401+
"name": "性能",
402+
"prompts": {
403+
"bottleneckIdentification": "项目中哪些部分或操作最容易成为性能瓶颈?通常通过什么方法或工具来定位它们?",
404+
"keyPerformanceIndicators": "项目关注哪些关键的性能指标(如响应时间、吞吐量、并发用户数)?这些指标的目标值是多少?",
405+
"databasePerformance": "数据库查询的效率如何?是否存在慢查询、不合理的索引或过多的数据库交互影响性能?",
406+
"memoryUsage": "应用的内存使用情况如何?是否存在内存泄漏、不合理的内存分配或频繁的GC(垃圾回收)问题?",
407+
"cpuUsageAnalysis": "哪些类型的计算或操作最消耗CPU资源?是否有针对性的优化来降低CPU负载?",
408+
"networkIO": "网络请求(如API调用、资源加载)的延迟和吞吐量对整体性能影响如何?是否有优化措施(如压缩、CDN)?",
409+
"cachingStrategies": "项目中运用了哪些缓存策略(如数据缓存、页面缓存、CDN缓存)来提升性能?缓存的命中率和更新机制是怎样的?",
410+
"asyncConcurrentProcessing": "异步处理和并发机制(如线程池、协程、消息队列)是如何被用来优化响应速度和提高系统吞吐能力的?",
411+
"algorithmEfficiency": "代码中是否存在低效的算法或数据结构,可能成为性能瓶颈?",
412+
"frontendOptimization": "前端性能方面,如页面加载速度(FCP, LCP)、渲染效率、资源大小和用户交互响应,有哪些主要的优化手段和关注点?",
413+
"codeLevelOptimization": "在代码编写层面,项目是否采用了一些通用的性能优化技巧(如减少循环嵌套、避免不必要的计算、延迟加载)?",
414+
"performanceTesting": "项目如何进行性能测试(如压力测试、负载测试、基准测试)?测试结果如何指导优化?",
415+
"scalabilityDesign": "当前架构在负载增加时,其性能表现和水平/垂直扩展能力如何?",
416+
"resourceManagement": "关键系统资源(如数据库连接池、线程池)的管理是否高效,以避免资源耗尽或竞争?",
417+
"thirdPartyDependencies": "外部API调用或第三方库的性能表现对整体系统性能有何影响?是否有监控和应对策略?",
418+
"startupTime": "应用的启动时间和初始化过程对用户感知性能或系统可用性的影响如何?是否有优化空间?",
419+
"loggingImpact": "日志记录的级别和方式是否对性能有显著影响?性能监控系统本身是否引入了不可忽视的开销?",
420+
"specificScenarioTuning": "针对项目中的特定高并发或大数据量场景,是否进行了专门的性能调优?",
421+
"performanceRegression": "是否有机制来防止已优化的性能点发生回归?如何在开发流程中尽早发现潜在性能问题?",
422+
"configurationImpact": "项目的配置文件中,哪些参数对性能有直接或间接的重要影响(如线程数、缓存大小、超时设置)?"
384423
}
385424
},
386425
"codeReuse": {

0 commit comments

Comments
 (0)