compliance-trestle
compliance-trestle copied to clipboard
Validation broken when loading split models via `-t`
Describe the bug
Validation returns incorrect failures when called with the -t
flag, at least for -t system-security-plan
when the model has been split using trestle split
To Reproduce
Steps to reproduce the behavior:
- Create a new system-security-plan
trestle create -t system-security-plan -o validate-test
- Edit ssp to put a valid profile href in
- Verify that
trestle validate -f system-security-plans/validate-test/system-security-plan.json
andtrestle validate -t system-security-plan -n validate-test
correctly report that the model is valid - Split the model:
trestle split -f system-security-plans/validate-test/system-security-plan.json -e "system-security-plan.metadata"
- Verify that
trestle validate -f system-security-plans/validate-test/system-security-plan.json
still reports that the model is valid - Try to validate with
trestle validate -t system-security-plan -n validate-test
Expected behavior
The model is still valid
Actual behavior
Step 6 reports that the model has extra fields.
Screenshots / Logs.
Environment
- OS: docker
- Python version: 3.11
- Installed packages: compliance-trestle 3.4.0