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

Error with port range definition in Component-def #2023

Open
RS-Credentive opened this issue Jun 15, 2024 · 2 comments
Open

Error with port range definition in Component-def #2023

RS-Credentive opened this issue Jun 15, 2024 · 2 comments
Assignees
Labels

Comments

@RS-Credentive
Copy link
Contributor

Describe the bug

If a component definition has a port range with a start and end, eg:

                        "port-ranges": [
                            {
                                "start": 80,
                                "end": 80,
                                "transport": "TCP"
                            }
                        ]

oscal CLI reports the following:

[WARNING] [/component-definition/component[X]/protocol[X]/port-range[X]] A start port exists, but an end point does not. To define a single port, the start and end should be the same value.
[WARNING] [/component-definition/component[X]/protocol[X]/port-range[X]] An end point exists, but a start port does not. To define a single port, the start and end should be the same value.

Who is the bug affecting

ME

What is affected by this bug

OSCAL Content

How do we replicate this issue

  1. Generate a component def with a port range as described above
  2. Run the oscal-cli on the file
  3. ???
  4. Error!

Expected behavior (i.e. solution)

No error message :)

Other comments

No response

Revisions

No response

@iMichaela
Copy link
Contributor

ifa_ssp-example_with_port-range.xml.txt

The attached file (an OSCAL XML SSP example with the extension modified to allow its attachment) demonstrates the port-range constraints error.

The constraints are in ./src/metaschema/oscal_implementation-common_metaschema.xml, and a proposed fix is in the [feature-port-range-constraints](https://github.com/usnistgov/OSCAL/tree/feature-port-range-constraints branch), in the above-mentioned file, lines 322-332.

Merging the branch feature-port-range-constraints into develop and then main closes this issue.

@RS-Credentive - please review the proposed change.

@iMichaela
Copy link
Contributor

PR #2024 addresses this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Triage
2 participants