diff --git a/features/fedramp_extensions.feature b/features/fedramp_extensions.feature index 9c6bbcbd4..d7743320b 100644 --- a/features/fedramp_extensions.feature +++ b/features/fedramp_extensions.feature @@ -134,6 +134,7 @@ Examples: | inventory-item-has-scan-type | | inventory-item-has-valid-mac-address | | inventory-item-has-vendor-name | + | inventory-item-not-system-or-validation | | inventory-item-or-component-has-asset-id | | inventory-item-or-component-has-virtual | | inventory-item-public | @@ -415,6 +416,8 @@ Examples: | inventory-item-has-valid-mac-address-PASS.yaml | | inventory-item-has-vendor-name-FAIL.yaml | | inventory-item-has-vendor-name-PASS.yaml | + | inventory-item-not-system-or-validation-FAIL.yaml | + | inventory-item-not-system-or-validation-PASS.yaml | | inventory-item-or-component-has-asset-id-FAIL.yaml | | inventory-item-or-component-has-asset-id-PASS.yaml | | inventory-item-public-FAIL.yaml | diff --git a/src/validations/constraints/content/ssp-inventory-item-not-system-or-validation-INVALID.xml b/src/validations/constraints/content/ssp-inventory-item-not-system-or-validation-INVALID.xml new file mode 100644 index 000000000..cf968adb1 --- /dev/null +++ b/src/validations/constraints/content/ssp-inventory-item-not-system-or-validation-INVALID.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ 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 7bb6bc5fe..2c3fff23d 100644 --- a/src/validations/constraints/fedramp-external-constraints.xml +++ b/src/validations/constraints/fedramp-external-constraints.xml @@ -746,6 +746,11 @@ In a FedRAMP SSP, each inventory item MUST include the vendor name in the inventory item itself or within the linked component. + + Inventory Item Not System or Validation + + In a FedRAMP SSP, an inventory item MUST NOT reference a "system" or "validation" component. + Inventory Item or Component Has Virtual diff --git a/src/validations/constraints/unit-tests/inventory-item-not-system-or-validation-FAIL.yaml b/src/validations/constraints/unit-tests/inventory-item-not-system-or-validation-FAIL.yaml new file mode 100644 index 000000000..8e276ca2c --- /dev/null +++ b/src/validations/constraints/unit-tests/inventory-item-not-system-or-validation-FAIL.yaml @@ -0,0 +1,9 @@ +test-case: + name: Negative Test for inventory-item-not-system-or-validation + description: >- + This test case validates the behavior of constraint + inventory-item-not-system-or-validation + content: ../content/ssp-inventory-item-not-system-or-validation-INVALID.xml + expectations: + - constraint-id: inventory-item-not-system-or-validation + result: fail diff --git a/src/validations/constraints/unit-tests/inventory-item-not-system-or-validation-PASS.yaml b/src/validations/constraints/unit-tests/inventory-item-not-system-or-validation-PASS.yaml new file mode 100644 index 000000000..f47fc23a0 --- /dev/null +++ b/src/validations/constraints/unit-tests/inventory-item-not-system-or-validation-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for inventory-item-not-system-or-validation + description: >- + This test case validates the behavior of constraint + inventory-item-not-system-or-validation + content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + expectations: + - constraint-id: inventory-item-not-system-or-validation + result: pass