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 component-has-used-by-link constraint #970

Merged
merged 5 commits into from
Dec 6, 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 @@ -37,6 +37,7 @@ Examples:
| component-has-authentication-method |
| component-has-non-provider-responsible-role |
| component-has-provider-responsible-role |
| component-has-used-by-link |
| component-type |
| control-implementation-status |
| data-center-alternate |
Expand Down Expand Up @@ -183,6 +184,8 @@ Examples:
| component-has-authentication-method-PASS.yaml |
| component-has-non-provider-responsible-role-FAIL.yaml |
| component-has-non-provider-responsible-role-PASS.yaml |
| component-has-used-by-link-FAIL.yaml |
| component-has-used-by-link-PASS.yaml |
| component-responsible-role-references-party-FAIL.yaml |
| component-responsible-role-references-party-PASS.yaml |
| component-type-FAIL.yaml |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,7 @@
</prop>

<prop name="inherited-uuid" value="22222222-0000-4000-9001-009000000001" />
<link rel="used-by" href="#11111111-2222-4000-8000-009000000000"/>

<status state="operational"/>

Expand Down Expand Up @@ -1425,6 +1426,7 @@
</remarks>
</prop>
<link rel="provided-by" href="#11111111-2222-4000-8000-009000100003" />
<link rel="used-by" href="#11111111-2222-4000-8000-009000000000"/>
<status state="operational"/>

<responsible-role role-id="leveraged-authorization-users">
Expand Down Expand Up @@ -1525,6 +1527,7 @@

<!-- <link href="11111111-2222-4000-8000-009000000000" rel="used-by"/> -->
<link rel="api" href="https://api.example.com/v1" />
<link rel="used-by" href="#11111111-2222-4000-8000-009000000000"/>
<status state="operational"/>
<responsible-role role-id="provider">
<party-uuid>11111111-2222-4000-8000-004000000018</party-uuid>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<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-009000200001" type="service">
<!-- <link rel="used-by" href="#11111111-2222-4000-8000-009000000000"/> Missing at least one used-by link -->
<protocol name="ftp" uuid="11111111-2222-4000-8000-010000000001">
<title>Incoming FTP Service</title>
<port-range start="21" end="21" transport="TCP"/>
</protocol>
</component>
</system-implementation>
</system-security-plan>
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,11 @@
<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>A FedRAMP SSP with service components and CLI software components performing cross-boundary network communication MUST indicate exactly one time if the point of implementation is internal or external to the system.</message>
</expect>
<expect id="component-has-used-by-link" target="component[protocol]" test="count(link[@rel='used-by']) >= 1" level="ERROR">
<formal-name>Component Has Used-By Link</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/#ports-protocols-and-services"/>
<message>A FedRAMP SSP's component MUST identify which other components use it via network communication. Component "{ @uuid }" exposes ports for other components to connect, but does not identify which components use it.</message>
</expect>
<is-unique id="unique-inventory-item-asset-id" target="inventory-item/prop[@name='asset-id']">
<formal-name>Unique Asset Identifier</formal-name>
<description>Ensure each inventory item has a unique asset-id property.</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Negative Test for component-has-used-by-link
description: >-
This test case validates the behavior of constraint
component-has-used-by-link
content: ../content/ssp-component-has-used-by-link-INVALID.xml
expectations:
- constraint-id: component-has-used-by-link
result: fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Positive Test for component-has-used-by-link
description: >-
This test case validates the behavior of constraint
component-has-used-by-link
content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml
expectations:
- constraint-id: component-has-used-by-link
result: pass
Loading