feat(rules): 增强多条检测规则并修复 Vercel 误报#19
Open
moyanj wants to merge 2 commits into
Open
Conversation
- React Router: 添加 __reactRouterVersion 全局变量检测 - Vue: 添加 __VUE_DEVTOOLS_GLOBAL_HOOK__ 全局变量检测 - Discourse: 增强检测(meta generator、discourse-version、更多 globals、selectors) - OpenList: 新增规则(meta generator、OPENLIST_CONFIG) - Cloudreve: 新增规则(cloudreve-frontend) - VuePress: 添加 meta generator 标签检测 - Vercel: 修复误报,移除 x-matched-path 作为判断依据
审阅者指南(在小型 PR 上折叠)审阅者指南此 PR 通过添加新的全局变量和 meta 标签启发式规则,细化了多个前端框架与网站程序的检测规则,同时收紧了基于响应头的 Vercel 检测,以减少误报。 文件级变更
提示与命令与 Sourcery 交互
自定义你的体验访问你的 仪表盘 以:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR refines several detection rules for frontend frameworks and website programs by adding new global variable and meta tag heuristics, while tightening header-based Vercel detection to reduce false positives. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - 我在这里给出一些整体性的反馈:
- 对于新的基于全局变量的检测(例如 React Router、Vue、Discourse),在可行的情况下可以考虑再增加一个确认信号(比如一个选择器或 meta 标签),以降低那些偶然定义了类似全局变量的网站带来新的误报风险。
- 针对新的基于 meta generator 的规则(Discourse、OpenList、VuePress)以及对 Vercel 头部的调整,建议检查是否与现有模式存在重叠或冲突;同时可以考虑对 generator 字符串匹配进行标准化(例如统一使用不区分大小写匹配和锚定),这样可以使不同规则之间的行为更加可预期。
供 AI 代理使用的提示词
Please address the comments from this code review:
## Overall Comments
- For the new global-variable based detections (e.g., React Router, Vue, Discourse), consider adding an additional confirming signal (like a selector or meta tag) where feasible to reduce the risk of new false positives from sites that accidentally define similar globals.
- The new meta generator–based rules (Discourse, OpenList, VuePress) and the Vercel header adjustments should be checked for overlap/conflicts with existing patterns; it may help to standardize generator string matching (e.g., consistent use of case-insensitive matching and anchoring) so behavior is predictable across different rules.帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据这些反馈改进为你提供的代码评审。
Original comment in English
Hey - I've left some high level feedback:
- For the new global-variable based detections (e.g., React Router, Vue, Discourse), consider adding an additional confirming signal (like a selector or meta tag) where feasible to reduce the risk of new false positives from sites that accidentally define similar globals.
- The new meta generator–based rules (Discourse, OpenList, VuePress) and the Vercel header adjustments should be checked for overlap/conflicts with existing patterns; it may help to standardize generator string matching (e.g., consistent use of case-insensitive matching and anchoring) so behavior is predictable across different rules.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- For the new global-variable based detections (e.g., React Router, Vue, Discourse), consider adding an additional confirming signal (like a selector or meta tag) where feasible to reduce the risk of new false positives from sites that accidentally define similar globals.
- The new meta generator–based rules (Discourse, OpenList, VuePress) and the Vercel header adjustments should be checked for overlap/conflicts with existing patterns; it may help to standardize generator string matching (e.g., consistent use of case-insensitive matching and anchoring) so behavior is predictable across different rules.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
- server-products: 新增 WEBrick、Python http.server、GoAhead、lighttpd、Payara、IBM HTTP Server、Sinopia、NodeBB、RESTHeart - powered-by-products: 新增 Sinopia、NodeBB、RESTHeart、Payara Server、Servlet、JSP - interesting-headers: 新增 kbn-name/kbn-version、liferay-portal、x-hudson/x-hudson-cli-port、x-app-name、x-cascade - header-patterns: 新增 Kibana(kbn 头)、Grafana(grafana_sess cookie)、Jenkins(X-Hudson 头)、SonarQube(_sonar_session cookie)、Sinatra(X-Cascade + __sinatra__ 资源)、Perl Mojolicious、Liferay Portal
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.
改动内容
__reactRouterVersion全局变量检测__VUE_DEVTOOLS_GLOBAL_HOOK__全局变量检测server-products: 新增 WEBrick、Python http.server、GoAhead、lighttpd、Payara、IBM HTTP Server、Sinopia、NodeBB、RESTHeartpowered-by-products: 新增 Sinopia、NodeBB、RESTHeart、Payara Server、Servlet、JSPinteresting-headers: 新增kbn-name/kbn-version、liferay-portal、x-hudson/x-hudson-cli-port、x-app-name、x-cascadeheader-patterns: 新增 Kibana(kbn 响应头)、Grafana(grafana_sesscookie)、Jenkins(X-Hudson响应头)、SonarQube(_sonar_sessioncookie)、Sinatra(X-Cascade+__sinatra__资源路径)、Perl Mojolicious、Liferay Portal改动文件
public/rules/headers/header-patterns.jsonpublic/rules/headers/interesting-headers.jsonpublic/rules/headers/powered-by-products.jsonpublic/rules/headers/server-products.jsonpublic/rules/page/frontend-extra.jsonpublic/rules/page/frontend-frameworks.jsonpublic/rules/page/website-programs.jsonSummary by Sourcery
增强前端技术检测规则,解决 Vercel 误报问题,并从 nmap-service-probes 中提取高价值 Web 技术栈识别特征。
新特性:
__reactRouterVersion全局变量添加 React Router 检测。__VUE_DEVTOOLS_GLOBAL_HOOK__全局变量添加 Vue 检测。OPENLIST_CONFIG全局变量添加 OpenList 检测。cloudreve-frontend标识符添加 Cloudreve 检测。错误修复:
x-matched-path请求头,以消除误报。增强内容:
kbn-name、kbn-version、liferay-portal、x-hudson、x-app-name、x-cascade等应用专属头。Original summary in English
Summary by Sourcery
Enhance frontend technology detection rules, address Vercel false positives, and extract high-value web tech stack identification features from nmap-service-probes.
New Features:
Bug Fixes:
Enhancements: