diff --git a/features/fedramp_extensions.feature b/features/fedramp_extensions.feature index c8be89d9d3..10728daf2e 100644 --- a/features/fedramp_extensions.feature +++ b/features/fedramp_extensions.feature @@ -177,6 +177,8 @@ Examples: | missing-response-components-PASS.yaml | | party-has-name-FAIL.yaml | | party-has-name-PASS.yaml | + | oscal-version-matches-fedramp-version-FAIL.yaml | + | oscal-version-matches-fedramp-version-PASS.yaml | | privilege-level-FAIL.yaml | | privilege-level-PASS.yaml | | resource-has-base64-or-rlink-FAIL.yaml | @@ -323,6 +325,7 @@ Examples: | marking | | missing-response-components | | party-has-name | + | oscal-version-matches-fedramp-version | | privilege-level | | prop-response-point-has-cardinality-one | | resource-has-base64-or-rlink | diff --git a/src/validations/constraints/content/ssp-oscal-version-matches-fedramp-version-INVALID.xml b/src/validations/constraints/content/ssp-oscal-version-matches-fedramp-version-INVALID.xml new file mode 100644 index 0000000000..2f65b1f64d --- /dev/null +++ b/src/validations/constraints/content/ssp-oscal-version-matches-fedramp-version-INVALID.xml @@ -0,0 +1,6 @@ + + + 2.0.0 + + + \ 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 7888d6461a..abc1233dbd 100644 --- a/src/validations/constraints/fedramp-external-constraints.xml +++ b/src/validations/constraints/fedramp-external-constraints.xml @@ -23,9 +23,31 @@ - + + + + + + + + + + + +

FedRAMP considers every major version as a possible source of backwards-compatible changes. FedRAMP only accepts versions with the same major version, but not newer.

+
+
+ + + + + A FedRAMP document SHOULD have an OSCAL version that matches the minimally required version for FedRAMP packages, {$fedramp-version-oscal-part}, not {../oscal-version}. DEBUG: {$major-version-valid} {$minor-version-valid} {$patch-version-valid} + +
+
+ User Has Authorized Privilege diff --git a/src/validations/constraints/unit-tests/oscal-version-matches-fedramp-version-FAIL.yaml b/src/validations/constraints/unit-tests/oscal-version-matches-fedramp-version-FAIL.yaml new file mode 100644 index 0000000000..b04b36f0cb --- /dev/null +++ b/src/validations/constraints/unit-tests/oscal-version-matches-fedramp-version-FAIL.yaml @@ -0,0 +1,9 @@ +test-case: + name: Negative Test for oscal-version-matches-fedramp-version + description: >- + This test case validates the behavior of constraint + oscal-version-matches-fedramp-version + content: ../content/ssp-oscal-version-matches-fedramp-version-INVALID.xml + expectations: + - constraint-id: oscal-version-matches-fedramp-version + result: fail diff --git a/src/validations/constraints/unit-tests/oscal-version-matches-fedramp-version-PASS.yaml b/src/validations/constraints/unit-tests/oscal-version-matches-fedramp-version-PASS.yaml new file mode 100644 index 0000000000..4b2425c1a6 --- /dev/null +++ b/src/validations/constraints/unit-tests/oscal-version-matches-fedramp-version-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for oscal-version-matches-fedramp-version + description: >- + This test case validates the behavior of constraint + oscal-version-matches-fedramp-version + content: ../content/ssp-all-VALID.xml + expectations: + - constraint-id: oscal-version-matches-fedramp-version + result: pass