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

Feature/invalid required fields red border #235

Merged
merged 39 commits into from
Apr 19, 2024

Conversation

ThomasDThales
Copy link
Contributor

Validity checks on SupportingAssets, AttackPaths and BusinessAssets updated
Error styles added to the required files
Update of styles
Displaying "Select... " as default for select inputs

ThomasDThales and others added 18 commits April 2, 2024 14:05
… the issue where risks where not red when vulnerabilities / business assets / supporting assets are deleted
…s not shown while saving (Duplication of validation in request-handlers.js and renderer.js, see to create a globl function)
…ion + gather risks that are invalid due to evaluation+ add invalid risk Evaluation Messages
… ) to be set as valid items only or "Select..." input
@Alvin-JohnPagente
Copy link
Contributor

We can probably make the behavior consistent where the red border is applied.

For example:
Here the dropdown is highlighted as red but the dropdown header is not
image

Here the header is red but the field does not have a red border
image

@Alvin-JohnPagente
Copy link
Contributor

The vulnerability name should be mandatory... but it does not have a red border

image

@Alvin-JohnPagente
Copy link
Contributor

In the Business Assets tab, name should be mandatory
image

In the supporting asset, the business asset without a name should be red
image

@ThomasDThales
Copy link
Contributor Author

Same for Supporting Assets' name.

@ThomasDThales
Copy link
Contributor Author

We can probably make the behavior consistent where the red border is applied.

For example: Here the dropdown is highlighted as red but the dropdown header is not image

Here the header is red but the field does not have a red border image

The consistence is respected regarding the documentation

@ThomasDThales
Copy link
Contributor Author

Updated behavior:

  • Inputs display errors either with bigger border width and red border color or red color on the related label (Both display can be used, example for 'VulnerabilityName')
    image
  • These errors are triggered by: unfilled required fields, fields filled with unknown references (example : attack paths containing references of deleted Vulnerabilities) and references of nonvalid objects
  • Each error is also mentioned in the Error popup displayed when saving
  • The type of the displayed error make the input have a specific behaviors:
    • The "unfilled required fields" and "fields filled with unknown references" errors set the value of the input as default (empty for text inputs, "Select" for select inputs)
    • The "references of nonvalid objects" error has no impact on the value of the input

@ThomasDThales
Copy link
Contributor Author

The vulnerability name should be mandatory... but it does not have a red border

image

Fixed

@ThomasDThales
Copy link
Contributor Author

In the Business Assets tab, name should be mandatory image

In the supporting asset, the business asset without a name should be red image

For the display of business asset without a name in a supporting asset : Fixed
For the display that a Supporting name is required, will be done in an other feature. The goal is to have a consistent display of this error for every item (SA, BA, Vulnerability, Risk)

Copy link
Contributor

@Alvin-JohnPagente Alvin-JohnPagente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome: confirmed

  • fixed missing \n after Welcome error message in popup. Space added before the next issue category

Business asset: confirmed

  • fixed error triggering for risk and BA empty names when saving. When the business asset name is empty, it shows as an error on save

Supporting asset: confirmed

  • In the Relationship Matrix, changed select Business asset in supporting asset to red border when not set. When the value is "Select", a red border is visible.
  • In the Relationship Matrix, changed select Business asset in supporting asset to red border when not set. The business asset box is now red
  • In the Relationship Matrix, adding name check for valid business asset in supporting assets. Now the box is red if the business asset has an empty name
  • adding id column in Relationship Matrix in case the name is empty. A new risk ID column was added. The ID turns red on error.
  • trigger error when saving if Supporting Asset name is empty. Now the error message clearly states that the name is empty
  • update the Supporting Asset Name color inside "List of Supporting Assets" when its content changes. Now if the supporting asset is invalid, the item is red on the List of Supporting Assets table

Vulnerabilities: confirmed

  • Add title colors for the Description and Support Assets inputs in Vulnerability Panel when invalid
  • adding display of vulnerability name error in vulnerability panel. Now if the vulnerability name is empty the text input title is red
  • fix panel switch on vulnerability. Fixes the issue where when there are no vulnerabilities (delete all vulns), all tabs are disabled

Risks: confirmed

  • Change the condition of input values (Business Asset & Supporting Asset) to be set as valid items only or "Select..." input. Now invalid Business Assets and Supporting Assets are visible
  • modify the validate function and add the attackpaths condition to fix…
    … the issue where risks where not red when vulnerabilities / business assets / supporting assets are deleted. Now the risk in the table is red when the business asset, supporting asset, and vulnerability is deleted
  • fixed the issue where risk invalidation from deleted vulnerability was not shown while saving. Now the error is shown in the Save error dialog
  • adding name check of vulnerability in risk attack path. Now if the chosen vulnerability in the attack path is empty, the box is highlighted with red
  • display the supporting assets in the Relationship Matrix even if the name is empty. Empty names are visible in the attack path dropdown
  • an unexisting BA or SA set the select option to "Select.." and an invalid one set the border color to red - Works as described
  • display invalid business and supporting asset as red in select inputs. Now the box is red if the value is not valid
  • display invalid vulnerability as red in attackpath from init of select input. Now an invalid vulnerability is shown as red in the drop down
  • Fix the display of Risk Evaluation filling errors on file save. The risk error is now visible in the save error dialog
  • fix display red of vulnerability in attack path, parameter was id and not object. Fixes the issue where a valid vulnerability is shown as red in the Attack Path drop down

Copy link
Contributor

@Alvin-JohnPagente Alvin-JohnPagente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wheww! Approved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants