Skip to content

Commit fe9449a

Browse files
committed
feat(tool): fix failing tests
1 parent 69eb478 commit fe9449a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cve_bin_tool/vex_manager/validate.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ def validate_file(
194194
# Use traditional jsonschema validation for CSAF and OpenVEX
195195
try:
196196
schema = self._get_schema(vex_type, version)
197-
if schema: # Only validate if schema was successfully loaded
197+
if (
198+
schema and len(schema) > 0
199+
): # Only validate if schema was successfully loaded and not empty
198200
jsonschema.validate(instance=raw_data, schema=schema)
199201
self.logger.info(f"VEX file passed {vex_type} schema validation")
200202
except JsonSchemaValidationError as e:

0 commit comments

Comments
 (0)