-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add constraint 'component-responsible-role-references-party' and tests
- Loading branch information
Showing
6 changed files
with
65 additions
and
3 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
23 changes: 23 additions & 0 deletions
23
...lidations/constraints/content/ssp-component-responsible-role-references-party-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,23 @@ | ||
<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> | ||
<!-- There are two parties with the same uuid. The count should be 1. --> | ||
<party uuid="11111111-0000-4000-9000-000000000001" type="organization"> | ||
<name>Example Organization</name> | ||
<short-name>ExOrg</short-name> | ||
<link rel="website" href="https://example.com"/> | ||
</party> | ||
<party uuid="11111111-0000-4000-9000-000000000001" type="organization"> | ||
<name>Example Organization</name> | ||
<short-name>ExOrg</short-name> | ||
<link rel="website" href="https://example.com"/> | ||
</party> | ||
</metadata> | ||
<system-implementation> | ||
<component uuid="6ac88fd2-7c7b-4357-af2e-f22ccd3ead26" type="system"> | ||
<prop name="leveraged-authorization-uuid" value="233e0f09-fe5e-47e2-bca3-5f32df75e57a"/> | ||
<responsible-role role-id="provider"> | ||
<party-uuid>11111111-0000-4000-9000-000000000001</party-uuid> | ||
</responsible-role> | ||
</component> | ||
</system-implementation> | ||
</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
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/component-responsible-role-references-party-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,9 @@ | ||
test-case: | ||
name: Negative Test for component-responsible-role-references-party | ||
description: >- | ||
This test case validates the behavior of constraint | ||
component-responsible-role-references-party | ||
content: ../content/ssp-component-responsible-role-references-party-INVALID.xml | ||
expectations: | ||
- constraint-id: component-responsible-role-references-party | ||
result: fail |
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/component-responsible-role-references-party-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 component-responsible-role-references-party | ||
description: >- | ||
This test case validates the behavior of constraint | ||
component-responsible-role-references-party | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: component-responsible-role-references-party | ||
result: pass |