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:
23
samples/policy/simulations/baseline/diff.json
Normal file
23
samples/policy/simulations/baseline/diff.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"summary": {
|
||||
"policy": "baseline",
|
||||
"policyDigest": "sha256:simulation-baseline",
|
||||
"changed": 2
|
||||
},
|
||||
"diffs": [
|
||||
{
|
||||
"findingId": "library:pkg/openssl@1.1.1w",
|
||||
"baselineStatus": "Pass",
|
||||
"projectedStatus": "Blocked",
|
||||
"rule": "block_critical",
|
||||
"notes": "Critical severity must be remediated before deploy."
|
||||
},
|
||||
{
|
||||
"findingId": "library:pkg/internal-runtime@1.0.0",
|
||||
"baselineStatus": "Pass",
|
||||
"projectedStatus": "Warned",
|
||||
"rule": "alert_warn_eol_runtime",
|
||||
"notes": "Runtime marked as EOL; upgrade recommended."
|
||||
}
|
||||
]
|
||||
}
|
||||
21
samples/policy/simulations/baseline/scenario.json
Normal file
21
samples/policy/simulations/baseline/scenario.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "baseline",
|
||||
"policyPath": "docs/examples/policies/baseline.yaml",
|
||||
"findings": [
|
||||
{
|
||||
"findingId": "library:pkg/openssl@1.1.1w",
|
||||
"severity": "Critical",
|
||||
"source": "NVD"
|
||||
},
|
||||
{
|
||||
"findingId": "library:pkg/internal-runtime@1.0.0",
|
||||
"severity": "Low",
|
||||
"source": "NVD",
|
||||
"tags": ["runtime:eol"]
|
||||
}
|
||||
],
|
||||
"expectedDiffs": [
|
||||
{ "findingId": "library:pkg/openssl@1.1.1w", "status": "Blocked" },
|
||||
{ "findingId": "library:pkg/internal-runtime@1.0.0", "status": "Warned" }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user