Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Gabeblis <[email protected]>
  • Loading branch information
Rene2mt and Gabeblis authored Nov 21, 2024
1 parent b1995ee commit 7846255
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
14 changes: 4 additions & 10 deletions src/validations/constraints/content/ssp-all-VALID.xml
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,8 @@
<leveraged-authorization uuid="94d678fb-6d33-4eef-a17a-897bb4809487" >
<title>Name of Underlying System</title>
<!-- FedRAMP Package ID -->
<prop name="leveraged-system-identifier"
ns="https://fedramp.gov/ns/oscal"
value="F9999999999" />
<prop ns="https://fedramp.gov/ns/oscal" name="authorization-type"
value="fedramp-agency"/>
<prop name="leveraged-system-identifier" ns="https://fedramp.gov/ns/oscal" value="F9999999999" />
<prop ns="https://fedramp.gov/ns/oscal" name="authorization-type" value="fedramp-agency"/>
<prop ns="https://fedramp.gov/ns/oscal" name="impact-level" value="moderate"/>
<link href="//path/to/leveraged_system_legacy_crm.xslt" />
<link href="//path/to/leveraged_system_responsibility_and_inheritance.xml" />
Expand All @@ -284,9 +281,7 @@
<leveraged-authorization uuid="adcbafe0-f418-4fab-8e02-75b32c9eee04">
<title>Another Leveraged Authorization</title>
<!-- FedRAMP Package ID -->
<prop name="leveraged-system-identifier"
ns="https://fedramp.gov/ns/oscal"
value="F9999999777" />
<prop name="leveraged-system-identifier" ns="https://fedramp.gov/ns/oscal" value="F9999999777" />
<prop ns="https://fedramp.gov/ns/oscal" name="authorization-type"
value="fedramp-agency"/>
<prop ns="https://fedramp.gov/ns/oscal" name="impact-level" value="moderate"/>
Expand Down Expand Up @@ -318,8 +313,7 @@
<description>
<p>Briefly describe leveraged system.</p>
</description>
<prop name="leveraged-authorization-uuid"
value="94d678fb-6d33-4eef-a17a-897bb4809487" />
<prop name="leveraged-authorization-uuid" value="94d678fb-6d33-4eef-a17a-897bb4809487" />
<prop name="nature-of-agreement" ns="http://fedramp.gov/ns/oscal" value="SLA" />
<prop name="information-type" ns="http://fedramp.gov/ns/oscal" value="C.3.5.8" />
<!-- <prop name="inherited-uuid" value="11111111-0000-4000-9001-000000000001" /> -->
Expand Down
8 changes: 4 additions & 4 deletions src/validations/constraints/fedramp-external-constraints.xml
Original file line number Diff line number Diff line change
Expand Up @@ -529,22 +529,22 @@
<message>Each leveraged authorization MUST have exactly one system component. The leveraged authorization with uuid '{ $leveraged-authorization-uuid }' has { count(../component[@type='system'][prop[@name='leveraged-authorization-uuid' and @value=$leveraged-authorization-uuid]]) } "system" components.</message>
</expect>
<expect id="leveraged-authorization-has-nature-of-agreement" target="." test="count(../component[@type='system'][prop[@name='leveraged-authorization-uuid' and @value=$leveraged-authorization-uuid]]/prop[@name='nature-of-agreement' and @ns='http://fedramp.gov/ns/oscal']) = 1" level="ERROR">
<formal-name>Leveraged Authorization Has System Component</formal-name>
<formal-name>Leveraged Authorization Has Nature of Agreement</formal-name>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/4-ssp-template-to-oscal-mapping/#leveraged-fedramp-authorized-services"/>
<message>Each leveraged authorization system component MUST have exactly one nature of agreemeent property. The leveraged authorization with uuid '{ $leveraged-authorization-uuid }' has a "system" component with { count(../component[@type='system'][prop[@name='leveraged-authorization-uuid' and @value=$leveraged-authorization-uuid]]/prop[@name='nature-of-agreement' and @ns='http://fedramp.gov/ns/oscal']) } defined "nature-of-agreement" props.</message>
</expect>
<expect id="leveraged-authorization-has-information-type" target="." test="count(../component[@type='system'][prop[@name='leveraged-authorization-uuid' and @value=$leveraged-authorization-uuid]]/prop[@name='information-type' and @ns='http://fedramp.gov/ns/oscal']) gte 1" level="ERROR">
<formal-name>Leveraged Authorization Has System Component</formal-name>
<formal-name>Leveraged Authorization Has Information Type</formal-name>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/4-ssp-template-to-oscal-mapping/#leveraged-fedramp-authorized-services"/>
<message>Each leveraged authorization system component MUST have at least one information type property. The leveraged authorization with uuid '{ $leveraged-authorization-uuid }' has a "system" component with { count(../component[@type='system'][prop[@name='leveraged-authorization-uuid' and @value=$leveraged-authorization-uuid]]/prop[@name='information-type' and @ns='http://fedramp.gov/ns/oscal']) } defined "informatin-type" props.</message>
</expect>
<expect id="leveraged-authorization-has-implementation-point" target="." test="count(../component[@type='system'][prop[@name='leveraged-authorization-uuid' and @value=$leveraged-authorization-uuid]]/prop[@name='implementation-point' and @value='external']) = 1" level="ERROR">
<formal-name>Leveraged Authorization Has System Component</formal-name>
<formal-name>Leveraged Authorization Has Implementation Point</formal-name>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/4-ssp-template-to-oscal-mapping/#leveraged-fedramp-authorized-services"/>
<message>Each leveraged authorization system component MUST have exactly one implementation point property. The leveraged authorization with uuid '{ $leveraged-authorization-uuid }' has a "system" component with { count(../component[@type='system'][prop[@name='leveraged-authorization-uuid' and @value=$leveraged-authorization-uuid]]/prop[@name='implementation-point' and @value='external']) } defined "implementation-point" props.</message>
</expect>
<expect id="leveraged-authorization-has-authorized-users" target="." test="count(../component[@type='system'][prop[@name='leveraged-authorization-uuid' and @value=$leveraged-authorization-uuid]]/responsible-role/@role-id) gte 1" level="WARNING">
<formal-name>Leveraged Authorization Has System Component</formal-name>
<formal-name>Leveraged Authorization Has Authorized Users</formal-name>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/4-ssp-template-to-oscal-mapping/#leveraged-fedramp-authorized-services"/>
<message>Each leveraged authorization system component SHOULD have at least one role for authorized users. The leveraged authorization with uuid '{ $leveraged-authorization-uuid }' has a "system" component with { count(../component[@type='system'][prop[@name='leveraged-authorization-uuid' and @value=$leveraged-authorization-uuid]]/responsible-role/@role-id) } roles specified.</message>
</expect>
Expand Down

0 comments on commit 7846255

Please sign in to comment.