Skip to content

Commit

Permalink
Added system-characteristics 'categorization-has constraints and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabeblis committed Sep 10, 2024
1 parent 9bf9f0c commit bec0eb1
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 1 deletion.
6 changes: 6 additions & 0 deletions features/fedramp_extensions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Examples:
| attachment-type-PASS.yaml |
| authorization-type-FAIL.yaml |
| authorization-type-PASS.yaml |
| categorization-has-correct-system-attribute-FAIL.yaml |
| categorization-has-correct-system-attribute-PASS.yaml |
| categorization-has-information-type-id-FAIL.yaml |
| categorization-has-information-type-id-PASS.yaml |
| cloud-service-model-FAIL.yaml |
| cloud-service-model-PASS.yaml |
| component-type-FAIL.yaml |
Expand Down Expand Up @@ -61,6 +65,8 @@ Examples:
| address-type |
| attachment-type |
| authorization-type |
| categorization-has-correct-system-attribute |
| categorization-has-information-type-id |
| cloud-service-model |
| component-type |
| control-implementation-status |
Expand Down
2 changes: 1 addition & 1 deletion src/validations/constraints/content/ssp-all-INVALID.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<p>Contains sensitive financial data related to organizational operations.</p>
</description>
<categorization system="https://unsupported-system.com">
<information-type-id>C.2.8.12</information-type-id>
<!-- Removed information-type-id to ensure that categorization-has-information-type-id fails correctly. -->
</categorization>
<confidentiality-impact>
<base>high</base>
Expand Down
13 changes: 13 additions & 0 deletions src/validations/constraints/fedramp-external-constraints.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,17 @@
</remarks>
</constraints>
</context>

<context>
<metapath target="/system-security-plan"/>

<constraints>
<expect id="categorization-has-correct-system-attribute" target="//system-characteristics" test="system-information/information-type/categorization/@system eq 'https://doi.org/10.6028/NIST.SP.800-60v2r1'" level="ERROR">
<message>A FedRAMP SSP information-type categorization lacks a correct system attribute. The correct value is "https://doi.org/10.6028/NIST.SP.800-60v2r1".</message>
</expect>
<expect id="categorization-has-information-type-id" target="//system-characteristics" test="system-information/information-type/categorization/information-type-id" level="ERROR">
<message>A FedRAMP SSP information type categorization must have at least one information type identifier.</message>
</expect>
</constraints>
</context>
</metaschema-meta-constraints>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Negative Test for categorization-has-correct-system-attribute
description: >-
This test case validates the behavior of constraint
categorization-has-correct-system-attribute
content: ../content/ssp-all-INVALID.xml
expectations:
- constraint-id: categorization-has-correct-system-attribute
result: fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Positive Test for categorization-has-correct-system-attribute
description: >-
This test case validates the behavior of constraint
categorization-has-correct-system-attribute
content: ../content/ssp-all-VALID.xml
expectations:
- constraint-id: categorization-has-correct-system-attribute
result: pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Negative Test for categorization-has-information-type-id
description: >-
This test case validates the behavior of constraint
categorization-has-information-type-id
content: ../content/ssp-all-INVALID.xml
expectations:
- constraint-id: categorization-has-information-type-id
result: fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Positive Test for categorization-has-information-type-id
description: >-
This test case validates the behavior of constraint
categorization-has-information-type-id
content: ../content/ssp-all-VALID.xml
expectations:
- constraint-id: categorization-has-information-type-id
result: pass

0 comments on commit bec0eb1

Please sign in to comment.