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

Require (Warn) port start and end when protocol is specified. #1674

Merged
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
15 changes: 15 additions & 0 deletions src/metaschema/oscal_implementation-common_metaschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,21 @@
</allowed-values>
</constraint>
</define-flag>
<!-- Added Contraints as Warnings -->
<constraint>
<expect level="WARNING" id="port-range-start-and-end-not-specified" target="." test="exists(@start) and exists(@end)">
<message>If a protocol is defined, it should include a start and end port range. To define a single port, the start and end should be the same value.</message>
</expect>
<expect level="WARNING" id="port-range-start-specified-with-no-end" target="." test="exists(@start) and not(exists(@end))">
<message>A start port exists, but an end point does not. To define a single port, the start and end should be the same value.</message>
</expect>
<expect level="WARNING" id="port-range-end-specified-with-no-start" target="." test="not(exists(@start)) and exists(@end)">
<message>An end point exists, but a start port does not. To define a single port, the start and end should be the same value.</message>
</expect>
<expect level="WARNING" id="port-range-end-date-is-before-start-date" target="." test="@start &lt;= @end">
<message>The port range specified has an end port that is less than the start port.</message>
</expect>
</constraint>
<remarks>
<p>To be validated as a natural number (integer &gt;= 1). A single port uses the same value for start and end. Use multiple 'port-range' entries for non-contiguous ranges.</p>
</remarks>
Expand Down