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

Addresses port range implementation error and constraints issue #2023 #2033

Closed
wants to merge 2 commits into from
Closed
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ vault
/OSCAL-dev.xpr
.vscode
.DS_Store
.history

# Working files
scratch
Expand Down
13 changes: 12 additions & 1 deletion src/metaschema/oscal_implementation-common_metaschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
</constraint>
</define-flag>
<!-- Added Contraints as Warnings -->
<constraint>
<!-- 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>
Expand All @@ -318,6 +318,17 @@
<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 -->
<constraint>
<expect level="WARNING" target="." test="exists(@start)" id="port-range-has-start">
<message>A port range should have a start port given.</message>
</expect>
<expect level="WARNING" target="." test="exists(@end)" id="port-range-has-end">
<message>A port range should have an end port given. To define a single port, the start and end should be the same value.</message>
</expect>
<expect level="WARNING" target="." test="not(@start > @end)" id="port-range-starts-before-ends">
<message>The port range start should not be after its end.</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>
Expand Down