forked from GSA/fedramp-automation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add constraints and tests for issue GSA#942
- Loading branch information
Showing
10 changed files
with
83 additions
and
10 deletions.
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
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/content/ssp-information-type-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,9 @@ | ||
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" uuid="11111111-2222-4000-8000-000000000000"> | ||
<system-implementation> | ||
<component uuid="11111111-2222-4000-8000-009000100001" type="system"> | ||
<!-- The information type props don't have one of the correct allowed-values (incoming/outgoing) --> | ||
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="neither" value="C.3.5.1"/> | ||
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="neither" value="C.3.5.8"/> | ||
</component> | ||
</system-implementation> | ||
</system-security-plan> |
13 changes: 13 additions & 0 deletions
13
src/validations/constraints/content/ssp-information-type-has-class-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,13 @@ | ||
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" uuid="11111111-2222-4000-8000-000000000000"> | ||
<system-implementation> | ||
<component uuid="11111111-2222-4000-8000-009000100001" type="system"> | ||
<!-- | ||
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="incoming" value="C.3.5.1"/> | ||
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="outgoing" value="C.3.5.8"/> | ||
--> | ||
<!-- The information-type props are missing the @class attribute. --> | ||
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.1"/> | ||
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.8"/> | ||
</component> | ||
</system-implementation> | ||
</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
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/information-type-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 information-type | ||
description: This test case validates the behavior of constraint information-type | ||
content: ../content/ssp-information-type-INVALID.xml | ||
expectations: | ||
- constraint-id: information-type | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/information-type-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 information-type | ||
description: This test case validates the behavior of constraint information-type | ||
content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml | ||
expectations: | ||
- constraint-id: information-type | ||
result: pass |
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/information-type-has-class-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,9 @@ | ||
test-case: | ||
name: Negative Test for information-type-has-class | ||
description: >- | ||
This test case validates the behavior of constraint | ||
information-type-has-class | ||
content: ../content/ssp-information-type-has-class-INVALID.xml | ||
expectations: | ||
- constraint-id: information-type-has-class | ||
result: fail |
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/information-type-has-class-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,9 @@ | ||
test-case: | ||
name: Positive Test for information-type-has-class | ||
description: >- | ||
This test case validates the behavior of constraint | ||
information-type-has-class | ||
content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml | ||
expectations: | ||
- constraint-id: information-type-has-class | ||
result: pass |