diff --git a/features/fedramp_extensions.feature b/features/fedramp_extensions.feature index 829030452..10c7922a1 100644 --- a/features/fedramp_extensions.feature +++ b/features/fedramp_extensions.feature @@ -125,6 +125,7 @@ Examples: | interconnection-security | | inventory-item-allows-authenticated-scan | | inventory-item-and-component-has-public | + | inventory-item-has-asset-type | | inventory-item-has-diagram-label | | inventory-item-has-function | | inventory-item-has-scan-type | @@ -393,6 +394,8 @@ Examples: | inventory-item-allows-authenticated-scan-PASS.yaml | | inventory-item-and-component-has-public-FAIL.yaml | | inventory-item-and-component-has-public-PASS.yaml | + | inventory-item-has-asset-type-FAIL.yaml | + | inventory-item-has-asset-type-PASS.yaml | | inventory-item-has-diagram-label-FAIL.yaml | | inventory-item-has-diagram-label-PASS.yaml | | inventory-item-has-function-FAIL.yaml | diff --git a/src/validations/constraints/content/ssp-inventory-item-has-asset-type-INVALID.xml b/src/validations/constraints/content/ssp-inventory-item-has-asset-type-INVALID.xml new file mode 100644 index 000000000..760caa436 --- /dev/null +++ b/src/validations/constraints/content/ssp-inventory-item-has-asset-type-INVALID.xml @@ -0,0 +1,7 @@ + + + + + + + \ 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 1fd67c084..f5855a349 100644 --- a/src/validations/constraints/fedramp-external-constraints.xml +++ b/src/validations/constraints/fedramp-external-constraints.xml @@ -694,6 +694,11 @@ For HIGH-impact systems, every inventory-item MUST identify an asset-owner or administrator property either within the inventory-item itself, or within the component linked by the inventory-item. + + Inventory Item Has Asset-Type + + In a FedRAMP SSP, each inventory item MUST define the asset type either in the inventory item itself or within the linked component. + Inventory Item Has Diagram Label diff --git a/src/validations/constraints/unit-tests/inventory-item-has-asset-type-FAIL.yaml b/src/validations/constraints/unit-tests/inventory-item-has-asset-type-FAIL.yaml new file mode 100644 index 000000000..baf1f0616 --- /dev/null +++ b/src/validations/constraints/unit-tests/inventory-item-has-asset-type-FAIL.yaml @@ -0,0 +1,9 @@ +test-case: + name: Negative Test for inventory-item-has-asset-type + description: >- + This test case validates the behavior of constraint + inventory-item-has-asset-type + content: ../content/ssp-inventory-item-has-asset-type-INVALID.xml + expectations: + - constraint-id: inventory-item-has-asset-type + result: fail diff --git a/src/validations/constraints/unit-tests/inventory-item-has-asset-type-PASS.yaml b/src/validations/constraints/unit-tests/inventory-item-has-asset-type-PASS.yaml new file mode 100644 index 000000000..6f3fa6982 --- /dev/null +++ b/src/validations/constraints/unit-tests/inventory-item-has-asset-type-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for inventory-item-has-asset-type + description: >- + This test case validates the behavior of constraint + inventory-item-has-asset-type + content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + expectations: + - constraint-id: inventory-item-has-asset-type + result: pass