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

Add inventory-item-has-vendor-name constraint #1037

Merged
merged 1 commit into from
Dec 30, 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 @@ -115,6 +115,7 @@ Examples:
| interconnection-direction |
| interconnection-security |
| inventory-item-allows-authenticated-scan |
| inventory-item-has-vendor-name |
| inventory-item-public |
| inventory-item-virtual |
| leveraged-authorization-has-authorization-type |
Expand Down Expand Up @@ -354,6 +355,8 @@ Examples:
| interconnection-security-PASS.yaml |
| inventory-item-allows-authenticated-scan-FAIL.yaml |
| inventory-item-allows-authenticated-scan-PASS.yaml |
| inventory-item-has-vendor-name-FAIL.yaml |
| inventory-item-has-vendor-name-PASS.yaml |
| inventory-item-public-FAIL.yaml |
| inventory-item-public-PASS.yaml |
| inventory-item-virtual-FAIL.yaml |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2267,6 +2267,7 @@ approved.</p>
<prop name="vlan-id" value="VLAN Identifier"/>
<prop name="network-id" value="Network Identifier"/>
<prop ns="http://fedramp.gov/ns/oscal" name="scan-type" value="infrastructure"/>
<prop ns="http://fedramp.gov/ns/oscal" name="vendor-name" value="Vendor"/>
<!-- <prop ns="http://fedramp.gov/ns/oscal" name="scan-type" value="database"/>-->
<prop name="allows-authenticated-scan" value="no">
<remarks>
Expand Down Expand Up @@ -2322,6 +2323,7 @@ preferable to the link[rel='validation'] example above.</p>
<!-- <prop name="patch-level" value="Patch-Level"/> -->
<prop name="baseline-configuration-name" value="Baseline Configuration Name"/>
<prop name="physical-location" value="Physical location of Asset"/>
<prop ns="http://fedramp.gov/ns/oscal" name="vendor-name" value="Vendor"/>
<prop name="allows-authenticated-scan" value="no">
<remarks>
<p>If no, explain why. If yes, omit remark.</p>
Expand Down Expand Up @@ -2353,6 +2355,7 @@ preferable to the link[rel='validation'] example above.</p>
<!-- Todo: check why schematron validation is indicating that this is not a valid ipv4 value -->
<prop name="ipv6-address" value="0000:0000:0000:0000:0000:ffff:0a03:0303"/>
<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-009000000008"/>
</inventory-item>
Expand All @@ -2367,6 +2370,7 @@ preferable to the link[rel='validation'] example above.</p>
<prop name="ipv4-address" value="10.4.4.4"/>
<prop name="ipv6-address" value="0000:0000:0000:0000:0000:ffff:0a04:0404"/>
<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"/>
</inventory-item>
Expand All @@ -2381,6 +2385,7 @@ preferable to the link[rel='validation'] example above.</p>
<prop name="virtual" value="no"/>
<prop name="public" value="yes"/>
<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-009000000011"/>
</inventory-item>
Expand All @@ -2394,6 +2399,7 @@ preferable to the link[rel='validation'] example above.</p>
<prop name="asset-type" value="router"/>
<prop name="virtual" value="no"/>
<prop name="public" value="no"/>
<prop ns="http://fedramp.gov/ns/oscal" name="vendor-name" value="Vendor"/>
<prop name="is-scanned" value="no">
<remarks>
<p>Asset wasn't running at time of scan.</p>
Expand All @@ -2412,6 +2418,7 @@ preferable to the link[rel='validation'] example above.</p>
<prop name="virtual" value="no"/>
<prop name="public" value="no"/>
<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-009000000008"/>
</inventory-item>
Expand All @@ -2425,6 +2432,7 @@ preferable to the link[rel='validation'] example above.</p>
<prop name="ipv6-address" value="0000:0000:0000:0000:0000:ffff:0a08:0808"/>
<prop name="virtual" value="yes"/>
<prop name="public" value="no"/>
<prop ns="http://fedramp.gov/ns/oscal" name="vendor-name" value="Vendor"/>
<prop name="is-scanned" value="no">
<remarks>
<p>Asset wasn't running at time of scan.</p>
Expand All @@ -2443,6 +2451,7 @@ preferable to the link[rel='validation'] example above.</p>
<prop name="virtual" value="yes"/>
<prop name="public" value="no"/>
<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-009000000018"/>
</inventory-item>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" uuid="11111111-2222-4000-8000-000000000000">
<system-implementation>
<component uuid="11111111-2222-4000-8000-009000000007" type="process-procedure">
<!-- <prop ns="http://fedramp.gov/ns/oscal" name="vendor-name" value="Vendor"/> Missing software-name in linked component-->
</component>
<inventory-item uuid="11111111-2222-4000-8000-011000000001">
<!-- <prop ns="http://fedramp.gov/ns/oscal" name="vendor-name" value="Vendor"/> Missing software-name in inventory-item.-->
<implemented-component component-uuid="11111111-2222-4000-8000-009000000007">
</implemented-component>
</inventory-item>
</system-implementation>
</system-security-plan>
12 changes: 12 additions & 0 deletions src/validations/constraints/fedramp-external-constraints.xml
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,18 @@
</constraints>
</context>

<context>
<metapath target="/system-security-plan/system-implementation/inventory-item"/>
<constraints>
<let var ="component-uuid" expression="implemented-component/@component-uuid"/>
<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"/>
<message>In a FedRAMP SSP, each inventory item MUST include the vendor name in the inventory item itself or within the linked component.</message>
</expect>
</constraints>
</context>

<context>
<metapath target="/(assessment-plan|assessment-results|plan-of-action-and-milestones|system-security-plan)/metadata"/>
<constraints>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Negative Test for inventory-item-has-vendor-name
description: >-
This test case validates the behavior of constraint
inventory-item-has-vendor-name
content: ../content/ssp-inventory-item-has-vendor-name-INVALID.xml
expectations:
- constraint-id: inventory-item-has-vendor-name
result: fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Positive Test for inventory-item-has-vendor-name
description: >-
This test case validates the behavior of constraint
inventory-item-has-vendor-name
content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml
expectations:
- constraint-id: inventory-item-has-vendor-name
result: pass
Loading