forked from Checkmarx/kics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Checkmarx#4437 from Checkmarx/tests/fix-e2e-bom-test
feat(e2e): added custom JSON Schema Validation for BoM Results
- Loading branch information
Showing
5 changed files
with
146 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
{ | ||
"allOf": [ | ||
{ | ||
"$ref" : "result.json" | ||
}, | ||
{ | ||
"type": "object", | ||
"required": [ | ||
"bill_of_materials" | ||
], | ||
"properties": { | ||
"bill_of_materials": { | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"query_name", | ||
"query_id", | ||
"query_url", | ||
"severity", | ||
"platform", | ||
"category", | ||
"description", | ||
"description_id", | ||
"files" | ||
], | ||
"properties": { | ||
"query_name": { | ||
"type": "string" | ||
}, | ||
"query_id": { | ||
"type": "string", | ||
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-4{1}[a-f0-9]{3}-[89ab]{1}[a-f0-9]{3}-[a-f0-9]{12}$" | ||
}, | ||
"query_url": { | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"severity": { | ||
"type": "string", | ||
"const": "TRACE" | ||
}, | ||
"platform": { | ||
"type": "string", | ||
"enum": [ | ||
"Common", | ||
"Ansible", | ||
"CloudFormation", | ||
"Dockerfile", | ||
"Kubernetes", | ||
"OpenAPI", | ||
"Terraform", | ||
"AzureResourceManager" | ||
] | ||
}, | ||
"category": { | ||
"type": "string", | ||
"category": "Bill Of Materials" | ||
}, | ||
"description": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"description_id": { | ||
"type": "string", | ||
"pattern": "^[a-f0-9]{8}$" | ||
}, | ||
"files": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"file_name", | ||
"similarity_id", | ||
"line", | ||
"issue_type", | ||
"search_key", | ||
"search_line", | ||
"search_value", | ||
"expected_value", | ||
"actual_value" | ||
], | ||
"properties": { | ||
"file_name": { | ||
"type": "string", | ||
"oneOf": [ | ||
{ | ||
"pattern": "^(.)*(:)*(http:|https:|www\\.)(.)+$" | ||
}, | ||
{ | ||
"pattern": "^([\\w\\-. ]+(\\\\|\\/))*([\\w\\-. ]+(\\\\|\\/).(.)*)$" | ||
} | ||
] | ||
}, | ||
"similarity_id": { | ||
"type": "string", | ||
"pattern": "^[A-Fa-f0-9]{64}$" | ||
}, | ||
"line": { | ||
"type": "integer", | ||
"minimum": 1 | ||
}, | ||
"issue_type": { | ||
"type": "string", | ||
"const": "BillOfMaterials" | ||
}, | ||
"search_key": { | ||
"type": "string", | ||
"minLength": 0 | ||
}, | ||
"search_line": { | ||
"type": "integer", | ||
"minimum": 0 | ||
}, | ||
"search_value": { | ||
"type": "string" | ||
}, | ||
"expected_value": { | ||
"type": "string" | ||
}, | ||
"actual_value": { | ||
"type": "string" | ||
}, | ||
"value": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters