-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add mandatory test 6.1.36 #216
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
base: 196-csaf-2.1
Are you sure you want to change the base?
Conversation
Coverage after merging 197-csaf-2.1-mandatory-test-6.1.36 into 196-csaf-2.1-exclude-unimplemented-tests-from-test-suite
Coverage Report
|
I'll review after #220 is merged |
8394eb7
to
eb7c402
Compare
eb7c402
to
1267a2f
Compare
Coverage after merging 197-csaf-2.1-mandatory-test-6.1.36 into 196-csaf-2.1
Coverage Report
|
1267a2f
to
213be7e
Compare
Coverage after merging 197-csaf-2.1-mandatory-test-6.1.36 into 196-csaf-2.1
Coverage Report |
if (prohibitionRuleMap.get(category)?.has(productStatus)) { | ||
ctx.errors.push({ | ||
instancePath: `/vulnerabilities/${vulnerabilityIndex}/remediations/${remediationIndex}`, | ||
message: `contradicting remediation product status combination for product id "${productId}": ${category}, ${productStatus}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, we can improve the error message?
message: `contradicting remediation product status combination for product id "${productId}": ${category}, ${productStatus}`, | |
message: `contradicting remediation product status combination for product id "${productId}": product status is ${productStatus} but remediation category is ${category}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@domachine I guess, I'm missing a response to this comment...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about the suggested error message in https://github.com/secvisogram/csaf-validator-lib/pull/257/files#r2074269857? Please ensure that both follow the same pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see the wording improved - feel free to come up with a better one than the suggestion.
Also, I wonder if we could adds usability if we use the product_id
as instancePath... Please check how we did this in similar tests...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Maybe this is a similar case: https://github.com/secvisogram/csaf-validator-lib/blob/main/lib/mandatoryTests/mandatoryTest_6_1_1.js#L62 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is a similar case: https://github.com/secvisogram/csaf-validator-lib/blob/main/lib/mandatoryTests/mandatoryTest_6_1_1.js#L62
Here we are using the product id.
I guess, it could be helpful to show it directly at that place... What do you think from an UI perspective?
if (prohibitionRuleMap.get(category)?.has(productStatus)) { | ||
ctx.errors.push({ | ||
instancePath: `/vulnerabilities/${vulnerabilityIndex}/remediations/${remediationIndex}`, | ||
message: `contradicting remediation product status combination for product id "${productId}": ${category}, ${productStatus}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@domachine I guess, I'm missing a response to this comment...
I'm not really sure if this would result in better UX. The are two major error sources (probably more). One case I see is that the user confused the product id. In this case it might be easier to spot if the error was right at the product id. The second case is that the remediation category or the product status is messed up. In that case it might be easier to spot and fix if the error was located at the product status or the remediation. Maybe the user can even memorize the product id (maybe it's some technical identifier) then it might be obvious what's wrong if she/he re-checks the remediation (which the error points to). Since the remediation and the product status are probably located side by side (in the same vulnerability) I think it's fine to point the user to the remediation. But it's probably also a matter of taste. Do you have any particular use-case in mind? |
213be7e
to
e1b4533
Compare
Coverage after merging 197-csaf-2.1-mandatory-test-6.1.36 into 196-csaf-2.1
Coverage Report |
Let's discuss that again in our next meeting |
No description provided.