Skip to content

Commit 6201597

Browse files
committed
fix: 修正 GitHub 站点规则识别
1 parent d5fbe50 commit 6201597

7 files changed

Lines changed: 45 additions & 8 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "stackprism",
33
"private": true,
4-
"version": "1.2.60",
4+
"version": "1.2.61",
55
"type": "module",
66
"description": "StackPrism 用于检测网页前端、后端、CDN、SaaS、广告营销、统计、登录、支付、网站程序和主题模板线索。",
77
"scripts": {

public/rules/headers/header-patterns.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3742,6 +3742,24 @@
37423742
}
37433743
]
37443744
},
3745+
{
3746+
"defaults": {
3747+
"category": "开发者工具 / 代码托管",
3748+
"confidence": ""
3749+
},
3750+
"rules": [
3751+
{
3752+
"name": "GitHub.com",
3753+
"patterns": [
3754+
"server:\\s*github\\.com",
3755+
"x-github-request-id:",
3756+
"set-cookie:[^\\n]*(?:_gh_sess|_octo)",
3757+
"url: https?://github\\.com/"
3758+
],
3759+
"evidence": "响应头或响应 URL 指向 GitHub.com"
3760+
}
3761+
]
3762+
},
37453763
{
37463764
"defaults": {
37473765
"category": "代码示例 / 在线 IDE 嵌入",

public/rules/page/build-runtime.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
{
99
"name": "Webpack",
1010
"confidence": "",
11-
"patterns": ["webpack", "__webpack_require__"],
11+
"patterns": [
12+
"webpack",
13+
"__webpack_require__",
14+
"(?:^|/)wp-runtime-[^\\s\"'<>/]+\\.js(?:[?#]|[\"'<>\\s]|$)",
15+
"(?:^|/)runtime-helpers-[^\\s\"'<>/]+\\.js(?:[?#]|[\"'<>\\s]|$)",
16+
"(?:^|/)chunk-[^\\s\"'<>/]+-[a-f0-9]{8,}\\.js(?:[?#]|[\"'<>\\s]|$)"
17+
],
1218
"globals": ["webpackChunk", "webpackJsonp"]
1319
},
1420
{

public/rules/page/frontend-extra.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@
168168
},
169169
{
170170
"name": "Syncfusion Essential JS",
171-
"patterns": ["syncfusion|ej2-|ejs-"],
172-
"globals": ["ej"]
171+
"patterns": ["syncfusion|@syncfusion/|ej2-|ejs-|ej\\.web\\.all|ej\\.min\\.(?:js|css)"]
173172
},
174173
{
175174
"name": "Wijmo",

public/rules/page/frontend-frameworks.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@
9090
},
9191
{
9292
"name": "Stimulus",
93-
"patterns": ["stimulus"],
93+
"patterns": [
94+
"stimulus",
95+
"data-action=[\"'][^\"'>]*#[^\"'>]+[\"'][^>]*data-target=[\"'][^\"'>]+\\.[^\"'>]+",
96+
"data-target=[\"'][^\"'>]+\\.[^\"'>]+[\"'][^>]*data-action=[\"'][^\"'>]*#[^\"'>]+"
97+
],
9498
"globals": ["Stimulus"],
9599
"selectors": ["[data-controller]"]
96100
},

public/rules/page/saas-services-page.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3213,8 +3213,14 @@
32133213
"rules": [
32143214
{
32153215
"name": "Contentful",
3216-
"patterns": ["contentful\\.com|ctfassets\\.net|contentful"],
3217-
"globals": ["contentful"]
3216+
"resourceOnly": true,
3217+
"patterns": [
3218+
"cdn\\.contentful\\.com",
3219+
"preview\\.contentful\\.com",
3220+
"(?:images|assets)\\.ctfassets\\.net",
3221+
"@contentful/",
3222+
"contentful(?:\\.browser)?(?:\\.min)?\\.js"
3223+
]
32183224
},
32193225
{
32203226
"name": "Sanity",

public/rules/page/ui-frameworks.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
},
1919
{
2020
"name": "Tailwind CSS",
21-
"patterns": ["cdn\\.tailwindcss\\.com", "tailwind(?:\\.min)?\\.css", "tailwind\\.config"]
21+
"patterns": [
22+
"cdn\\.tailwindcss\\.com",
23+
"(?:^|/)[^\\s\"'<>/]*tailwind[^\\s\"'<>/]*\\.css(?:[?#]|[\"'<>\\s]|$)",
24+
"tailwind\\.config"
25+
]
2226
},
2327
{
2428
"name": "shadcn/ui",

0 commit comments

Comments
 (0)