Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: make robots fiels array, certIssuer a str and excludes fields an array #173

Merged
merged 3 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/scripts/technology_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def __init__(self, file_name: str):
"pricing": PricingValidator(),
"implies": StringOrArrayValidator(), # TODO cat validation
"requires": StringOrArrayValidator(), # TODO ^
"excludes": StringOrArrayValidator(), # TODO ^
"excludes": ArrayValidator(), # TODO ^
"requiresCategory": CategoryValidator(self._CATEGORIES),
"cookies": DictValidator(contains_regex=True),
"dom": StringOrArrayOrDictValidator(), # TODO query selector validator
Expand All @@ -256,7 +256,7 @@ def __init__(self, file_name: str):
"text": ArrayValidator(contains_regex=True),
"css": ArrayValidator(contains_regex=True),
"probe": DictValidator(),
"robots": StringOrArrayValidator(),
"robots": ArrayValidator(),
"url": StringOrArrayValidator(contains_regex=True),
"xhr": StringOrArrayValidator(contains_regex=True),
"meta": DictValidator(contains_regex=True),
Expand Down
42 changes: 9 additions & 33 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,10 @@
}
},
"robots": {
"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"
}
},
"probe": {
"type": "object",
Expand All @@ -147,30 +140,13 @@
}
},
"certIssuer": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/non-empty-non-blank-string"
}
},
{
"$ref": "#/definitions/non-empty-non-blank-string"
}
]
"$ref": "#/definitions/non-empty-non-blank-string"
},
"excludes": {
"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"
}
},
"implies": {
"oneOf": [
Expand Down
16 changes: 12 additions & 4 deletions src/technologies/a.json
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,9 @@
"cpe": "cpe:2.3:a:adobe:experience_manager:*:*:*:*:*:*:*:*",
"description": "Adobe Experience Manager Franklin, also known as Project Helix or Composability, is a new way to publish AEM pages using Google Drive or Microsoft Office via Sharepoint. Instead of components, Franklin uses blocks to build pages. Blocks are pieces of a document that will be transformed into web page content.",
"icon": "Adobe Experience Manager Franklin.svg",
"excludes": "Adobe Experience Manager",
"excludes": [
"Adobe Experience Manager"
],
"scriptSrc": "^.+/scripts/lib-franklin\\.js$",
"website": "https://www.hlx.live"
},
Expand Down Expand Up @@ -3212,7 +3214,9 @@
66
],
"description": "Angular Material is a UI component library for Angular JS developers. Angular Material components assist in constructing attractive, consistent, and functional web pages and web applications.",
"excludes": "Material Design Lite",
"excludes": [
"Material Design Lite"
],
"icon": "AngularJS.svg",
"implies": "AngularJS",
"js": {
Expand Down Expand Up @@ -4025,7 +4029,9 @@
],
"cpe": "cpe:2.3:a:arastta:ecommerce:*:*:*:*:*:*:*:*",
"description": "Arastta is a free and open-source project with contributors from all over the world.",
"excludes": "OpenCart",
"excludes": [
"OpenCart"
],
"headers": {
"Arastta": "^(.+)$\\;version:\\1",
"X-Arastta": "",
Expand Down Expand Up @@ -5059,7 +5065,9 @@
106
],
"description": "Azoya helps international brands and retailers sell directly to Chinese consumers through cross-border ecommerce.",
"excludes": "Magento",
"excludes": [
"Magento"
],
"headers": {
"x-azoya-webisteid": ""
},
Expand Down
4 changes: 3 additions & 1 deletion src/technologies/b.json
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,9 @@
6
],
"description": "BigCommerce B2B Edition is a specialised version of the BigCommerce ecommerce platform tailored for B2B companies, offering features such as custom pricing, catalogues, bulk ordering, quote requests, multi-user accounts, PO processing, and advanced reporting.",
"excludes": "BigCommerce",
"excludes": [
"BigCommerce"
],
"icon": "BigCommerce B2B Edition.svg",
"js": {
"bundleB2BFeatureFlags": "",
Expand Down
4 changes: 3 additions & 1 deletion src/technologies/c.json
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,9 @@
],
"description": "Centra is the headless ecommerce platform.",
"dom": "img[src*='.centracdn.net/']",
"excludes": "Magento",
"excludes": [
"Magento"
],
"headers": {
"Content-Security-Policy": "\\.centra(?:cdn)?\\.(?:com|net)"
},
Expand Down
8 changes: 6 additions & 2 deletions src/technologies/e.json
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,9 @@
],
"description": "ExtendThemes EmpowerWP is an flexible, multipurpose WordPress theme.",
"dom": "link[href*='/wp-content/themes/empowerwp']",
"excludes": "ExtendThemes Mesmerize",
"excludes": [
"ExtendThemes Mesmerize"
],
"icon": "ExtendThemes.svg",
"pricing": [
"freemium",
Expand All @@ -2014,7 +2016,9 @@
],
"description": "ExtendThemes Highlight is an flexible, multipurpose WordPress theme.",
"dom": "link[href*='/wp-content/themes/highlight/'], link[href*='/wp-content/themes/highlight-pro/']",
"excludes": "ExtendThemes Mesmerize",
"excludes": [
"ExtendThemes Mesmerize"
],
"icon": "ExtendThemes.svg",
"pricing": [
"freemium",
Expand Down
4 changes: 3 additions & 1 deletion src/technologies/f.json
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,9 @@
6
],
"description": "FatherShops is an ecommerce platform.",
"excludes": "OpenCart",
"excludes": [
"OpenCart"
],
"icon": "FatherShops.png",
"pricing": [
"poa"
Expand Down
12 changes: 9 additions & 3 deletions src/technologies/g.json
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,9 @@
],
"description": "GoDaddy Escapade is a GoDaddy Primer child theme with a unique sidebar navigation.",
"dom": "link[href*='/wp-content/themes/escapade/']",
"excludes": "GoDaddy Primer",
"excludes": [
"GoDaddy Primer"
],
"icon": "GoDaddy.svg",
"requires": "WordPress",
"website": "https://github.com/godaddy-wordpress/primer-child-escapade"
Expand All @@ -1381,7 +1383,9 @@
],
"description": "GoDaddy Lyrical is a GoDaddy Primer child theme with a focus on photography and beautiful fonts.",
"dom": "link[href*='/wp-content/themes/lyrical/']",
"excludes": "GoDaddy Primer",
"excludes": [
"GoDaddy Primer"
],
"icon": "GoDaddy.svg",
"requires": "WordPress",
"website": "https://github.com/godaddy-wordpress/primer-child-lyrical"
Expand Down Expand Up @@ -1414,7 +1418,9 @@
],
"description": "GoDaddy Uptown Style is a GoDaddy Primer child theme with elegance and class.",
"dom": "link[href*='/wp-content/themes/uptown-style/']",
"excludes": "GoDaddy Primer",
"excludes": [
"GoDaddy Primer"
],
"icon": "GoDaddy.svg",
"requires": "WordPress",
"website": "https://github.com/godaddy-wordpress/primer-child-uptownstyle"
Expand Down
8 changes: 6 additions & 2 deletions src/technologies/h.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@
19
],
"description": "HTTP/2 (originally named HTTP/2.0) is a major revision of the HTTP network protocol used by the World Wide Web.",
"excludes": "SPDY",
"excludes": [
"SPDY"
],
"headers": {
"Alt-Svc": "h2",
"X-Firefox-Spdy": "h2"
Expand All @@ -146,7 +148,9 @@
19
],
"description": "HTTP/3 is the third major version of the Hypertext Transfer Protocol used to exchange information on the World Wide Web.",
"excludes": "HTTP/2",
"excludes": [
"HTTP/2"
],
"headers": {
"Alt-Svc": "h3",
"X-Firefox-Http3": "h3"
Expand Down
4 changes: 3 additions & 1 deletion src/technologies/j.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@
22
],
"cpe": "cpe:2.3:a:redhat:jbossweb:*:*:*:*:*:*:*:*",
"excludes": "Apache Tomcat",
"excludes": [
"Apache Tomcat"
],
"headers": {
"X-Powered-By": "JBossWeb(?:-([\\d.]+))?\\;version:\\1"
},
Expand Down
4 changes: 3 additions & 1 deletion src/technologies/l.json
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,9 @@
],
"cpe": "cpe:2.3:a:lodash:lodash:*:*:*:*:*:*:*:*",
"description": "Lodash is a JavaScript library which provides utility functions for common programming tasks using the functional programming paradigm.",
"excludes": "Underscore.js",
"excludes": [
"Underscore.js"
],
"icon": "Lodash.svg",
"js": {
"_.VERSION": "^(.+)$\\;confidence:0\\;version:\\1",
Expand Down
16 changes: 12 additions & 4 deletions src/technologies/m.json
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,9 @@
"cats": [
1
],
"excludes": "Joomla",
"excludes": [
"Joomla"
],
"icon": "Mambo.png",
"meta": {
"generator": "Mambo"
Expand Down Expand Up @@ -3305,7 +3307,9 @@
51
],
"description": "MyWebsite is website builder designed for easy editing and fast results.",
"excludes": "Jimdo",
"excludes": [
"Jimdo"
],
"icon": "MyWebsite.svg",
"js": {
"SystemID": "^.*1AND1.*$\\;version:8"
Expand Down Expand Up @@ -3415,7 +3419,9 @@
],
"description": "News Portal Lite is child theme of News Portal ultimate magazine WordPress theme by MysteryThemes.",
"dom": "link[href*='/wp-content/themes/news-portal-lite/']",
"excludes": "MysteryThemes News Portal",
"excludes": [
"MysteryThemes News Portal"
],
"icon": "MysteryThemes.png",
"pricing": [
"freemium",
Expand All @@ -3430,7 +3436,9 @@
],
"description": "News Portal Mag is child theme of News Portal ultimate magazine WordPress theme by MysteryThemes.",
"dom": "link[href*='/wp-content/themes/news-portal-mag/']",
"excludes": "MysteryThemes News Portal",
"excludes": [
"MysteryThemes News Portal"
],
"icon": "MysteryThemes.png",
"pricing": [
"onetime"
Expand Down
8 changes: 6 additions & 2 deletions src/technologies/n.json
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@
"cats": [
1
],
"excludes": "TYPO3 CMS",
"excludes": [
"TYPO3 CMS"
],
"headers": {
"X-Flow-Powered": "Neos/?(.+)?$\\;version:\\1"
},
Expand All @@ -366,7 +368,9 @@
"cats": [
18
],
"excludes": "TYPO3 CMS",
"excludes": [
"TYPO3 CMS"
],
"headers": {
"X-Flow-Powered": "Flow/?(.+)?$\\;version:\\1"
},
Expand Down
20 changes: 15 additions & 5 deletions src/technologies/o.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
6
],
"description": "OXID eShop Community Edition is a free, open source ecommerce solution built using object oriented programming and PHP.",
"excludes": "OXID eShop",
"excludes": [
"OXID eShop"
],
"html": [
"<!--[^-]*OXID eShop Community Edition, Version (\\d+)\\;version:\\1"
],
Expand All @@ -82,7 +84,9 @@
62
],
"description": "OXID eShop Enterprise Edition is a B2B or B2C ecommerce solution built using object oriented programming and PHP.",
"excludes": "OXID eShop",
"excludes": [
"OXID eShop"
],
"html": [
"<!--[^-]*OXID eShop Enterprise Edition, Version (\\d+)\\;version:\\1"
],
Expand All @@ -95,7 +99,9 @@
6
],
"description": "OXID eShop Professional Edition is an e-ommerce platform for both small start-up companies and experience online retailers with a wide range of functions, software maintenance and support.",
"excludes": "OXID eShop",
"excludes": [
"OXID eShop"
],
"html": [
"<!--[^-]*OXID eShop Professional Edition, Version (\\d+)\\;version:\\1"
],
Expand Down Expand Up @@ -604,7 +610,9 @@
],
"description": "OnShop is an ecommerce platform for online merchants.",
"dom": "link[href*='cdn.onshop.asia/']",
"excludes": "OpenCart",
"excludes": [
"OpenCart"
],
"icon": "Onshop.svg",
"implies": "PHP",
"meta": {
Expand Down Expand Up @@ -964,7 +972,9 @@
22
],
"cpe": "cpe:2.3:a:openbsd:openbsd:*:*:*:*:*:*:*:*",
"excludes": "Apache HTTP Server",
"excludes": [
"Apache HTTP Server"
],
"headers": {
"Server": "^OpenBSD httpd"
},
Expand Down
8 changes: 6 additions & 2 deletions src/technologies/p.json
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,9 @@
}
}
},
"excludes": "PhotoShelter",
"excludes": [
"PhotoShelter"
],
"icon": "PhotoShelter.png",
"pricing": [
"poa"
Expand Down Expand Up @@ -1850,7 +1852,9 @@
10
],
"description": "Piwik PRO Core is a free alternative to Google Analytics that is privacy & compliance focused.",
"excludes": "Matomo Analytics",
"excludes": [
"Matomo Analytics"
],
"icon": "Piwik PRO Core.svg",
"pricing": [
"freemium",
Expand Down
Loading