Skip to content

Commit

Permalink
Merge pull request #179 from mlec1/main
Browse files Browse the repository at this point in the history
refactor: Make all scripts, url and xhr fields an array
  • Loading branch information
enthec-opensource authored Jul 15, 2024
2 parents 43d22cd + 024876f commit 3be47ea
Show file tree
Hide file tree
Showing 28 changed files with 676 additions and 261 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/scripts/technology_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,11 @@ def get_type(self) -> list[Type]:
return [list]


class StringOrArrayValidator(RegexValidator):
def get_type(self) -> list[Type]:
return [str, list]


class StringOrArrayOrDictValidator(AbstractValidator):
def get_type(self) -> list[Type]:
return [str, list, dict]


class DictValidator(RegexValidator):
def get_type(self) -> list[Type]:
return [dict]
Expand Down Expand Up @@ -249,11 +245,11 @@ def __init__(self, file_name: str):
"css": ArrayValidator(contains_regex=True),
"probe": DictValidator(),
"robots": ArrayValidator(),
"url": StringOrArrayValidator(contains_regex=True),
"xhr": StringOrArrayValidator(contains_regex=True),
"url": ArrayValidator(contains_regex=True),
"xhr": ArrayValidator(contains_regex=True),
"meta": DictValidator(contains_regex=True),
"scriptSrc": ArrayValidator(contains_regex=True),
"scripts": StringOrArrayValidator(contains_regex=True),
"scripts": ArrayValidator(contains_regex=True),
"html": ArrayValidator(contains_regex=True),
"certIssuer": StringValidator()
}
Expand Down
45 changes: 12 additions & 33 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,30 +184,16 @@
}
},
"scripts": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/non-empty-non-blank-string"
}
},
{
"$ref": "#/definitions/non-empty-non-blank-string"
}
]
"type": "array",
"items": {
"$ref": "#/definitions/non-empty-non-blank-string"
}
},
"url": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/non-empty-non-blank-string"
}
},
{
"$ref": "#/definitions/non-empty-non-blank-string"
}
]
"type": "array",
"items": {
"$ref": "#/definitions/non-empty-non-blank-string"
}
},
"website": {
"$ref": "#/definitions/non-empty-non-blank-string"
Expand All @@ -216,17 +202,10 @@
"$ref": "#/definitions/non-empty-non-blank-string"
},
"xhr": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/non-empty-non-blank-string"
}
},
{
"$ref": "#/definitions/non-empty-non-blank-string"
}
]
"type": "array",
"items": {
"$ref": "#/definitions/non-empty-non-blank-string"
}
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/technologies/_.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
"\\.tynt\\.com/"
],
"website": "https://www.33across.com",
"xhr": "\\.33across\\.com"
"xhr": [
"\\.33across\\.com"
]
},
"34SP.com": {
"cats": [
Expand Down Expand Up @@ -196,7 +198,9 @@
],
"saas": true,
"website": "https://8base.com",
"xhr": "api\\.8base\\.com"
"xhr": [
"api\\.8base\\.com"
]
},
"<model-viewer>": {
"cats": [
Expand Down
80 changes: 60 additions & 20 deletions src/technologies/a.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@
"icon": "Accelerated-Mobile-Pages.svg",
"oss": true,
"website": "https://www.amp.dev",
"xhr": "cdn\\.ampproject\\.org"
"xhr": [
"cdn\\.ampproject\\.org"
]
},
"AMP for WordPress": {
"cats": [
Expand Down Expand Up @@ -468,7 +470,9 @@
"Shopify"
],
"saas": true,
"scripts": "\\.accentuate\\.io/",
"scripts": [
"\\.accentuate\\.io/"
],
"website": "https://www.accentuate.io"
},
"AccessTrade": {
Expand Down Expand Up @@ -672,7 +676,9 @@
"scriptSrc": [
"https?:\\/\\/.+\\.web\\.ahdev\\.cloud"
],
"url": "https:?\\/\\/.+\\.web\\.ahdev\\.cloud",
"url": [
"https:?\\/\\/.+\\.web\\.ahdev\\.cloud"
],
"website": "https://www.acquia.com/products/drupal-cloud/cloud-ide"
},
"Acquia Cloud Platform": {
Expand Down Expand Up @@ -745,7 +751,9 @@
"scriptSrc": [
"content-hub\\.acquia\\.com"
],
"url": "https?:\\/\\/.+\\.content-hub\\.acquia\\.com",
"url": [
"https?:\\/\\/.+\\.content-hub\\.acquia\\.com"
],
"website": "https://www.acquia.com/products/drupal-cloud/content-hub"
},
"Acquia Customer Data Platform": {
Expand Down Expand Up @@ -791,7 +799,9 @@
"lift\\.acquia\\.com"
],
"website": "https://www.acquia.com/products/marketing-cloud/personalization",
"xhr": "lift\\.acquia\\.com"
"xhr": [
"lift\\.acquia\\.com"
]
},
"Acquia Site Studio": {
"cats": [
Expand Down Expand Up @@ -1228,7 +1238,9 @@
"track\\.adabra\\.com"
],
"website": "https://www.adabra.com",
"xhr": "my\\.adabra\\.com"
"xhr": [
"my\\.adabra\\.com"
]
},
"Adally": {
"cats": [
Expand Down Expand Up @@ -1271,7 +1283,9 @@
"scriptSrc": [
"^[^\\/]*//(?:[^\\/]+\\.)?adcash\\.com/(?:script|ad)/"
],
"url": "^https?://(?:[^\\/]+\\.)?adcash\\.com/script/pop_",
"url": [
"^https?://(?:[^\\/]+\\.)?adcash\\.com/script/pop_"
],
"website": "https://adcash.com"
},
"AddEvent": {
Expand Down Expand Up @@ -1462,7 +1476,9 @@
"payg"
],
"saas": true,
"scripts": "admiral(?:-engaged|:enabled)",
"scripts": [
"admiral(?:-engaged|:enabled)"
],
"website": "https://www.getadmiral.com"
},
"Admitad": {
Expand Down Expand Up @@ -1610,7 +1626,9 @@
"scriptSrc": [
"/cfajax/"
],
"url": "\\.cfm(?:$|\\?)",
"url": [
"\\.cfm(?:$|\\?)"
],
"website": "https://adobe.com/products/coldfusion-family.html"
},
"Adobe DTM": {
Expand Down Expand Up @@ -1662,7 +1680,9 @@
"/etc/clientlibs/",
"/etc\\.clientlibs/"
],
"scripts": "aem-(?:GridColumn|apps/)",
"scripts": [
"aem-(?:GridColumn|apps/)"
],
"website": "https://www.adobe.com/marketing/experience-manager.html"
},
"Adobe Experience Manager Franklin": {
Expand Down Expand Up @@ -2084,7 +2104,9 @@
"payg"
],
"saas": true,
"url": "https.+\\.returnscenter\\.com",
"url": [
"https.+\\.returnscenter\\.com"
],
"website": "https://www.aftership.com/returns"
},
"Afterpay": {
Expand Down Expand Up @@ -2905,7 +2927,9 @@
"\\.amazon-adsystem\\.com"
],
"website": "https://advertising.amazon.com",
"xhr": "\\.amazon-adsystem\\.com"
"xhr": [
"\\.amazon-adsystem\\.com"
]
},
"Amazon Associates": {
"cats": [
Expand Down Expand Up @@ -2992,7 +3016,9 @@
"payg"
],
"website": "https://aws.amazon.com/cognito/",
"xhr": "cognito-idp\\..+\\.amazonaws\\.com"
"xhr": [
"cognito-idp\\..+\\.amazonaws\\.com"
]
},
"Amazon EC2": {
"cats": [
Expand Down Expand Up @@ -3079,7 +3105,9 @@
"\\.payments-amazon\\.com/"
],
"website": "https://pay.amazon.com",
"xhr": "payments\\.amazon\\.com"
"xhr": [
"payments\\.amazon\\.com"
]
},
"Amazon S3": {
"cats": [
Expand Down Expand Up @@ -3297,7 +3325,9 @@
"cdn\\.(?:segment.+)?amplitude(?:\\.com|-plugins)"
],
"website": "https://amplitude.com",
"xhr": "\\.amplitude\\.com"
"xhr": [
"\\.amplitude\\.com"
]
},
"Analysys Ark": {
"cats": [
Expand Down Expand Up @@ -3731,7 +3761,9 @@
"poa"
],
"saas": true,
"url": "https.+\\.imodules\\.com/s/",
"url": [
"https.+\\.imodules\\.com/s/"
],
"website": "https://www.anthology.com/products/lifecycle-engagement/alumni-and-advancement/anthology-encompass"
},
"AntiBot.Cloud": {
Expand Down Expand Up @@ -3842,7 +3874,9 @@
"scriptSrc": [
"jspwiki"
],
"url": "wiki\\.jsp",
"url": [
"wiki\\.jsp"
],
"website": "https://jspwiki.org"
},
"Apache Tomcat": {
Expand Down Expand Up @@ -4099,7 +4133,9 @@
"adnxs\\.(?:net|com)"
],
"website": "https://appnexus.com",
"xhr": "prebid\\.adnxs\\.com"
"xhr": [
"prebid\\.adnxs\\.com"
]
},
"Appcues": {
"cats": [
Expand Down Expand Up @@ -4413,7 +4449,9 @@
"arc\\.io/widget\\.js"
],
"website": "https://arc.io",
"xhr": "\\.arc\\.io"
"xhr": [
"\\.arc\\.io"
]
},
"Arc XP": {
"cats": [
Expand Down Expand Up @@ -5564,7 +5602,9 @@
"implies": [
"Azure"
],
"url": "https.+\\.b2clogin\\.com",
"url": [
"https.+\\.b2clogin\\.com"
],
"website": "https://azure.microsoft.com/en-us/services/active-directory/external-identities/b2c/"
},
"Azure CDN": {
Expand Down
Loading

0 comments on commit 3be47ea

Please sign in to comment.