From f0f080f1c44db0f74ed06de77b595c7313170155 Mon Sep 17 00:00:00 2001 From: Gabeblis Date: Mon, 16 Dec 2024 14:48:52 +0000 Subject: [PATCH] Add constraints and tests for issue #942 --- features/fedramp_extensions.feature | 6 ++++++ .../ssp/xml/fedramp-ssp-example.oscal.xml | 20 +++++++++---------- .../content/ssp-information-type-INVALID.xml | 9 +++++++++ ...ssp-information-type-has-class-INVALID.xml | 13 ++++++++++++ .../fedramp-external-allowed-values.xml | 8 ++++++++ .../fedramp-external-constraints.xml | 5 +++++ .../unit-tests/information-type-FAIL.yaml | 7 +++++++ .../unit-tests/information-type-PASS.yaml | 7 +++++++ .../information-type-has-class-FAIL.yaml | 9 +++++++++ .../information-type-has-class-PASS.yaml | 9 +++++++++ 10 files changed, 83 insertions(+), 10 deletions(-) create mode 100644 src/validations/constraints/content/ssp-information-type-INVALID.xml create mode 100644 src/validations/constraints/content/ssp-information-type-has-class-INVALID.xml create mode 100644 src/validations/constraints/unit-tests/information-type-FAIL.yaml create mode 100644 src/validations/constraints/unit-tests/information-type-PASS.yaml create mode 100644 src/validations/constraints/unit-tests/information-type-has-class-FAIL.yaml create mode 100644 src/validations/constraints/unit-tests/information-type-has-class-PASS.yaml diff --git a/features/fedramp_extensions.feature b/features/fedramp_extensions.feature index 5a3d5ede9f..de16a4d561 100644 --- a/features/fedramp_extensions.feature +++ b/features/fedramp_extensions.feature @@ -100,8 +100,10 @@ Examples: | import-profile-has-available-document | | import-profile-resolves-to-fedramp-content | | incomplete-implemented-requirements | + | information-type | | information-type-800-60-v2r1 | | information-type-has-availability-impact | + | information-type-has-class | | information-type-has-confidentiality-impact | | information-type-has-integrity-impact | | information-type-system | @@ -318,8 +320,12 @@ Examples: | import-profile-resolves-to-fedramp-content-PASS.yaml | | incomplete-implemented-requirements-FAIL.yaml | | incomplete-implemented-requirements-PASS.yaml | + | information-type-FAIL.yaml | + | information-type-PASS.yaml | | information-type-has-availability-impact-FAIL.yaml | | information-type-has-availability-impact-PASS.yaml | + | information-type-has-class-FAIL.yaml | + | information-type-has-class-PASS.yaml | | information-type-has-confidentiality-impact-FAIL.yaml | | information-type-has-confidentiality-impact-PASS.yaml | | information-type-has-integrity-impact-FAIL.yaml | diff --git a/src/content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml b/src/content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml index 6e8f0bab30..681714732a 100644 --- a/src/content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml +++ b/src/content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml @@ -922,8 +922,8 @@

If 'not-applicable', attest explain why authentication is not applicable in the remarks.

- - + + @@ -1028,8 +1028,8 @@ - - + + @@ -1099,8 +1099,8 @@

If 'not-applicable', attest explain why authentication is not applicable in the remarks.

- - + + @@ -1277,8 +1277,8 @@

If 'not-applicable', attest explain why authentication is not applicable in the remarks.

- - + + @@ -1422,8 +1422,8 @@

If 'not-applicable', attest explain why authentication is not applicable in the remarks.

- - + +

This can only be known if provided by the leveraged system. diff --git a/src/validations/constraints/content/ssp-information-type-INVALID.xml b/src/validations/constraints/content/ssp-information-type-INVALID.xml new file mode 100644 index 0000000000..35bf93bcda --- /dev/null +++ b/src/validations/constraints/content/ssp-information-type-INVALID.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/validations/constraints/content/ssp-information-type-has-class-INVALID.xml b/src/validations/constraints/content/ssp-information-type-has-class-INVALID.xml new file mode 100644 index 0000000000..c05ed64f7b --- /dev/null +++ b/src/validations/constraints/content/ssp-information-type-has-class-INVALID.xml @@ -0,0 +1,13 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/validations/constraints/fedramp-external-allowed-values.xml b/src/validations/constraints/fedramp-external-allowed-values.xml index 82e467efa0..f3e04809e6 100644 --- a/src/validations/constraints/fedramp-external-allowed-values.xml +++ b/src/validations/constraints/fedramp-external-allowed-values.xml @@ -146,6 +146,14 @@ FedRAMP Version + + Information Type + Contains the list of supported values for information type props. + + Incoming + Outgoing + + NIST SP 800-60 Volume 2 Revision 1 Information Types Contains a list of all supported information types from NIST SP 800-60 Volume 2 Revision 1. diff --git a/src/validations/constraints/fedramp-external-constraints.xml b/src/validations/constraints/fedramp-external-constraints.xml index db02b599b2..6fc05464d5 100644 --- a/src/validations/constraints/fedramp-external-constraints.xml +++ b/src/validations/constraints/fedramp-external-constraints.xml @@ -547,6 +547,11 @@ A FedRAMP SSP system implementation section MUST have at least two inventory items. + + Information Type Has Class + + In a FedRAMP SSP, each component that defines an information type MUST specify whether the information is incoming or outgoing. + Inter-Boundary Incoming Communication Direction Has an IPV Address or a URI diff --git a/src/validations/constraints/unit-tests/information-type-FAIL.yaml b/src/validations/constraints/unit-tests/information-type-FAIL.yaml new file mode 100644 index 0000000000..291134fba4 --- /dev/null +++ b/src/validations/constraints/unit-tests/information-type-FAIL.yaml @@ -0,0 +1,7 @@ +test-case: + name: Negative Test for information-type + description: This test case validates the behavior of constraint information-type + content: ../content/ssp-information-type-INVALID.xml + expectations: + - constraint-id: information-type + result: fail diff --git a/src/validations/constraints/unit-tests/information-type-PASS.yaml b/src/validations/constraints/unit-tests/information-type-PASS.yaml new file mode 100644 index 0000000000..7291b01037 --- /dev/null +++ b/src/validations/constraints/unit-tests/information-type-PASS.yaml @@ -0,0 +1,7 @@ +test-case: + name: Positive Test for information-type + description: This test case validates the behavior of constraint information-type + content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + expectations: + - constraint-id: information-type + result: pass diff --git a/src/validations/constraints/unit-tests/information-type-has-class-FAIL.yaml b/src/validations/constraints/unit-tests/information-type-has-class-FAIL.yaml new file mode 100644 index 0000000000..b14f17c40d --- /dev/null +++ b/src/validations/constraints/unit-tests/information-type-has-class-FAIL.yaml @@ -0,0 +1,9 @@ +test-case: + name: Negative Test for information-type-has-class + description: >- + This test case validates the behavior of constraint + information-type-has-class + content: ../content/ssp-information-type-has-class-INVALID.xml + expectations: + - constraint-id: information-type-has-class + result: fail diff --git a/src/validations/constraints/unit-tests/information-type-has-class-PASS.yaml b/src/validations/constraints/unit-tests/information-type-has-class-PASS.yaml new file mode 100644 index 0000000000..ddd3eb26bc --- /dev/null +++ b/src/validations/constraints/unit-tests/information-type-has-class-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for information-type-has-class + description: >- + This test case validates the behavior of constraint + information-type-has-class + content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + expectations: + - constraint-id: information-type-has-class + result: pass