Skip to content

Commit 3be47ea

Browse files
Merge pull request #179 from mlec1/main
refactor: Make all scripts, url and xhr fields an array
2 parents 43d22cd + 024876f commit 3be47ea

File tree

28 files changed

+676
-261
lines changed

28 files changed

+676
-261
lines changed

.github/workflows/scripts/technology_validator.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,11 @@ def get_type(self) -> list[Type]:
150150
return [list]
151151

152152

153-
class StringOrArrayValidator(RegexValidator):
154-
def get_type(self) -> list[Type]:
155-
return [str, list]
156-
157-
158153
class StringOrArrayOrDictValidator(AbstractValidator):
159154
def get_type(self) -> list[Type]:
160155
return [str, list, dict]
161156

157+
162158
class DictValidator(RegexValidator):
163159
def get_type(self) -> list[Type]:
164160
return [dict]
@@ -249,11 +245,11 @@ def __init__(self, file_name: str):
249245
"css": ArrayValidator(contains_regex=True),
250246
"probe": DictValidator(),
251247
"robots": ArrayValidator(),
252-
"url": StringOrArrayValidator(contains_regex=True),
253-
"xhr": StringOrArrayValidator(contains_regex=True),
248+
"url": ArrayValidator(contains_regex=True),
249+
"xhr": ArrayValidator(contains_regex=True),
254250
"meta": DictValidator(contains_regex=True),
255251
"scriptSrc": ArrayValidator(contains_regex=True),
256-
"scripts": StringOrArrayValidator(contains_regex=True),
252+
"scripts": ArrayValidator(contains_regex=True),
257253
"html": ArrayValidator(contains_regex=True),
258254
"certIssuer": StringValidator()
259255
}

schema.json

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -184,30 +184,16 @@
184184
}
185185
},
186186
"scripts": {
187-
"oneOf": [
188-
{
189-
"type": "array",
190-
"items": {
191-
"$ref": "#/definitions/non-empty-non-blank-string"
192-
}
193-
},
194-
{
195-
"$ref": "#/definitions/non-empty-non-blank-string"
196-
}
197-
]
187+
"type": "array",
188+
"items": {
189+
"$ref": "#/definitions/non-empty-non-blank-string"
190+
}
198191
},
199192
"url": {
200-
"oneOf": [
201-
{
202-
"type": "array",
203-
"items": {
204-
"$ref": "#/definitions/non-empty-non-blank-string"
205-
}
206-
},
207-
{
208-
"$ref": "#/definitions/non-empty-non-blank-string"
209-
}
210-
]
193+
"type": "array",
194+
"items": {
195+
"$ref": "#/definitions/non-empty-non-blank-string"
196+
}
211197
},
212198
"website": {
213199
"$ref": "#/definitions/non-empty-non-blank-string"
@@ -216,17 +202,10 @@
216202
"$ref": "#/definitions/non-empty-non-blank-string"
217203
},
218204
"xhr": {
219-
"oneOf": [
220-
{
221-
"type": "array",
222-
"items": {
223-
"$ref": "#/definitions/non-empty-non-blank-string"
224-
}
225-
},
226-
{
227-
"$ref": "#/definitions/non-empty-non-blank-string"
228-
}
229-
]
205+
"type": "array",
206+
"items": {
207+
"$ref": "#/definitions/non-empty-non-blank-string"
208+
}
230209
}
231210
}
232211
}

