diff --git a/features/fedramp_extensions.feature b/features/fedramp_extensions.feature index a29d3c941..7aced5bef 100644 --- a/features/fedramp_extensions.feature +++ b/features/fedramp_extensions.feature @@ -28,6 +28,7 @@ Examples: | address-type | | aggregate-parameters-warning | | attachment-type | + | authenticated-scan-no-has-remarks | | authentication-method-has-remarks | | authorization-type | | by-component-has-responsible-role | @@ -49,6 +50,7 @@ Examples: | data-center-primary | | data-center-us | | deployment-model | + | end-of-life-date-type | | external-system-nature-of-agreement | | extraneous-implemented-requirements | | fedramp-citations-has-correct-link | @@ -104,6 +106,7 @@ Examples: | has-system-id | | has-system-name-short | | has-user-guide | + | high-impact-inventory-item-has-asset-owner | | image-has-checksum | | implementation-status-has-remarks | | import-profile-has-available-document | @@ -116,10 +119,13 @@ Examples: | information-type-has-confidentiality-impact | | information-type-has-integrity-impact | | information-type-system | + | inter-boundary-component-has-information-type | | interconnection-direction | | interconnection-security | | inventory-item-allows-authenticated-scan | | inventory-item-and-component-has-public | + | inventory-item-has-function | + | inventory-item-has-scan-type | | inventory-item-has-valid-mac-address | | inventory-item-has-vendor-name | | inventory-item-or-component-has-asset-id | @@ -154,6 +160,7 @@ Examples: | role-defined-system-owner | | saas-has-leveraged-authorization | | scan-type | + | scan-type-has-remarks | | security-level | | security-sensitivity-level-matches-security-impact-level | | statement-has-this-system-component | @@ -189,6 +196,8 @@ Examples: | aggregate-parameters-warning-PASS.yaml | | attachment-type-FAIL.yaml | | attachment-type-PASS.yaml | + | authenticated-scan-no-has-remarks-FAIL.yaml | + | authenticated-scan-no-has-remarks-PASS.yaml | | authentication-method-has-remarks-FAIL.yaml | | authentication-method-has-remarks-PASS.yaml | | authorization-type-FAIL.yaml | @@ -231,6 +240,8 @@ Examples: | data-center-us-PASS.yaml | | deployment-model-FAIL.yaml | | deployment-model-PASS.yaml | + | end-of-life-date-type-FAIL.yaml | + | end-of-life-date-type-PASS.yaml | | external-system-nature-of-agreement-FAIL.yaml | | external-system-nature-of-agreement-PASS.yaml | | extraneous-implemented-requirements-FAIL.yaml | @@ -341,6 +352,8 @@ Examples: | has-system-name-short-PASS.yaml | | has-user-guide-FAIL.yaml | | has-user-guide-PASS.yaml | + | high-impact-inventory-item-has-asset-owner-FAIL.yaml | + | high-impact-inventory-item-has-asset-owner-PASS.yaml | | image-has-checksum-FAIL.yaml | | image-has-checksum-PASS.yaml | | implementation-status-has-remarks-FAIL.yaml | @@ -365,6 +378,8 @@ Examples: | information-type-id-PASS.yaml | | information-type-system-FAIL.yaml | | information-type-system-PASS.yaml | + | inter-boundary-component-has-information-type-FAIL.yaml | + | inter-boundary-component-has-information-type-PASS.yaml | | interconnection-direction-FAIL.yaml | | interconnection-direction-PASS.yaml | | interconnection-security-FAIL.yaml | @@ -373,6 +388,10 @@ 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-function-FAIL.yaml | + | inventory-item-has-function-PASS.yaml | + | inventory-item-has-scan-type-FAIL.yaml | + | inventory-item-has-scan-type-PASS.yaml | | inventory-item-has-valid-mac-address-FAIL.yaml | | inventory-item-has-valid-mac-address-PASS.yaml | | inventory-item-has-vendor-name-FAIL.yaml | @@ -441,6 +460,8 @@ Examples: | saas-has-leveraged-authorization-PASS.yaml | | scan-type-FAIL.yaml | | scan-type-PASS.yaml | + | scan-type-has-remarks-FAIL.yaml | + | scan-type-has-remarks-PASS.yaml | | security-level-FAIL.yaml | | security-level-PASS.yaml | | security-sensitivity-level-matches-security-impact-level-FAIL.yaml | diff --git a/features/steps/fedramp_extensions_steps.ts b/features/steps/fedramp_extensions_steps.ts index 44b2435df..601f7b8af 100644 --- a/features/steps/fedramp_extensions_steps.ts +++ b/features/steps/fedramp_extensions_steps.ts @@ -1,23 +1,22 @@ -import { BeforeAll, BeforeStep, Given, Then, When, setDefaultTimeout, world } from "@cucumber/cucumber"; +import { BeforeAll, Given, Then, When, setDefaultTimeout } from "@cucumber/cucumber"; import { expect } from "chai"; import { + existsSync, + mkdirSync, readFileSync, readdirSync, unlinkSync, writeFileSync, - mkdirSync, - existsSync, } from "fs"; import { load } from "js-yaml"; -import { executeOscalCliCommand, resolveProfile, resolveProfileDocument, validateDocument} from "oscal"; -import {checkServerStatus} from 'oscal/dist/server.js' -import { dirname, join,parse, resolve } from "path"; -import { Exception, Log, Result } from "sarif"; +import { JSDOM } from 'jsdom'; +import { executeOscalCliCommand, formatSarifOutput, resolveProfileDocument, validateDocument } from "oscal"; +import { checkServerStatus } from 'oscal/dist/server.js'; +import { dirname, join, parse, resolve } from "path"; +import { Log } from "sarif"; import { fileURLToPath } from "url"; -import { parseString } from "xml2js"; -import {JSDOM} from 'jsdom' import { promisify } from "util"; -import {formatSarifOutput} from 'oscal' +import { parseString } from "xml2js"; let executor: 'oscal-cli'|'oscal-server' = process.env.OSCAL_EXECUTOR as 'oscal-cli'|'oscal-server' || 'oscal-cli' const quiet = process.env.OSCAL_TEST_QUIET === 'true' @@ -686,6 +685,7 @@ Then('I should have valid results {string}', async function (fileToValidate) { Then('I should verify that all constraints follow the style guide constraint', async function () { const baseDir = join(__dirname, '..', '..'); + const styleGuidePath = join(baseDir, 'src', 'validations', 'styleguides', 'fedramp-constraint-style.xml'); const constraintDir = join(baseDir, 'src', 'validations', 'constraints'); const constraintFiles = readdirSync(constraintDir).filter(file => file.startsWith('fedramp') && file.endsWith('.xml') @@ -701,7 +701,15 @@ Then('I should verify that all constraints follow the style guide constraint', a const fileContent = readFileSync(filePath, 'utf8'); const dom = new JSDOM(fileContent, { contentType: 'text/xml' }); const document = dom.window.document; - + const {isValid,log} = await validateDocument(filePath,{flags:['disable-schema'],quiet,extensions:[styleGuidePath],module:"http://csrc.nist.gov/ns/oscal/metaschema/1.0"},executor) + writeFileSync( + join( + __dirname, + "../../sarif/", + fileName.split(".xml").join("").toString()+".sarif" + ),JSON.stringify(log, null,"\t")) + const formattedErrors = (formatSarifOutput(log)); + formattedErrors&&errors.push(formattedErrors) // Process each 'constraints' block separately document.querySelectorAll('constraints').forEach(constraintsNode => { // Get direct child elements with IDs within this constraints block 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 b41041343..171d69de9 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 @@ -929,6 +929,7 @@ that represents the whole system.

+

If 'yes', describe the authentication method.

@@ -1199,6 +1200,10 @@ leveraged-authorization assembly:

+ + + + @@ -1651,7 +1656,9 @@ property.

+ + @@ -1662,7 +1669,9 @@ property.

Describe the virtual appliance and what it is used for.

+

virtual function

+ @@ -1781,6 +1790,7 @@ compliance (e.g., Module in Process).

+ @@ -1835,6 +1845,10 @@ compliance (e.g., Module in Process).

+ + + +

If 'yes', describe the authentication method.

@@ -2258,6 +2272,10 @@ approved.

+ + + +

If 'yes', describe the authentication method.

@@ -2367,6 +2385,10 @@ approved.

If no, explain why. If yes, omit remark.

+ +

no function

+
+ 11111111-2222-4000-8000-004000000010 @@ -2395,6 +2417,12 @@ approved.

+ + + +

Required, longer, formatted description.

+
+
@@ -2409,7 +2437,9 @@ approved.

- + +

a different kind of scan

+
@@ -2425,7 +2455,13 @@ approved.

- + + + +

Required, longer, formatted description.

+
+
+
@@ -2443,6 +2479,13 @@ approved.

Asset wasn't running at time of scan.

+ + +

Required, longer, formatted description.

+
+
+ + @@ -2458,6 +2501,11 @@ approved.

+ + +

Optional, longer, formatted description.

+
+
@@ -2476,6 +2524,12 @@ approved.

Asset wasn't running at time of scan.

+ + +

Optional, longer, formatted description.

+
+
+ @@ -2491,6 +2545,7 @@ approved.

+

virtual function

@@ -2522,8 +2577,9 @@ SSP authors must add implmentations for all required controls. at least every 3 years at least annually - - + + +

Describe how Part a is satisfied within the system.

Legacy approach. If no policy component is defined, describe here how the policy satisfies part a.

@@ -2553,6 +2609,37 @@ SSP authors must add implmentations for all required controls.
+ + + +

Describe how Part a is satisfied within the system.

+

Legacy approach. If no policy component is defined, describe here how the policy satisfies part a.

+

In this case, a link must be provided to the policy.

+

FedRAMP prefers all policies and procedures be attached as a resource in the back-matter. The link points to a resource.

+
+ + + + + 11111111-0000-4000-9000-000000000001 + + +

The specified component is the system itself.

+

Any control implementation response that can not be associated with another component is associated with the component representing the system.

+
+
+ + +

Describe how this policy component satisfies part a.

+

Component approach. This links to a component representing the Identity Management and Access Control Policy.

+

That component contains a link to the policy, so it does not have to be linked here too.

+
+ + + 11111111-0000-4000-9000-000000000001 + +
+
@@ -2786,7 +2873,7 @@ SSP authors must add implmentations for all required controls. - +

Describe how Part a is satisfied.

@@ -2856,7 +2943,7 @@ SSP authors must add implmentations for all required controls. 11111111-2222-4000-8000-004000000011 - +

Describe how the control is satisfied within the system.

@@ -3756,7 +3843,7 @@ SSP authors must add implmentations for all required controls. All employees, contractors, and third-party vendors who handle sensitive information or have access to organizational media. 11111111-2222-4000-8000-004000000011 - +

Describe how the control is satisfied within the system.

@@ -3771,7 +3858,9 @@ SSP authors must add implmentations for all required controls. 11111111-0000-4000-9000-000000000001
-
+ + +

For the portion of the control satisfied by the service provider, describe how the control is met.

@@ -3841,7 +3930,7 @@ SSP authors must add implmentations for all required controls. All personnel with access to company facilities or systems, including employees, contractors, and third-party vendors. 11111111-2222-4000-8000-004000000011 - +

Describe how the control is satisfied within the system.

diff --git a/src/validations/constraints/content/resolved-example-profile.xml b/src/validations/constraints/content/resolved-example-profile.xml new file mode 100644 index 000000000..ce2dd5bc1 --- /dev/null +++ b/src/validations/constraints/content/resolved-example-profile.xml @@ -0,0 +1,33 @@ + + + + Sample + 2025-01-08T00:00:00Z + 1.0 + 1.1.3 + + + Sample 1 + + + +

Should be INCLUDED (sample-1_smt.a)

+ + +

Should be INCLUDED (sample-1_smt.a.1)

+
+
+
+ + + + +

this should be EXCLUDED (sample-1_obj.a)

+ + +

this should be EXCLUDED (sample-1_obj.a-1)

+
+
+
+
+
\ No newline at end of file diff --git a/src/validations/constraints/content/ssp-authenticated-scan-no-has-remarks-INVALID.xml b/src/validations/constraints/content/ssp-authenticated-scan-no-has-remarks-INVALID.xml new file mode 100644 index 000000000..7128ef723 --- /dev/null +++ b/src/validations/constraints/content/ssp-authenticated-scan-no-has-remarks-INVALID.xml @@ -0,0 +1,27 @@ + + + + + fips-199-moderate + + + + +

Primary database server

+
+ + + + + + + + 11111111-0000-4000-9000-000000000001 + +
+
+ +
diff --git a/src/validations/constraints/content/ssp-end-of-life-date-type-INVALID.xml b/src/validations/constraints/content/ssp-end-of-life-date-type-INVALID.xml new file mode 100644 index 000000000..f8ec6e421 --- /dev/null +++ b/src/validations/constraints/content/ssp-end-of-life-date-type-INVALID.xml @@ -0,0 +1,22 @@ + + + + Test SSP for End of Life Date Type Validation + 2023-12-08T12:00:00Z + 1.0 + 1.0.0 + + + + Example Component + +

A component with an invalid end-of-life-date format

+
+ + +
+
+
diff --git a/src/validations/constraints/content/ssp-has-required-response-points-VALID.xml b/src/validations/constraints/content/ssp-has-required-response-points-VALID.xml new file mode 100644 index 000000000..c32acfbf1 --- /dev/null +++ b/src/validations/constraints/content/ssp-has-required-response-points-VALID.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + organization-defined personnel or roles + + + Chief Information Security Officer, Information System Security Officers, and System Administrators + + + + +

There

+
+ + + +

Describe the plan to complete the implementation.

+
+
+
+ + +

Describe how this policy currently satisfies part a.

+
+ + +

Describe the plan for addressing the missing policy elements.

+
+
+ + +

Identify what is currently missing from this policy.

+
+
+
+
+ + + +

Describe how Part a is satisfied within the system.

+

Legacy approach. If no policy component is defined, describe here how the policy satisfies part a.

+

In this case, a link must be provided to the policy.

+

FedRAMP prefers all policies and procedures be attached as a resource in the back-matter. The link points to a resource.

+
+ + + + +

The specified component is the system itself.

+

Any control implementation response that can not be associated with another component is associated with the component representing the system.

+
+
+ + +

Describe how this policy component satisfies part a.

+

Component approach. This links to a component representing the Identity Management and Access Control Policy.

+

That component contains a link to the policy, so it does not have to be linked here too.

+
+ +
+
+ + + +

There

+
+ + + +

Describe the plan to complete the implementation.

+
+
+
+ + +

Describe how this policy currently satisfies part a.

+
+ + +

Describe the plan for addressing the missing policy elements.

+
+
+ + +

Identify what is currently missing from this policy.

+
+
+
+
+ + + + +

Describe how Part b-1 is satisfied.

+
+ +
+
+ + + +

Describe how Part b-2 is satisfied.

+
+ +
+
+
+
+
\ No newline at end of file diff --git a/src/validations/constraints/content/ssp-high-impact-inventory-item-has-asset-owner-INVALID.xml b/src/validations/constraints/content/ssp-high-impact-inventory-item-has-asset-owner-INVALID.xml new file mode 100644 index 000000000..2beab9dab --- /dev/null +++ b/src/validations/constraints/content/ssp-high-impact-inventory-item-has-asset-owner-INVALID.xml @@ -0,0 +1,24 @@ + + + + + fips-199-high + + + + +

Primary database server

+
+ + + + + + +
+
+ +
diff --git a/src/validations/constraints/content/ssp-inter-boundary-component-has-information-type-INVALID.xml b/src/validations/constraints/content/ssp-inter-boundary-component-has-information-type-INVALID.xml new file mode 100644 index 000000000..5b248eef3 --- /dev/null +++ b/src/validations/constraints/content/ssp-inter-boundary-component-has-information-type-INVALID.xml @@ -0,0 +1,36 @@ + + + + + + Service B + +

An non-authorized service provided by the Awesome Cloud leveraged authorization.

+

Describe the service and what it is used for.

+
+ + + + + + +

If 'yes', describe the authentication method.

+

If 'no', explain why no authentication is used.

+

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

+
+
+ + + + + + + + 33333333-2222-4000-8000-004000000001 + + +

Each non-authorized leveraged service must be expressed as a "service" component.

+
+
+
+
\ No newline at end of file diff --git a/src/validations/constraints/content/ssp-inventory-item-has-function-INVALID.xml b/src/validations/constraints/content/ssp-inventory-item-has-function-INVALID.xml new file mode 100644 index 000000000..2d8409b5b --- /dev/null +++ b/src/validations/constraints/content/ssp-inventory-item-has-function-INVALID.xml @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/src/validations/constraints/content/ssp-inventory-item-has-scan-type-INVALID.xml b/src/validations/constraints/content/ssp-inventory-item-has-scan-type-INVALID.xml new file mode 100644 index 000000000..fe940d32a --- /dev/null +++ b/src/validations/constraints/content/ssp-inventory-item-has-scan-type-INVALID.xml @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/src/validations/constraints/content/ssp-scan-type-has-remarks-INVALID.xml b/src/validations/constraints/content/ssp-scan-type-has-remarks-INVALID.xml new file mode 100644 index 000000000..2bc42b807 --- /dev/null +++ b/src/validations/constraints/content/ssp-scan-type-has-remarks-INVALID.xml @@ -0,0 +1,20 @@ + + + + + + Example Component 1 + + + + Example Component 2 + + + + + + + + + + diff --git a/src/validations/constraints/content/ssp-security-level-INVALID.xml b/src/validations/constraints/content/ssp-security-level-INVALID.xml index 33d9cdaef..fa4f426b4 100644 --- a/src/validations/constraints/content/ssp-security-level-INVALID.xml +++ b/src/validations/constraints/content/ssp-security-level-INVALID.xml @@ -24,4 +24,13 @@ INVALID-fips-199-moderate + + + + +

For now, this is a required field. In the future we intend to pull this information directly from FedRAMP's records based on the "leveraged-system-identifier" property's value.

+
+
+
+
\ 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 592df480c..4e2013a05 100644 --- a/src/validations/constraints/fedramp-external-allowed-values.xml +++ b/src/validations/constraints/fedramp-external-allowed-values.xml @@ -647,9 +647,10 @@ + - - + + Security Impact Level The security objective level as defined by NIST SP 800-60. diff --git a/src/validations/constraints/fedramp-external-constraints.xml b/src/validations/constraints/fedramp-external-constraints.xml index af08fea6f..af1baef6b 100644 --- a/src/validations/constraints/fedramp-external-constraints.xml +++ b/src/validations/constraints/fedramp-external-constraints.xml @@ -1,6 +1,6 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> @@ -66,7 +66,7 @@ - + Statements implimented in SSP This index includes all statements defined in a FedRAMP SSP @@ -92,12 +92,12 @@ A FedRAMP SSP MUST have each component describing leveraged systems, interconnections, or authorized services identify a "provider" role that references one responsible party. - + Additional Controls Implemented Not in Baseline - A FedRAMP SSP MUST NOT include extraneous controls outside of the FedRAMP baseline. + A FedRAMP SSP SHOULD NOT include extraneous controls outside of the FedRAMP baseline. - A FedRAMP SSP MUST NOT include extraneous controls outside of the FedRAMP baseline. Extraneous control: ({@control-id}). + A FedRAMP SSP SHOULD NOT include extraneous controls outside of the FedRAMP baseline. Extraneous control: ({@control-id}). @@ -151,7 +151,7 @@ Leveraged Authorization Has Valid Impact Level - A FedRAMP SSP MUST define the appropriate FIPS-199 impact level (low, moderate, or high) for each leveraged authorization. + The FIPS-199 impact level of the leveraged system MUST be the same or higher than the impact level of this system. Non-Provider Responsible Role References User @@ -571,10 +571,21 @@ + + + + + End of Life Date Type + + When the end-of-life-date property is present, it MUST be in date format. + + + + - + Authentication Method Has Remarks @@ -592,7 +603,7 @@ Container Image Has Checksum Property - + In a FedRAMP SSP, a component that describes a container or operating system image MUST define a checksum property. @@ -600,11 +611,21 @@ In a FedRAMP SSP, each information type property in a component MUST categorize the class of data flow as incoming to the system, outgoing from the system, or both. + + Inter-Boundary Component Has Information Type + + An inter-boundary communication component {@uuid} ({path(.)}) MUST have at least one information-type property. + Inventory Item and Component Has Public In a FedRAMP SSP, each inventory item and internal service component MUST state if they are public-facing. + + Inventory Item or Component Has Asset ID + + In a FedRAMP SSP, each inventory item and software image component MUST include the asset ID. + Leveraged Authorization Has Authorization Type @@ -648,21 +669,35 @@ - - - - - Inventory Item or Component Has Asset ID - - In a FedRAMP SSP, each inventory item and software image component MUST include the asset ID. - - - + + + + + + Authenticated Scan No Has Remarks + + A FedRAMP SSP MUST provide justification for any high or moderate impact system inventory item that does not support authenticated scans. + + + High Impact Inventory Item Has Asset Owner + + 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 Function + + Every inventory-item MUST provide remarks to describe the function of the item, either within the inventory-item itself, or within the component linked by the inventory-item. + + + Inventory Item Has Scan Type + + Every inventory-item MUST indicate one or more scan type(s), either within the inventory-item itself, or within the component linked by the inventory-item. + Inventory Item Has Valid Mac Address @@ -673,6 +708,11 @@ In a FedRAMP SSP, each inventory item MUST include the vendor name in the inventory item itself or within the linked component. + + Scan Type Has Remarks + + When scan-type is 'other' or 'not-applicable', remarks MUST be provided to explain the selection. + @@ -756,6 +796,7 @@ 'sc-1_smt.a' : 'at least one procedure that addresses System and Communications Protection MUST be associated with SC-1 part a.', 'si-1_smt.a' : 'at least one procedure that addresses System and Information Integrity MUST be associated with SI-1 part a.', 'sr-1_smt.a' : 'at least one procedure that addresses Supply Chain Risk Management MUST be associated with SR-1 part a.'}"/> + Has Policy @@ -766,6 +807,11 @@ In a FedRAMP SSP, {$procedure-messages(./@statement-id)} + + Statement Has This System Component + + In a FedRAMP SSP, each control implementation statement MUST have one "this-system" by-component. + @@ -785,17 +831,6 @@ - - - - - - Statement Has This System Component - - In a FedRAMP SSP, each control implementation statement MUST have one "this-system" by-component. - - - diff --git a/src/validations/constraints/unit-tests/authenticated-scan-no-has-remarks-FAIL.yaml b/src/validations/constraints/unit-tests/authenticated-scan-no-has-remarks-FAIL.yaml new file mode 100644 index 000000000..823a3d4ca --- /dev/null +++ b/src/validations/constraints/unit-tests/authenticated-scan-no-has-remarks-FAIL.yaml @@ -0,0 +1,9 @@ +test-case: + name: Negative Test for authenticated-scan-no-has-remarks + description: >- + This test case validates the behavior of constraint + authenticated-scan-no-has-remarks + content: ../content/ssp-authenticated-scan-no-has-remarks-INVALID.xml + expectations: + - constraint-id: authenticated-scan-no-has-remarks + result: fail diff --git a/src/validations/constraints/unit-tests/authenticated-scan-no-has-remarks-PASS.yaml b/src/validations/constraints/unit-tests/authenticated-scan-no-has-remarks-PASS.yaml new file mode 100644 index 000000000..4b917d3c5 --- /dev/null +++ b/src/validations/constraints/unit-tests/authenticated-scan-no-has-remarks-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for authenticated-scan-no-has-remarks + description: >- + This test case validates the behavior of constraint + authenticated-scan-no-has-remarks + content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + expectations: + - constraint-id: authenticated-scan-no-has-remarks + result: pass diff --git a/src/validations/constraints/unit-tests/end-of-life-date-type-FAIL.yaml b/src/validations/constraints/unit-tests/end-of-life-date-type-FAIL.yaml new file mode 100644 index 000000000..b4a27cea8 --- /dev/null +++ b/src/validations/constraints/unit-tests/end-of-life-date-type-FAIL.yaml @@ -0,0 +1,7 @@ +test-case: + name: Negative Test for end-of-life-date-type + description: This test case validates the behavior of constraint end-of-life-date-type + content: ../content/ssp-end-of-life-date-type-INVALID.xml + expectations: + - constraint-id: end-of-life-date-type + result: fail diff --git a/src/validations/constraints/unit-tests/end-of-life-date-type-PASS.yaml b/src/validations/constraints/unit-tests/end-of-life-date-type-PASS.yaml new file mode 100644 index 000000000..98d522661 --- /dev/null +++ b/src/validations/constraints/unit-tests/end-of-life-date-type-PASS.yaml @@ -0,0 +1,7 @@ +test-case: + name: Positive Test for end-of-life-date-type + description: This test case validates the behavior of constraint end-of-life-date-type + content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + expectations: + - constraint-id: end-of-life-date-type + result: pass diff --git a/src/validations/constraints/unit-tests/has-required-response-points-PASS.yaml b/src/validations/constraints/unit-tests/has-required-response-points-PASS.yaml index 719e673d1..0f80b159d 100644 --- a/src/validations/constraints/unit-tests/has-required-response-points-PASS.yaml +++ b/src/validations/constraints/unit-tests/has-required-response-points-PASS.yaml @@ -3,7 +3,9 @@ test-case: description: >- This test case validates the behavior of constraint has-required-response-points - content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + content: + - ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + - ../content/ssp-has-required-response-points-VALID.xml expectations: - constraint-id: has-required-response-points result: pass diff --git a/src/validations/constraints/unit-tests/high-impact-inventory-item-has-asset-owner-FAIL.yaml b/src/validations/constraints/unit-tests/high-impact-inventory-item-has-asset-owner-FAIL.yaml new file mode 100644 index 000000000..8fb2b3e03 --- /dev/null +++ b/src/validations/constraints/unit-tests/high-impact-inventory-item-has-asset-owner-FAIL.yaml @@ -0,0 +1,9 @@ +test-case: + name: Negative Test for high-impact-inventory-item-has-asset-owner + description: >- + This test case validates the behavior of constraint + high-impact-inventory-item-has-asset-owner + content: ../content/ssp-high-impact-inventory-item-has-asset-owner-INVALID.xml + expectations: + - constraint-id: high-impact-inventory-item-has-asset-owner + result: fail diff --git a/src/validations/constraints/unit-tests/high-impact-inventory-item-has-asset-owner-PASS.yaml b/src/validations/constraints/unit-tests/high-impact-inventory-item-has-asset-owner-PASS.yaml new file mode 100644 index 000000000..773f381ab --- /dev/null +++ b/src/validations/constraints/unit-tests/high-impact-inventory-item-has-asset-owner-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for high-impact-inventory-item-has-asset-owner + description: >- + This test case validates the behavior of constraint + high-impact-inventory-item-has-asset-owner + content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + expectations: + - constraint-id: high-impact-inventory-item-has-asset-owner + result: pass diff --git a/src/validations/constraints/unit-tests/inter-boundary-component-has-information-type-FAIL.yaml b/src/validations/constraints/unit-tests/inter-boundary-component-has-information-type-FAIL.yaml new file mode 100644 index 000000000..e148e6f8d --- /dev/null +++ b/src/validations/constraints/unit-tests/inter-boundary-component-has-information-type-FAIL.yaml @@ -0,0 +1,8 @@ +# Driver for the invalid inter-boundary-component-has-information-type constraint unit test. +test-case: + name: The invalid inter-boundary-component-has-information-type constraint unit test. + description: Test that the FedRAMP SSP inter-boundary communication component does not have the "information-type" property. + content: ../content/ssp-inter-boundary-component-has-information-type-INVALID.xml + expectations: + - constraint-id: inter-boundary-component-has-information-type + result: fail \ No newline at end of file diff --git a/src/validations/constraints/unit-tests/inter-boundary-component-has-information-type-PASS.yaml b/src/validations/constraints/unit-tests/inter-boundary-component-has-information-type-PASS.yaml new file mode 100644 index 000000000..6bb761964 --- /dev/null +++ b/src/validations/constraints/unit-tests/inter-boundary-component-has-information-type-PASS.yaml @@ -0,0 +1,8 @@ +# Driver for the valid inter-boundary-component-has-information-type constraint unit test. +test-case: + name: The valid inter-boundary-component-has-information-type constraint unit test. + description: Test that the FedRAMP SSP inter-boundary communication component has at least one "information-type" property. + content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + expectations: + - constraint-id: inter-boundary-component-has-information-type + result: pass \ No newline at end of file diff --git a/src/validations/constraints/unit-tests/inventory-item-has-function-FAIL.yaml b/src/validations/constraints/unit-tests/inventory-item-has-function-FAIL.yaml new file mode 100644 index 000000000..f29ed1250 --- /dev/null +++ b/src/validations/constraints/unit-tests/inventory-item-has-function-FAIL.yaml @@ -0,0 +1,9 @@ +test-case: + name: Negative Test for inventory-item-has-function + description: >- + This test case validates the behavior of constraint + inventory-item-has-function + content: ../content/ssp-inventory-item-has-function-INVALID.xml + expectations: + - constraint-id: inventory-item-has-function + result: fail diff --git a/src/validations/constraints/unit-tests/inventory-item-has-function-PASS.yaml b/src/validations/constraints/unit-tests/inventory-item-has-function-PASS.yaml new file mode 100644 index 000000000..50d8c2bc0 --- /dev/null +++ b/src/validations/constraints/unit-tests/inventory-item-has-function-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for inventory-item-has-function + description: >- + This test case validates the behavior of constraint + inventory-item-has-function + content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + expectations: + - constraint-id: inventory-item-has-function + result: pass diff --git a/src/validations/constraints/unit-tests/inventory-item-has-scan-type-FAIL.yaml b/src/validations/constraints/unit-tests/inventory-item-has-scan-type-FAIL.yaml new file mode 100644 index 000000000..ee3da2f1e --- /dev/null +++ b/src/validations/constraints/unit-tests/inventory-item-has-scan-type-FAIL.yaml @@ -0,0 +1,9 @@ +test-case: + name: Negative Test for inventory-item-has-scan-type + description: >- + This test case validates the behavior of constraint + inventory-item-has-scan-type + content: ../content/ssp-inventory-item-has-scan-type-INVALID.xml + expectations: + - constraint-id: inventory-item-has-scan-type + result: fail diff --git a/src/validations/constraints/unit-tests/inventory-item-has-scan-type-PASS.yaml b/src/validations/constraints/unit-tests/inventory-item-has-scan-type-PASS.yaml new file mode 100644 index 000000000..c6a340d53 --- /dev/null +++ b/src/validations/constraints/unit-tests/inventory-item-has-scan-type-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for inventory-item-has-scan-type + description: >- + This test case validates the behavior of constraint + inventory-item-has-scan-type + content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + expectations: + - constraint-id: inventory-item-has-scan-type + result: pass diff --git a/src/validations/constraints/unit-tests/scan-type-has-remarks-FAIL.yaml b/src/validations/constraints/unit-tests/scan-type-has-remarks-FAIL.yaml new file mode 100644 index 000000000..3b267403c --- /dev/null +++ b/src/validations/constraints/unit-tests/scan-type-has-remarks-FAIL.yaml @@ -0,0 +1,7 @@ +test-case: + name: Negative Test for scan-type-has-remarks + description: This test case validates the behavior of constraint scan-type-has-remarks + content: ../content/ssp-scan-type-has-remarks-INVALID.xml + expectations: + - constraint-id: scan-type-has-remarks + result: fail diff --git a/src/validations/constraints/unit-tests/scan-type-has-remarks-PASS.yaml b/src/validations/constraints/unit-tests/scan-type-has-remarks-PASS.yaml new file mode 100644 index 000000000..e1889714b --- /dev/null +++ b/src/validations/constraints/unit-tests/scan-type-has-remarks-PASS.yaml @@ -0,0 +1,7 @@ +test-case: + name: Positive Test for scan-type-has-remarks + description: This test case validates the behavior of constraint scan-type-has-remarks + content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml + expectations: + - constraint-id: scan-type-has-remarks + result: pass