Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/party name #878

Merged
merged 14 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions features/fedramp_extensions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ Examples:
| inventory-item-virtual-PASS.yaml |
| missing-response-components-FAIL.yaml |
| missing-response-components-PASS.yaml |
| party-has-name-FAIL.yaml |
| party-has-name-PASS.yaml |
| privilege-level-FAIL.yaml |
| privilege-level-PASS.yaml |
| resource-has-base64-or-rlink-FAIL.yaml |
Expand Down Expand Up @@ -279,6 +281,7 @@ Examples:
| inventory-item-public |
| inventory-item-virtual |
| missing-response-components |
| party-has-name |
| privilege-level |
| prop-response-point-has-cardinality-one |
| resource-has-base64-or-rlink |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
uuid="12345678-1234-4321-8765-123456789012">
<metadata>
<title>Enhanced Example System Security Plan</title>
<published>2024-08-01T14:30:00Z</published>
<last-modified>2024-08-01T14:30:00Z</last-modified>
<version>1.1</version>
<oscal-version>1.1.2</oscal-version>
<document-id scheme="https://example.com/identifiers">SSP-2024-002</document-id>
<party uuid="11111111-0000-4000-9000-000000000001" type="organization">
<short-name>ExOrg</short-name>
<link rel="website" href="https://example.com"/>
</party>
<party uuid="22222222-0000-4000-9000-000000000002" type="person">
<email-address>jane.doe@example.com</email-address>
<address type="work" />
</party>
</metadata>
</system-security-plan>
12 changes: 11 additions & 1 deletion src/validations/constraints/fedramp-external-constraints.xml
Original file line number Diff line number Diff line change
Expand Up @@ -417,5 +417,15 @@
</expect>
</constraints>
</context>

<context>
<metapath target="/(assessment-plan|assessment-results|plan-of-action-and-milestones|system-security-plan)/metadata/party"/>
<constraints>
<expect id="party-has-name" target="." test="exists(name)" level="ERROR">
<formal-name>Party Has a Name</formal-name>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/general-concepts/oscal-metadata/#working-with-party-assemblies"/>
<message>Every FedRAMP document MUST define a party with a name.</message>
</expect>
</constraints>
</context>

</metaschema-meta-constraints>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test-case:
name: Negative Test for party-has-name
description: This test case validates the behavior of constraint party-has-name
content: ../content/ssp-party-has-name-INVALID.xml
expectations:
- constraint-id: party-has-name
result: fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test-case:
name: Positive Test for party-has-name
description: This test case validates the behavior of constraint party-has-name
content: ../content/ssp-all-VALID.xml
expectations:
- constraint-id: party-has-name
result: pass
2 changes: 1 addition & 1 deletion src/validations/module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ REV5_TEMPLATES = ./dist/content/rev5/templates
init-validations:
@echo "Installing node modules..."
npm install
$(OSCAL_CLI) use 2.2.0
$(OSCAL_CLI) use latest
$(OSCAL_CLI) server update

# Style lint
Expand Down
Loading