src/technologies/_.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@
6969
"\\.tynt\\.com/"
7070
],
7171
"website": "https://www.33across.com",
72-
"xhr": "\\.33across\\.com"
72+
"xhr": [
73+
"\\.33across\\.com"
74+
]
7375
},
7476
"34SP.com": {
7577
"cats": [
@@ -196,7 +198,9 @@
196198
],
197199
"saas": true,
198200
"website": "https://8base.com",
199-
"xhr": "api\\.8base\\.com"
201+
"xhr": [
202+
"api\\.8base\\.com"
203+
]
200204
},
201205
"<model-viewer>": {
202206
"cats": [

src/technologies/a.json

Lines changed: 60 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@
189189
"icon": "Accelerated-Mobile-Pages.svg",
190190
"oss": true,
191191
"website": "https://www.amp.dev",
192-
"xhr": "cdn\\.ampproject\\.org"
192+
"xhr": [
193+
"cdn\\.ampproject\\.org"
194+
]
193195
},
194196
"AMP for WordPress": {
195197
"cats": [
@@ -468,7 +470,9 @@
468470
"Shopify"
469471
],
470472
"saas": true,
471-
"scripts": "\\.accentuate\\.io/",
473+
"scripts": [
474+
"\\.accentuate\\.io/"
475+
],
472476
"website": "https://www.accentuate.io"
473477
},
474478
"AccessTrade": {
@@ -672,7 +676,9 @@
672676
"scriptSrc": [
673677
"https?:\\/\\/.+\\.web\\.ahdev\\.cloud"
674678
],
675-
"url": "https:?\\/\\/.+\\.web\\.ahdev\\.cloud",
679+
"url": [
680+
"https:?\\/\\/.+\\.web\\.ahdev\\.cloud"
681+
],
676682
"website": "https://www.acquia.com/products/drupal-cloud/cloud-ide"
677683
},
678684
"Acquia Cloud Platform": {
@@ -745,7 +751,9 @@
745751
"scriptSrc": [
746752
"content-hub\\.acquia\\.com"
747753
],
748-
"url": "https?:\\/\\/.+\\.content-hub\\.acquia\\.com",
754+
"url": [
755+
"https?:\\/\\/.+\\.content-hub\\.acquia\\.com"
756+
],
749757
"website": "https://www.acquia.com/products/drupal-cloud/content-hub"
750758
},
751759
"Acquia Customer Data Platform": {
@@ -791,7 +799,9 @@
791799
"lift\\.acquia\\.com"
792800
],
793801
"website": "https://www.acquia.com/products/marketing-cloud/personalization",
794-
"xhr": "lift\\.acquia\\.com"
802+
"xhr": [
803+
"lift\\.acquia\\.com"
804+
]
795805
},
796806
"Acquia Site Studio": {
797807
"cats": [
@@ -1228,7 +1238,9 @@
12281238
"track\\.adabra\\.com"
12291239
],
12301240
"website": "https://www.adabra.com",
1231-
"xhr": "my\\.adabra\\.com"
1241+
"xhr": [
1242+
"my\\.adabra\\.com"
1243+
]
12321244
},
12331245
"Adally": {
12341246
"cats": [
@@ -1271,7 +1283,9 @@
12711283
"scriptSrc": [
12721284
"^[^\\/]*//(?:[^\\/]+\\.)?adcash\\.com/(?:script|ad)/"
12731285
],
1274-
"url": "^https?://(?:[^\\/]+\\.)?adcash\\.com/script/pop_",
1286+
"url": [
1287+
"^https?://(?:[^\\/]+\\.)?adcash\\.com/script/pop_"
1288+
],
12751289
"website": "https://adcash.com"
12761290
},
12771291
"AddEvent": {
@@ -1462,7 +1476,9 @@
14621476
"payg"
14631477
],
14641478
"saas": true,
1465-
"scripts": "admiral(?:-engaged|:enabled)",
1479+
"scripts": [
1480+
"admiral(?:-engaged|:enabled)"
1481+
],
14661482
"website": "https://www.getadmiral.com"
14671483
},
14681484
"Admitad": {
@@ -1610,7 +1626,9 @@
16101626
"scriptSrc": [
16111627
"/cfajax/"
16121628
],
1613-
"url": "\\.cfm(?:$|\\?)",
1629+
"url": [
1630+
"\\.cfm(?:$|\\?)"
1631+
],
16141632
"website": "https://adobe.com/products/coldfusion-family.html"
16151633
},
16161634
"Adobe DTM": {
@@ -1662,7 +1680,9 @@
16621680
"/etc/clientlibs/",
16631681
"/etc\\.clientlibs/"
16641682
],
1665-
"scripts": "aem-(?:GridColumn|apps/)",
1683+
"scripts": [
1684+
"aem-(?:GridColumn|apps/)"
1685+
],
16661686
"website": "https://www.adobe.com/marketing/experience-manager.html"
16671687
},
16681688
"Adobe Experience Manager Franklin": {
@@ -2084,7 +2104,9 @@
20842104
"payg"
20852105
],
20862106
"saas": true,
2087-
"url": "https.+\\.returnscenter\\.com",
2107+
"url": [
2108+
"https.+\\.returnscenter\\.com"
2109+
],
20882110
"website": "https://www.aftership.com/returns"
20892111
},
20902112
"Afterpay": {
@@ -2905,7 +2927,9 @@
29052927
"\\.amazon-adsystem\\.com"
29062928
],
29072929
"website": "https://advertising.amazon.com",
2908-
"xhr": "\\.amazon-adsystem\\.com"
2930+
"xhr": [
2931+
"\\.amazon-adsystem\\.com"
2932+
]
29092933
},
29102934
"Amazon Associates": {
29112935
"cats": [
@@ -2992,7 +3016,9 @@
29923016
"payg"
29933017
],
29943018
"website": "https://aws.amazon.com/cognito/",
2995-
"xhr": "cognito-idp\\..+\\.amazonaws\\.com"
3019+
"xhr": [
3020+
"cognito-idp\\..+\\.amazonaws\\.com"
3021+
]
29963022
},
29973023
"Amazon EC2": {
29983024
"cats": [
@@ -3079,7 +3105,9 @@
30793105
"\\.payments-amazon\\.com/"
30803106
],
30813107
"website": "https://pay.amazon.com",
3082-
"xhr": "payments\\.amazon\\.com"
3108+
"xhr": [
3109+
"payments\\.amazon\\.com"
3110+
]
30833111
},
30843112
"Amazon S3": {
30853113
"cats": [
@@ -3297,7 +3325,9 @@
32973325
"cdn\\.(?:segment.+)?amplitude(?:\\.com|-plugins)"
32983326
],
32993327
"website": "https://amplitude.com",
3300-
"xhr": "\\.amplitude\\.com"
3328+
"xhr": [
3329+
"\\.amplitude\\.com"
3330+
]
33013331
},
33023332
"Analysys Ark": {
33033333
"cats": [
@@ -3731,7 +3761,9 @@
37313761
"poa"
37323762
],
37333763
"saas": true,
3734-
"url": "https.+\\.imodules\\.com/s/",
3764+
"url": [
3765+
"https.+\\.imodules\\.com/s/"
3766+
],
37353767
"website": "https://www.anthology.com/products/lifecycle-engagement/alumni-and-advancement/anthology-encompass"
37363768
},
37373769
"AntiBot.Cloud": {
@@ -3842,7 +3874,9 @@
38423874
"scriptSrc": [
38433875
"jspwiki"
38443876
],
3845-
"url": "wiki\\.jsp",
3877+
"url": [
3878+
"wiki\\.jsp"
3879+
],
38463880
"website": "https://jspwiki.org"
38473881
},
38483882
"Apache Tomcat": {
@@ -4099,7 +4133,9 @@
40994133
"adnxs\\.(?:net|com)"
41004134
],
41014135
"website": "https://appnexus.com",
4102-
"xhr": "prebid\\.adnxs\\.com"
4136+
"xhr": [
4137+
"prebid\\.adnxs\\.com"
4138+
]
41034139
},
41044140
"Appcues": {
41054141
"cats": [
@@ -4413,7 +4449,9 @@
44134449
"arc\\.io/widget\\.js"
44144450
],
44154451
"website": "https://arc.io",
4416-
"xhr": "\\.arc\\.io"
4452+
"xhr": [
4453+
"\\.arc\\.io"
4454+
]
44174455
},
44184456
"Arc XP": {
44194457
"cats": [
@@ -5564,7 +5602,9 @@
55645602
"implies": [
55655603
"Azure"
55665604
],
5567-
"url": "https.+\\.b2clogin\\.com",
5605+
"url": [
5606+
"https.+\\.b2clogin\\.com"
5607+
],
55685608
"website": "https://azure.microsoft.com/en-us/services/active-directory/external-identities/b2c/"
55695609
},
55705610
"Azure CDN": {

0 commit comments

Comments
 (0)