forked from GSA/fedramp-automation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add oscal and FR version constraint for GSA#833
- Loading branch information
1 parent
c3db2b2
commit 871da38
Showing
9 changed files
with
217 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/content/ssp-oscal-version-matches-fedramp-version-INVALID-1.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://csrc.nist.gov/ns/oscal/1.0 https://github.com/usnistgov/OSCAL/releases/download/v1.1.2/oscal_ssp_schema.xsd" | ||
uuid="12345678-1234-4321-8765-123456789012"> | ||
<metadata> | ||
<oscal-version>1.0.4</oscal-version> | ||
<prop name="fedramp-version" ns="https://fedramp.gov/ns/oscal" value="3.0.0-rc1"/> | ||
</metadata> | ||
</system-security-plan> |
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/content/ssp-oscal-version-matches-fedramp-version-INVALID-2.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://csrc.nist.gov/ns/oscal/1.0 https://github.com/usnistgov/OSCAL/releases/download/v1.1.2/oscal_ssp_schema.xsd" | ||
uuid="12345678-1234-4321-8765-123456789012"> | ||
<metadata> | ||
<oscal-version>2.0.0</oscal-version> | ||
<prop name="fedramp-version" ns="https://fedramp.gov/ns/oscal" value="3.0.0-rc1"/> | ||
</metadata> | ||
</system-security-plan> |
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/content/ssp-oscal-version-matches-fedramp-version-INVALID-3.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://csrc.nist.gov/ns/oscal/1.0 https://github.com/usnistgov/OSCAL/releases/download/v1.1.2/oscal_ssp_schema.xsd" | ||
uuid="12345678-1234-4321-8765-123456789012"> | ||
<metadata> | ||
<oscal-version>1.0.4</oscal-version> | ||
<!-- prop[@name="fedramp-version"] is missing, so we have to test falling through to default version--> | ||
</metadata> | ||
</system-security-plan> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/validations/constraints/unit-tests/oscal-version-matches-fedramp-version-FAIL.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
test-case: | ||
name: Positive Test for import-profile-has-available-document | ||
description: >- | ||
This test case validates the behavior of constraint import-profile-has-available-document. | ||
Scenario 1 tests: an invalid match below the minimum required version threshold. | ||
Scenario 2 tests: an invalid match above the implied maximum required version threshold, a major version greater than required. | ||
Scenario 3 tests: an invalid match because the fedramp-version prop is missing, so a fallthrough default is required. | ||
content: | ||
- ../content/ssp-oscal-version-matches-fedramp-version-INVALID-1.xml | ||
- ../content/ssp-oscal-version-matches-fedramp-version-INVALID-2.xml | ||
- ../content/ssp-oscal-version-matches-fedramp-version-INVALID-3.xml | ||
expectations: | ||
- constraint-id: oscal-version-matches-fedramp-version | ||
result: fail |
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/oscal-version-matches-fedramp-version-PASS.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |