openscap
openscap copied to clipboard
Introduce JSON tailoring import option for `autotailor`
The --json-tailoring option will provide support for importing https://github.com/ComplianceAsCode/schemas/tree/main/tailoring.
- [X] Code
- [X] Docs
- [x] Finalize schema
- [x] Test
@ggbecker If I got you right, this is a variation for multiple tailored profiles in a single JSON tailoring:
{
"profiles": [
{
"id": "tailoring_id",
"title": "Test",
"base_profile_id": "original_profile_id",
"rules": {
"some_rule_id": {
"evaluate": true,
"severity": "high"
},
"different_rule_id": {
"role": "unscored"
}
},
"variables": {
"a_variable_id": {
"value": "New Value"
},
"another_variable_id": {
"value": 42
},
"3rd_variable_id": {
"option_id": "some_option_id"
}
}
}
]
}
@jan-cerny @ggbecker ping.
I've integrated schema changes into PR.
Latest changes include groups override in JSON tailoring.