-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add system-characteristics 'cia-has' and 'has-system-name-short' cons…
…traints (#689) * Added system-characteristics 'cia-impact' and 'has-system-name-short' constraints and tests * rephrase for clarity * Create separate invalid tests * Add more detailed test descriptions * Adjust ssp-all-VALID.xml to have valid security levels * Cleanup metapath * Add help-url props * Capitalize things * add n
- Loading branch information
Showing
12 changed files
with
135 additions
and
1 deletion.
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
25 changes: 25 additions & 0 deletions
25
src/validations/constraints/content/ssp-cia-impact-has-adjustment-justification-INVALID.xml
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,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://csrc.nist.gov/ns/oscal/1.0 https://github.com/usnistgov/OSCAL/releases/download/v1.1.2/oscal_ssp_schema.xsd" | ||
uuid="12345678-1234-4321-8765-123456789012"> | ||
<system-characteristics> | ||
<system-information> | ||
<information-type uuid="33333333-0000-4000-9000-000000000003"> | ||
<confidentiality-impact> | ||
<base>high</base> | ||
<selected>low</selected> | ||
<!-- adjustment-justification removed to ensure cia-impact-has-adjustment-justification passes when base and selected have the same impact level --> | ||
</confidentiality-impact> | ||
<integrity-impact> | ||
<base>moderate</base> | ||
<selected>fips-199-moderate</selected> | ||
</integrity-impact> | ||
<availability-impact> | ||
<base>low</base> | ||
<selected>fips-199-low</selected> | ||
</availability-impact> | ||
</information-type> | ||
</system-information> | ||
</system-characteristics> | ||
</system-security-plan> |
27 changes: 27 additions & 0 deletions
27
src/validations/constraints/content/ssp-cia-impact-has-selected-INVALID.xml
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,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://csrc.nist.gov/ns/oscal/1.0 https://github.com/usnistgov/OSCAL/releases/download/v1.1.2/oscal_ssp_schema.xsd" | ||
uuid="12345678-1234-4321-8765-123456789012"> | ||
<system-characteristics> | ||
<system-information> | ||
<information-type uuid="33333333-0000-4000-9000-000000000003"> | ||
<confidentiality-impact> | ||
<base>high</base> | ||
</confidentiality-impact> | ||
<integrity-impact> | ||
<base>moderate</base> | ||
<adjustment-justification> | ||
<p>Required if the base and selected values do not match.</p> | ||
</adjustment-justification> | ||
</integrity-impact> | ||
<availability-impact> | ||
<base>low</base> | ||
<adjustment-justification> | ||
<p>Required if the base and selected values do not match.</p> | ||
</adjustment-justification> | ||
</availability-impact> | ||
</information-type> | ||
</system-information> | ||
</system-characteristics> | ||
</system-security-plan> |
8 changes: 8 additions & 0 deletions
8
src/validations/constraints/content/ssp-has-system-name-short-INVALID.xml
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,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://csrc.nist.gov/ns/oscal/1.0 https://github.com/usnistgov/OSCAL/releases/download/v1.1.2/oscal_ssp_schema.xsd" | ||
uuid="12345678-1234-4321-8765-123456789012"> | ||
<system-characteristics> | ||
</system-characteristics> | ||
</system-security-plan> |
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
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/cia-impact-has-adjustment-justification-FAIL.yaml
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,7 @@ | ||
test-case: | ||
name: Negative Test for cia-impact-has-adjustment-justification | ||
description: Test that if an SSP system-characteristics system-information information-type (confidentiality-impact/integrity-impact/availability-impact) base element is not equal to the selected element, then an adjustment-justification element doesn't exist. This test shouldn't return true because the invalid test data should only include the fail case. | ||
content: ../content/ssp-cia-impact-has-adjustment-justification-INVALID.xml | ||
expectations: | ||
- constraint-id: cia-impact-has-adjustment-justification | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/cia-impact-has-adjustment-justification-PASS.yaml
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,7 @@ | ||
test-case: | ||
name: Positive Test for cia-impact-has-adjustment-justification | ||
description: Test that if an SSP system-characteristics system-information information-type (confidentiality-impact/integrity-impact/availability-impact) base element is not equal to the selected element, then an adjustment-justification element exists. If the base element equals the selected element, then it returns true. | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: cia-impact-has-adjustment-justification | ||
result: pass |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/cia-impact-has-selected-FAIL.yaml
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,7 @@ | ||
test-case: | ||
name: Negative Test for cia-impact-has-selected | ||
description: Test that an SSP system-characteristics system-information information-type (confidentiality-impact/integrity-impact/availability-impact) element does not have a selected element. | ||
content: ../content/ssp-cia-impact-has-selected-INVALID.xml | ||
expectations: | ||
- constraint-id: cia-impact-has-selected | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/cia-impact-has-selected-PASS.yaml
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,7 @@ | ||
test-case: | ||
name: Positive Test for cia-impact-has-selected | ||
description: Test that an SSP system-characteristics system-information information-type (confidentiality-impact/integrity-impact/availability-impact) element has selected element. | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: cia-impact-has-selected | ||
result: pass |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-system-name-short-FAIL.yaml
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,7 @@ | ||
test-case: | ||
name: Negative Test for has-system-name-short | ||
description: Test that an SSP system-characteristics element does not have a system-name-short element. | ||
content: ../content/ssp-has-system-name-short-INVALID.xml | ||
expectations: | ||
- constraint-id: has-system-name-short | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-system-name-short-PASS.yaml
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,7 @@ | ||
test-case: | ||
name: Positive Test for has-system-name-short | ||
description: Test that an SSP system-characteristics element has a system-name-short element. | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: has-system-name-short | ||
result: pass |