Skip to content

Commit

Permalink
get canary
Browse files Browse the repository at this point in the history
  • Loading branch information
wandmagic committed Jan 13, 2025
2 parents 78330f4 + 719cf2c commit 0a4ca0a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
10 changes: 4 additions & 6 deletions features/fedramp_extensions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Examples:
| component-has-used-by-link |
| component-type |
| connection-security |
| connection-security |
| control-implementation-status |
| data-center-alternate |
| data-center-count |
Expand Down Expand Up @@ -123,6 +124,9 @@ Examples:
| interconnection-security |
| inventory-item-allows-authenticated-scan |
| inventory-item-and-component-has-public |
| inventory-item-has-software-name |
| inventory-item-has-software-version |
| inventory-item-has-valid-mac-address |
| inventory-item-has-vendor-name |
| inventory-item-or-component-has-asset-id |
| inventory-item-public |
Expand Down Expand Up @@ -356,8 +360,6 @@ Examples:
| has-system-name-short-PASS.yaml |
| has-user-guide-FAIL.yaml |
| has-user-guide-PASS.yaml |
| high-impact-inventory-item-has-asset-owner-FAIL.yaml |
| high-impact-inventory-item-has-asset-owner-PASS.yaml |
| image-has-checksum-FAIL.yaml |
| image-has-checksum-PASS.yaml |
| implementation-status-has-remarks-FAIL.yaml |
Expand Down Expand Up @@ -392,10 +394,6 @@ Examples:
| inventory-item-allows-authenticated-scan-PASS.yaml |
| inventory-item-and-component-has-public-FAIL.yaml |
| inventory-item-and-component-has-public-PASS.yaml |
| inventory-item-has-function-FAIL.yaml |
| inventory-item-has-function-PASS.yaml |
| inventory-item-has-scan-type-FAIL.yaml |
| inventory-item-has-scan-type-PASS.yaml |
| inventory-item-has-software-name-FAIL.yaml |
| inventory-item-has-software-name-PASS.yaml |
| inventory-item-has-software-version-FAIL.yaml |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1674,9 +1674,7 @@ property.</p>
<p>Describe the virtual appliance and what it is used for.</p>
</description>
<prop name="implementation-point" value="internal"/>
<prop name='function' value='virtual'><remarks><p>virtual function</p></remarks></prop>
<status state="operational"/>

</component>

<!-- Hardware Component -->
Expand Down Expand Up @@ -2445,7 +2443,7 @@ approved.</p>
<prop name="is-scanned" value="yes"/>
<prop ns="http://fedramp.gov/ns/oscal" name="vendor-name" value="Vendor"/>
<prop ns="http://fedramp.gov/ns/oscal" name="scan-type" value="infrastructure"/>
<implemented-component component-uuid="11111111-2222-4000-8000-009000000007"/>
<implemented-component component-uuid="11111111-2222-4000-8000-009000500006"/>
</inventory-item>
<inventory-item uuid="11111111-2222-4000-8000-011000000005">
<description>
Expand Down Expand Up @@ -2484,7 +2482,7 @@ approved.</p>
<p>Asset wasn't running at time of scan.</p>
</remarks>
</prop>
<implemented-component component-uuid="11111111-2222-4000-8000-009000000007"/>
<implemented-component component-uuid="11111111-2222-4000-8000-009000500007"/>
</inventory-item>
<inventory-item uuid="11111111-2222-4000-8000-011000000007">
<description>
Expand Down Expand Up @@ -2522,7 +2520,7 @@ approved.</p>
<p>Asset wasn't running at time of scan.</p>
</remarks>
</prop>
<implemented-component component-uuid="11111111-2222-4000-8000-009000000007"/>
<implemented-component component-uuid="11111111-2222-4000-8000-009000500005"/>
</inventory-item>
<inventory-item uuid="11111111-2222-4000-8000-011000000009">
<description>
Expand Down
27 changes: 26 additions & 1 deletion src/validations/constraints/fedramp-external-constraints.xml
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@
</expect>
<expect id="image-has-checksum" target="//component[@type='software' and ./prop[@name='asset-type' and @value='image']]" test="count(./prop[@name='checksum' and @ns='http://fedramp.gov/ns/oscal']) = 1" level="ERROR">
<formal-name>Container Image Has Checksum Property</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"/>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="insert-help-url-here"/>
<message>In a FedRAMP SSP, a component that describes a container or operating system image MUST define a checksum property.</message>
</expect>
<expect id="information-type-has-class" target="component/prop[@name='information-type' and @ns='http://fedramp.gov/ns/oscal']" test="exists(@class)" level="ERROR">
Expand Down Expand Up @@ -729,16 +729,41 @@
<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/#ports-protocols-and-services"/>
<message>A FedRAMP SSP's component MUST reference the existing component(s) that use it via network communication. However, component "{../@uuid}" references a nonexistent component "{@href}".</message>
</expect>

