-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added system-characteristics data-flow constraints and tests (#724)
- Loading branch information
Showing
30 changed files
with
258 additions
and
0 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
4 changes: 4 additions & 0 deletions
4
src/validations/constraints/content/ssp-has-data-flow-INVALID.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,4 @@ | ||
<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"> | ||
<system-characteristics> | ||
</system-characteristics> | ||
</system-security-plan> |
6 changes: 6 additions & 0 deletions
6
src/validations/constraints/content/ssp-has-data-flow-description-INVALID.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,6 @@ | ||
<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"> | ||
<system-characteristics> | ||
<data-flow> | ||
</data-flow> | ||
</system-characteristics> | ||
</system-security-plan> |
6 changes: 6 additions & 0 deletions
6
src/validations/constraints/content/ssp-has-data-flow-diagram-INVALID.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,6 @@ | ||
<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"> | ||
<system-characteristics> | ||
<data-flow> | ||
</data-flow> | ||
</system-characteristics> | ||
</system-security-plan> |
8 changes: 8 additions & 0 deletions
8
src/validations/constraints/content/ssp-has-data-flow-diagram-caption-INVALID.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,8 @@ | ||
<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"> | ||
<system-characteristics> | ||
<data-flow> | ||
<diagram> | ||
</diagram> | ||
</data-flow> | ||
</system-characteristics> | ||
</system-security-plan> |
8 changes: 8 additions & 0 deletions
8
src/validations/constraints/content/ssp-has-data-flow-diagram-description-INVALID.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,8 @@ | ||
<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"> | ||
<system-characteristics> | ||
<data-flow> | ||
<diagram> | ||
</diagram> | ||
</data-flow> | ||
</system-characteristics> | ||
</system-security-plan> |
8 changes: 8 additions & 0 deletions
8
src/validations/constraints/content/ssp-has-data-flow-diagram-link-INVALID.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,8 @@ | ||
<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"> | ||
<system-characteristics> | ||
<data-flow> | ||
<diagram> | ||
</diagram> | ||
</data-flow> | ||
</system-characteristics> | ||
</system-security-plan> |
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/content/ssp-has-data-flow-diagram-link-rel-INVALID.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"> | ||
<system-characteristics> | ||
<data-flow> | ||
<diagram> | ||
<link href="#ac5d7535-f3b8-45d3-bf3b-735c82c64547"/> | ||
</diagram> | ||
</data-flow> | ||
</system-characteristics> | ||
</system-security-plan> |
9 changes: 9 additions & 0 deletions
9
...idations/constraints/content/ssp-has-data-flow-diagram-link-rel-allowed-value-INVALID.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"> | ||
<system-characteristics> | ||
<data-flow> | ||
<diagram> | ||
<link href="#ac5d7535-f3b8-45d3-bf3b-735c82c64547" rel="not-diagram"/> | ||
</diagram> | ||
</data-flow> | ||
</system-characteristics> | ||
</system-security-plan> |
8 changes: 8 additions & 0 deletions
8
src/validations/constraints/content/ssp-has-data-flow-diagram-uuid-INVALID.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,8 @@ | ||
<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"> | ||
<system-characteristics> | ||
<data-flow> | ||
<diagram> | ||
</diagram> | ||
</data-flow> | ||
</system-characteristics> | ||
</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
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-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,7 @@ | ||
test-case: | ||
name: Negative Test for has-data-flow | ||
description: Test that system-characteristics does not have a data-flow element. | ||
content: ../content/ssp-has-data-flow-INVALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-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,7 @@ | ||
test-case: | ||
name: Positive Test for has-data-flow | ||
description: Test that system-characteristics has a data-flow element. | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow | ||
result: pass |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-description-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,7 @@ | ||
test-case: | ||
name: Negative Test for has-data-flow-description | ||
description: Test that data-flow does not have a description. | ||
content: ../content/ssp-has-data-flow-description-INVALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-description | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-description-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,7 @@ | ||
test-case: | ||
name: Positive Test for has-data-flow-description | ||
description: Test that data-flow does not have a description. | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-description | ||
result: pass |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-diagram-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,7 @@ | ||
test-case: | ||
name: Negative Test for has-data-flow-diagram | ||
description: Test that data-flow does not have a diagram. | ||
content: ../content/ssp-has-data-flow-diagram-INVALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-diagram-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,7 @@ | ||
test-case: | ||
name: Positive Test for has-data-flow-diagram | ||
description: Test that data-flow has a diagram. | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram | ||
result: pass |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-diagram-caption-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,7 @@ | ||
test-case: | ||
name: Negative Test for has-data-flow-diagram-caption | ||
description: Test that data-flow diagram does not have a caption. | ||
content: ../content/ssp-has-data-flow-diagram-caption-INVALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram-caption | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-diagram-caption-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,7 @@ | ||
test-case: | ||
name: Positive Test for has-data-flow-diagram-caption | ||
description: Test that data-flow diagram has a caption. | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram-caption | ||
result: pass |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-diagram-description-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,7 @@ | ||
test-case: | ||
name: Negative Test for has-data-flow-diagram-description | ||
description: Test that data-flow diagram does not have a description. | ||
content: ../content/ssp-has-data-flow-diagram-description-INVALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram-description | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-diagram-description-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,7 @@ | ||
test-case: | ||
name: Positive Test for has-data-flow-diagram-description | ||
description: Test that data-flow diagram has a description. | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram-description | ||
result: pass |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-diagram-link-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,7 @@ | ||
test-case: | ||
name: Negative Test for has-data-flow-diagram-link | ||
description: Test that data-flow diagram does not have a link. | ||
content: ../content/ssp-has-data-flow-diagram-link-INVALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram-link | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-diagram-link-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,7 @@ | ||
test-case: | ||
name: Positive Test for has-data-flow-diagram-link | ||
description: Test that data-flow diagram has a link. | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram-link | ||
result: pass |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-diagram-link-rel-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,7 @@ | ||
test-case: | ||
name: Negative Test for has-data-flow-diagram-link-rel | ||
description: Test that data-flow diagram link does not have a rel attribute. | ||
content: ../content/ssp-has-data-flow-diagram-link-rel-INVALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram-link-rel | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-diagram-link-rel-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,7 @@ | ||
test-case: | ||
name: Positive Test for has-data-flow-diagram-link-rel | ||
description: Test that data-flow diagram link has a rel attribute. | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram-link-rel | ||
result: pass |
7 changes: 7 additions & 0 deletions
7
...validations/constraints/unit-tests/has-data-flow-diagram-link-rel-allowed-value-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,7 @@ | ||
test-case: | ||
name: Negative Test for has-data-flow-diagram-link-rel-allowed-value | ||
description: Test that data-flow diagram link rel attribute does not equal "diagram". | ||
content: ../content/ssp-has-data-flow-diagram-link-rel-allowed-value-INVALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram-link-rel-allowed-value | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
...validations/constraints/unit-tests/has-data-flow-diagram-link-rel-allowed-value-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,7 @@ | ||
test-case: | ||
name: Positive Test for has-data-flow-diagram-link-rel-allowed-value | ||
description: Test that data-flow diagram link rel attribute equals "diagram". | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram-link-rel-allowed-value | ||
result: pass |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-diagram-uuid-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,7 @@ | ||
test-case: | ||
name: Negative Test for has-data-flow-diagram-uuid | ||
description: Test that data-flow diagram does not have a uuid attribute. | ||
content: ../content/ssp-has-data-flow-diagram-uuid-INVALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram-uuid | ||
result: fail |
7 changes: 7 additions & 0 deletions
7
src/validations/constraints/unit-tests/has-data-flow-diagram-uuid-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,7 @@ | ||
test-case: | ||
name: Positive Test for has-data-flow-diagram-uuid | ||
description: Test that data-flow diagram has a uuid attribute. | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: has-data-flow-diagram-uuid | ||
result: pass |