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

Format check of CPEs in Frontend #1085

Open
2 tasks done
KS-DR opened this issue Nov 12, 2024 · 0 comments
Open
2 tasks done

Format check of CPEs in Frontend #1085

KS-DR opened this issue Nov 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@KS-DR
Copy link

KS-DR commented Nov 12, 2024

Current Behavior

If you create a new component in a project, or try to update an existing component with an invalid CPE, the green checkmark in the CPE input field is always present, no matter what you type in indicating the typed CPE is correct.

When saving, the UI indicates via a pop up, that an error occurred, but only in the Networking-Tab in the browsers developer-tools it is visible, what the problem is.

This is especially confusing for users used to use croped CPEs like cpe:2.3:a:boost:boost:1.71.0, that the NVD search (https://nvd.nist.gov/products/cpe/search) will mark as valid, but Dependency-Track will not accept.

Tested with DT v4.12.1


Images:

Checkmark in UI:
Image

Pop-Up indicating an error on saving:
Image

Log in networking tab in browsers developer-tools:
Image

NVD search indicating croped CPE is valid:
Image

Proposed Behavior

The UI checks while typing, or at least at saving, if the input follows correct CPE format. If not, the input field should be highlighted red, to indicate that the input is not correct. In this case, the user should not be able to save the form / The frontend should not send the POST request to update the component. Users would than better understand why they can't save a component when using a croped or otherwise invalid CPE.

Image

Checklist

@KS-DR KS-DR added the enhancement New feature or request label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant