Skip to content

Commit 2ac4b64

Browse files
committed
fix: 收紧规则误判和预过滤
1 parent 24e9bc6 commit 2ac4b64

18 files changed

Lines changed: 246 additions & 57 deletions

public/rules/headers/header-patterns.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@
3939
},
4040
{
4141
"name": "Spring Boot / Spring MVC",
42-
"patterns": ["spring|x-application-context"],
43-
"evidence": "响应头、Cookie 名称或 URL 包含后端框架线索"
42+
"patterns": [
43+
"(?:^|\\n)x-application-context:",
44+
"(?:^|\\n)(?:x-powered-by|server|set-cookie|cookie|x-framework|x-generator|x-application-name):[^\\n]*(?:\\bspring(?:[-\\s]?(?:boot|mvc|framework|security))\\b|spring-security)"
45+
],
46+
"evidence": "响应头或 Cookie 名称包含后端框架线索"
4447
},
4548
{
4649
"name": "Ruby on Rails",
@@ -89,8 +92,8 @@
8992
},
9093
{
9194
"name": "Phoenix",
92-
"patterns": ["phoenix|_csrf_token"],
93-
"evidence": "响应头、Cookie 名称或 URL 包含后端框架线索"
95+
"patterns": ["(?:^|\\n)(?:x-powered-by|server|set-cookie|cookie):[^\\n]*(?:\\bphoenix\\b|_phoenix_)"],
96+
"evidence": "响应头或 Cookie 名称包含后端框架线索"
9497
},
9598
{
9699
"name": "Go",

public/rules/headers/powered-by-products.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
},
187187
{
188188
"name": "Spring Boot / Spring MVC",
189-
"patterns": ["spring|springboot|spring boot"]
189+
"patterns": ["\\bspring(?:[-\\s]?(?:boot|mvc|framework))?\\b|\\bspringboot\\b"]
190190
},
191191
{
192192
"name": "Play Framework",
@@ -230,7 +230,7 @@
230230
},
231231
{
232232
"name": "Phoenix",
233-
"patterns": ["phoenix"]
233+
"patterns": ["\\bphoenix\\b"]
234234
},
235235
{
236236
"name": "Elixir / Plug",

public/rules/page/backend-hints-page.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"rules": [
107107
{
108108
"name": "Spring Boot / Spring MVC",
109-
"patterns": ["\\/actuator\\/|spring-security|_csrf|jsessionid"]
109+
"patterns": ["\\/actuator\\/|spring-security|spring-webmvc|springboot|x-application-context"]
110110
},
111111
{
112112
"name": "Struts",

public/rules/page/backend-hints.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{
2424
"name": "Spring Boot / Spring MVC",
2525
"confidence": "",
26-
"patterns": ["jsessionid", "spring-security", "_csrf"]
26+
"patterns": ["spring-security", "spring-webmvc", "springboot", "/actuator/"]
2727
},
2828
{
2929
"name": "Phoenix LiveView",

public/rules/page/bundle-license-libraries.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@
307307
"category": "UI / CSS 框架",
308308
"name": "Ant Design",
309309
"url": "https://ant.design",
310-
"patterns": ["antd|Ant Design|ant-design"]
310+
"patterns": ["@ant-design/", "Ant Design", "ant-design", "(?:^|[\\s/*!])antd\\s+v?\\d"]
311311
},
312312
{
313313
"category": "UI / CSS 框架",

public/rules/page/dynamic-asset-extractors.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
{
6666
"category": "主题 / 模板",
6767
"label": "Discuz! 模板",
68-
"pattern": "/template/([^/?#\"' <>]+)",
69-
"requires": "discuz|forum\\.php|portal\\.php|ucenter"
68+
"pattern": "/template/(discuz_[^/?#\"' <>]+)",
69+
"requires": "discuz|discuz_uid|/template/discuz_"
7070
},
7171
{
7272
"category": "主题 / 模板",

public/rules/page/dynamic-technologies.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{
2929
"name": "Next.js",
3030
"confidence": "",
31-
"patterns": ["/_next/", "__next"]
31+
"patterns": ["/_next/", "__next_data__", "__next_f"]
3232
},
3333
{
3434
"name": "Nuxt",
@@ -54,7 +54,7 @@
5454
},
5555
{
5656
"name": "Alpine.js",
57-
"patterns": ["alpinejs", "x-data", "x-init"]
57+
"patterns": ["alpinejs", "alpine:init", "window\\.Alpine"]
5858
},
5959
{
6060
"name": "htmx",
@@ -84,7 +84,7 @@
8484
},
8585
{
8686
"name": "Ant Design",
87-
"patterns": ["antd", "ant-design", "\\.ant-"]
87+
"patterns": ["(?:^|/)antd(?:\\.min)?\\.(?:js|css)", "ant-design", "\\.ant-"]
8888
},
8989
{
9090
"name": "Material UI",

public/rules/page/frontend-extra.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,7 @@
242242
},
243243
{
244244
"name": "Semi Design",
245-
"patterns": ["semi-design|@douyinfe\\/semi|semi-"],
246-
"classPrefixes": ["semi-"]
245+
"patterns": ["semi-design|@douyinfe\\/semi"]
247246
},
248247
{
249248
"name": "View UI / iView",

public/rules/page/frontend-frameworks.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@
8686
{
8787
"name": "Alpine.js",
8888
"patterns": ["alpinejs"],
89-
"globals": ["Alpine"],
90-
"selectors": ["[x-data]", "[x-init]", "[x-show]"]
89+
"globals": ["Alpine"]
9190
},
9291
{
9392
"name": "Stimulus",

public/rules/page/languages.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"name": "TypeScript",
1212
"kind": "前端源码语言线索",
1313
"confidence": "",
14-
"patterns": ["tslib", "\\.tsx?(?:\\?|#|$)", "typescript"]
14+
"patterns": ["(?:^|/)tslib(?:\\.esm)?\\.js(?:\\?|#|$)", "\\.tsx?(?:\\?|#|$)", "sourceMappingURL=[^\\s\"'<>]+\\.tsx?\\.map"]
1515
},
1616
{
1717
"name": "Node.js",
@@ -31,13 +31,10 @@
3131
"index\\.php",
3232
"phpsessid",
3333
"PHPSESSID",
34-
"wp-content",
3534
"laravel",
3635
"symfony",
37-
"drupal",
38-
"joomla",
3936
"thinkphp",
40-
"discuz"
37+
"discuz_uid"
4138
]
4239
},
4340
{
@@ -94,7 +91,7 @@
9491
},
9592
{
9693
"name": "Perl / CGI",
97-
"patterns": ["/cgi-bin/", "\\.cgi(?:\\?|#|$)", "\\.pl(?:\\?|#|$)", "mod_perl", "perl"]
94+
"patterns": ["/cgi-bin/", "\\.cgi(?:\\?|#|$)", "\\.pl(?:\\?|#|$)", "mod_perl"]
9895
}
9996
]
10097
},
@@ -129,7 +126,7 @@
129126
},
130127
{
131128
"name": "Elixir",
132-
"patterns": ["phoenix_live_view", "phx-click", "phoenix"]
129+
"patterns": ["phoenix_live_view", "phx-click", "phx-submit", "live_socket", "phoenix_live_reload"]
133130
}
134131
]
135132
}

0 commit comments

Comments
 (0)