-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add inventory-item-and-component-has-public constraint and tests (#1050)
- Loading branch information
Showing
6 changed files
with
39 additions
and
0 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
11 changes: 11 additions & 0 deletions
11
src/validations/constraints/content/ssp-inventory-item-and-component-has-public-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,11 @@ | ||
<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-009000500004" type="service"> | ||
<prop name="implementation-point" value="internal"/> | ||
<!-- <prop name="public" value="no"/> Missing public prop. --> | ||
</component> | ||
<inventory-item uuid="11111111-2222-4000-8000-011000000002"> | ||
<!-- <prop name="public" value="no"/> Missing public prop. --> | ||
</inventory-item> | ||
</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
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/inventory-item-and-component-has-public-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 inventory-item-and-component-has-public | ||
description: >- | ||
This test case validates the behavior of constraint | ||
inventory-item-and-component-has-public | ||
content: ../content/ssp-inventory-item-and-component-has-public-INVALID.xml | ||
expectations: | ||
- constraint-id: inventory-item-and-component-has-public | ||
result: fail |
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/inventory-item-and-component-has-public-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 inventory-item-and-component-has-public | ||
description: >- | ||
This test case validates the behavior of constraint | ||
inventory-item-and-component-has-public | ||
content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml | ||
expectations: | ||
- constraint-id: inventory-item-and-component-has-public | ||
result: pass |