aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormmstanone2021-10-21 14:46:52 +0200
committermmstanone2021-10-21 14:46:52 +0200
commita035274a413c12ef41036a9d18f575f6b6f5179d (patch)
treede6314df2a51864e4c91c039686dacb243b25351
parentf55bc3464f268e7c4fd36a6de5ebac61f81b1446 (diff)
downloadsec-certs-a035274a413c12ef41036a9d18f575f6b6f5179d.tar.gz
sec-certs-a035274a413c12ef41036a9d18f575f6b6f5179d.tar.zst
sec-certs-a035274a413c12ef41036a9d18f575f6b6f5179d.zip
Custom schemas and urls in sanitization
-rw-r--r--sec_certs/settings-schema.json173
1 files changed, 114 insertions, 59 deletions
diff --git a/sec_certs/settings-schema.json b/sec_certs/settings-schema.json
index ec828d27..e05d06e5 100644
--- a/sec_certs/settings-schema.json
+++ b/sec_certs/settings-schema.json
@@ -1,109 +1,164 @@
{
"title": "settings for sec-certs",
"type": "object",
- "properties": {
- "log_filepath": {
+ "definitions": {
+ "settings_string_entry": {
+ "required": [
+ "description",
+ "value"
+ ],
"type": "object",
"properties": {
+ "description": {
+ "type": "string"
+ },
"value": {
"type": "string"
}
}
},
- "smallest_certificate_id_to_connect": {
+ "settings_boolean_entry": {
"type": "object",
+ "required": [
+ "description",
+ "value"
+ ],
"properties": {
+ "description": {
+ "type": "string"
+ },
"value": {
- "type": "number",
- "minimum": 1
+ "type": "boolean"
}
}
},
- "year_difference_between_validations": {
+ "settings_number_entry": {
"type": "object",
+ "required": [
+ "description",
+ "value"
+ ],
"properties": {
+ "description": {
+ "type": "string"
+ },
"value": {
- "type": "number",
- "minimum": 0
+ "type": "number"
}
}
},
- "use_text_with_newlines_during_parsing": {
+ "settings_url_entry": {
"type": "object",
+ "required": [
+ "description",
+ "value"
+ ],
"properties": {
+ "description": {
+ "type": "string"
+ },
"value": {
- "type": "boolean"
+ "type": "string",
+ "format": "uri",
+ "pattern": "^(https?|http?)://",
+ "minLength": 1,
+ "maxLength": 255
}
}
+ }
+ },
+ "properties": {
+ "log_filepath": {
+ "$ref": "#/definitions/settings_string_entry"
+ },
+ "smallest_certificate_id_to_connect": {
+ "$ref": "#/definitions/settings_number_entry"
+ },
+ "year_difference_between_validations": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/settings_number_entry"
+ },
+ {
+ "properties": {
+ "value": {
+ "minimum": 0
+ }
+ }
+ }
+ ]
+ },
+ "use_text_with_newlines_during_parsing": {
+ "$ref": "#/definitions/settings_boolean_entry"
},
"n_threads": {
- "type": "object",
- "properties": {
- "value": {
- "type": "number",
- "minimum": 1
+ "allOf": [
+ {
+ "$ref": "#/definitions/settings_number_entry"
+ },
+ {
+ "properties": {
+ "value": {
+ "minimum": 1
+ }
+ }
}
- }
+ ]
},
"cc_cpe_matching_threshold": {
- "type": "object",
- "properties": {
- "value": {
- "type": "number",
- "minimum": 0,
- "maximum": 100
+ "allOf": [
+ {
+ "$ref": "#/definitions/settings_number_entry"
+ },
+ {
+ "properties": {
+ "value": {
+ "minimum": 0,
+ "maximum": 100
+ }
+ }
}
- }
+ ]
},
"cc_cpe_max_matches": {
- "type": "object",
- "properties": {
- "value": {
- "type": "number",
- "exclusiveMinimum": 0
+ "allOf": [
+ {
+ "$ref": "#/definitions/settings_number_entry"
+ },
+ {
+ "properties": {
+ "value": {
+ "exclusiveMinimum": 0
+ }
+ }
}
- }
+ ]
},
"cc_latest_snapshot": {
- "type": "object",
- "properties": {
- "value": {
- "type": "string"
- }
- }
+ "$ref": "#/definitions/settings_url_entry"
},
"cc_maintenances_latest_snapshot": {
- "type": "object",
- "properties": {
- "value": {
- "type": "string"
- }
- }
+ "$ref": "#/definitions/settings_url_entry"
},
"ignore_first_page": {
- "type": "object",
- "properties": {
- "value": {
- "type": "boolean"
- }
- }
+ "$ref": "#/definitions/settings_boolean_entry"
},
"cert_threshold": {
- "type": "object",
- "properties": {
- "value": {
- "type": "number",
- "minimum": 0
+ "allOf": [
+ {
+ "$ref": "#/definitions/settings_number_entry"
+ },
+ {
+ "properties": {
+ "value": {
+ "minimum": 0
+ }
+ }
}
- }
+ ]
},
"fips_latest_snapshot": {
- "type": "object",
- "properties": {
- "value": {
- "type": "string"
- }
- }
+ "$ref": "#/definitions/settings_url_entry"
}
},
"required": [