</constraints>
</context>

<context>
<metapath target="/system-security-plan/system-implementation"/>
<constraints>
<expect id="inventory-item-or-component-has-asset-id" target="(inventory-item)| (component[@type='software' and prop[@name='asset-type' and @value='image']])" test="count(prop[@name='asset-id']) = 1" level="ERROR">
<formal-name>Inventory Item or Component Has Asset ID</formal-name>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/5-attachments/#system-inventory-approach"/>
<message>In a FedRAMP SSP, each inventory item and software image component MUST include the asset ID.</message>
</expect>
</constraints>
</context>

<context>
<metapath target="/system-security-plan/system-implementation/inventory-item"/>
<constraints>
<let var="high-sensitivity" expression="../../system-characteristics/security-sensitivity-level='fips-199-high'"/>
<let var="moderate-sensitivity" expression="../../system-characteristics/security-sensitivity-level='fips-199-moderate'"/>
<let var ="component-uuid" expression="implemented-component/@component-uuid"/>
<expect id="inventory-item-has-software-name" target=".[prop[@name='asset-type' and @value=('operating-system', 'container', 'image')] or ../component[uuid=$component-uuid and type='software']]" test="count(prop[@name=('software-name', 'os-name')]) = 1 or count(../component[@uuid=$component-uuid]/prop[@name=('software-name', 'os-name')]) = 1" level="ERROR">
<formal-name>Inventory Item Has Software Name</formal-name>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/5-attachments/#system-inventory-approach"/>
<message>In a FedRAMP SSP, each inventory item MUST include the software name in the inventory item itself or within the linked component.</message>
<expect id="inventory-item-has-software-version" target=".[prop[@name='asset-type' and @value=('operating-system', 'container', 'image')] or ../component[uuid=$component-uuid and type='software']]" test="count(prop[@name=('software-version', 'os-version')]) = 1 or count(../component[@uuid=$component-uuid]/prop[@name=('software-version', 'os-version')]) = 1" level="ERROR">
<formal-name>Inventory Item Has Software Version</formal-name>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/5-attachments/#system-inventory-approach"/>
<message>In a FedRAMP SSP, each inventory item MUST include the software version in the inventory item itself or within the linked component.</message>
</expect>
<expect id="inventory-item-has-valid-mac-address" target=".[prop[@name='mac-address']]/prop[@name='mac-address']" test="matches(@value, '^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})|([0-9a-fA-F]{4}\\.[0-9a-fA-F]{4}\\.[0-9a-fA-F]{4})$')" level="ERROR">
<formal-name>Inventory Item Has Valid Mac Address</formal-name>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/5-attachments/#system-inventory-approach"/>
<message>In a FedRAMP SSP, each inventory item that has a MAC address MUST format the MAC address correctly.</message>
</expect>
<expect id="inventory-item-has-vendor-name" target="." test="count(prop[@name='vendor-name' and @ns='http://fedramp.gov/ns/oscal']) >= 1 or count(../component[@uuid=$component-uuid]/prop[@name='vendor-name' and @ns='http://fedramp.gov/ns/oscal']) >= 1" level="ERROR">
<formal-name>Inventory Item Has Vendor Name</formal-name>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/5-attachments/#system-inventory-approach"/>
Expand Down

0 comments on commit 0a4ca0a

Please sign in to comment.