Add Policy DSL Validator, Schema Exporter, and Simulation Smoke tools
- Implemented PolicyDslValidator with command-line options for strict mode and JSON output. - Created PolicySchemaExporter to generate JSON schemas for policy-related models. - Developed PolicySimulationSmoke tool to validate policy simulations against expected outcomes. - Added project files and necessary dependencies for each tool. - Ensured proper error handling and usage instructions across tools.
This commit is contained in:
130
docs/schemas/policy-run-request.schema.json
Normal file
130
docs/schemas/policy-run-request.schema.json
Normal file
@@ -0,0 +1,130 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "PolicyRunRequest",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"SchemaVersion": {
|
||||
"type": "string"
|
||||
},
|
||||
"TenantId": {
|
||||
"type": "string"
|
||||
},
|
||||
"PolicyId": {
|
||||
"type": "string"
|
||||
},
|
||||
"PolicyVersion": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "int32"
|
||||
},
|
||||
"Mode": {
|
||||
"$ref": "#/definitions/PolicyRunMode"
|
||||
},
|
||||
"Priority": {
|
||||
"$ref": "#/definitions/PolicyRunPriority"
|
||||
},
|
||||
"RunId": {
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"QueuedAt": {
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
],
|
||||
"format": "date-time"
|
||||
},
|
||||
"RequestedBy": {
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"CorrelationId": {
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"Metadata": {
|
||||
"type": [
|
||||
"null",
|
||||
"object"
|
||||
],
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"Inputs": {
|
||||
"$ref": "#/definitions/PolicyRunInputs"
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"PolicyRunMode": {
|
||||
"type": "integer",
|
||||
"description": "",
|
||||
"x-enumNames": [
|
||||
"Full",
|
||||
"Incremental",
|
||||
"Simulate"
|
||||
],
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
]
|
||||
},
|
||||
"PolicyRunPriority": {
|
||||
"type": "integer",
|
||||
"description": "",
|
||||
"x-enumNames": [
|
||||
"Normal",
|
||||
"High",
|
||||
"Emergency"
|
||||
],
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
]
|
||||
},
|
||||
"PolicyRunInputs": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"SbomSet": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"AdvisoryCursor": {
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
],
|
||||
"format": "date-time"
|
||||
},
|
||||
"VexCursor": {
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
],
|
||||
"format": "date-time"
|
||||
},
|
||||
"Environment": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"CaptureExplain": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user