diff --git a/features/fedramp_extensions.feature b/features/fedramp_extensions.feature index 7aced5bef..54f73f73e 100644 --- a/features/fedramp_extensions.feature +++ b/features/fedramp_extensions.feature @@ -129,6 +129,7 @@ Examples: | inventory-item-has-valid-mac-address | | inventory-item-has-vendor-name | | inventory-item-or-component-has-asset-id | + | inventory-item-or-component-has-virtual | | inventory-item-public | | inventory-item-virtual | | last-accessed-is-datetime | @@ -402,6 +403,8 @@ Examples: | inventory-item-public-PASS.yaml | | inventory-item-virtual-FAIL.yaml | | inventory-item-virtual-PASS.yaml | + | iventory-item-or-component-has-virtual-FAIL.yaml | + | iventory-item-or-component-has-virtual-PASS.yaml | | last-accessed-is-datetime-FAIL.yaml | | last-accessed-is-datetime-PASS.yaml | | leveraged-authorization-has-authorization-type-FAIL.yaml | diff --git a/src/validations/constraints/content/ssp-inventory-item-or-component-has-virtual-INVALID.xml b/src/validations/constraints/content/ssp-inventory-item-or-component-has-virtual-INVALID.xml new file mode 100644 index 000000000..ca8c77777 --- /dev/null +++ b/src/validations/constraints/content/ssp-inventory-item-or-component-has-virtual-INVALID.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/validations/constraints/fedramp-external-constraints.xml b/src/validations/constraints/fedramp-external-constraints.xml index af1baef6b..7523ceb55 100644 --- a/src/validations/constraints/fedramp-external-constraints.xml +++ b/src/validations/constraints/fedramp-external-constraints.xml @@ -708,11 +708,16 @@ In a FedRAMP SSP, each inventory item MUST include the vendor name in the inventory item itself or within the linked component. - - Scan Type Has Remarks - - When scan-type is 'other' or 'not-applicable', remarks MUST be provided to explain the selection. - + + Inventory Item or Component Has Virtual + + In a FedRAMP SSP, each inventory item MUST state if it is virtual in the inventory item itself or the linked component. + + + Scan Type Has Remarks + + When scan-type is 'other' or 'not-applicable', remarks MUST be provided to explain the selection. + diff --git a/src/validations/constraints/unit-tests/iventory-item-or-component-has-virtual-FAIL.yaml b/src/validations/constraints/unit-tests/iventory-item-or-component-has-virtual-FAIL.yaml new file mode 100644 index 000000000..623964940 --- /dev/null +++ b/src/validations/constraints/unit-tests/iventory-item-or-component-has-virtual-FAIL.yaml @@ -0,0 +1,9 @@ +test-case: + name: Negative Test for inventory-item-or-component-has-virtual + description: >- + This test case validates the behavior of constraint + inventory-item-or-component-has-virtual + content: ../content/ssp-inventory-item-or-component-has-virtual-INVALID.xml + expectations: + - constraint-id: inventory-item-or-component-has-virtual + result: fail diff --git a/src/validations/constraints/unit-tests/iventory-item-or-component-has-virtual-PASS.yaml b/src/validations/constraints/unit-tests/iventory-item-or-component-has-virtual-PASS.yaml new file mode 100644 index 000000000..788081779 --- /dev/null +++ b/src/validations/constraints/unit-tests/iventory-item-or-component-has-virtual-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for inventory-item-or-component-has-virtual + description: >- + This test case validates the behavior of constraint + inventory-item-or-component-has-virtual + content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + expectations: + - constraint-id: inventory-item-or-component-has-virtual + result: pass