-
Notifications
You must be signed in to change notification settings - Fork 93
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-has-vendor-name' constraint and tests
- Loading branch information
Showing
6 changed files
with
54 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
12 changes: 12 additions & 0 deletions
12
src/validations/constraints/content/ssp-inventory-item-has-vendor-name-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,12 @@ | ||
<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-009000000007" type="process-procedure"> | ||
<!-- <prop ns="http://fedramp.gov/ns/oscal" name="vendor-name" value="Vendor"/> Missing software-name in linked component--> | ||
</component> | ||
<inventory-item uuid="11111111-2222-4000-8000-011000000001"> | ||
<!-- <prop ns="http://fedramp.gov/ns/oscal" name="vendor-name" value="Vendor"/> Missing software-name in inventory-item.--> | ||
<implemented-component component-uuid="11111111-2222-4000-8000-009000000007"> | ||
</implemented-component> | ||
</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-has-vendor-name-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-has-vendor-name | ||
description: >- | ||
This test case validates the behavior of constraint | ||
inventory-item-has-vendor-name | ||
content: ../content/ssp-inventory-item-has-vendor-name-INVALID.xml | ||
expectations: | ||
- constraint-id: inventory-item-has-vendor-name | ||
result: fail |
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/inventory-item-has-vendor-name-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-has-vendor-name | ||
description: >- | ||
This test case validates the behavior of constraint | ||
inventory-item-has-vendor-name | ||
content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml | ||
expectations: | ||
- constraint-id: inventory-item-has-vendor-name | ||
result: pass |