-
Notifications
You must be signed in to change notification settings - Fork 8
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
Invalid CPE regular expression #156
Comments
Hmm, interesting... I have to investigate that... That case did not occur in the CPE dictionary... |
Maybe it depends on the regular expression implementation. But escaping the |
I was just wondering: Is that a problem of the standard (as the pattern does not escape any |
I am not sure where the csaf-validator-lib gets the regexp from. |
Note to self: According to the test script the JSON schema pattern seems correct and validates also |
It might actually be implementation specific as I don't get the error when using Secvisogram. So, I wonder whether this repo is the correct place to fix it. I guess that needs a bit further investigation. |
Ok, let me try dig a bit into that and find out more. |
Thank you. The key question for me would be: Is it allowed to omit the escaping for |
I think this is an issue with the regexp itself. JSON just escapes this. I found this in the
That is missing the It accepts this, but also corrects it. |
Which is btw the same behavior I see changing a CPE in the tests of |
@ctron Could you please confirm: You are using that this library via |
Embedding this (the problem with the missing slashes) comes from an embedded deno use case. However, there's a second component to it: Nevertheless, the regexp still allows for values such as |
True and accepted. This is tracked in oasis-tcs/csaf#693 It's up to the TC to decide, what the solution will be, please stay tuned. |
After reading the spec, I'm still confused what the correct answer regarding the |
The change is now part of the current Editor Revision for CSAF 2.1. |
BTW: I also started to investigate different implementations at: https://github.com/tschmidtb51/JSON-schema-pattern The Node one is more or less what I would expect... |
resolves #156 Note: This does not affect conformance as stated in https://github.com/oasis-tcs/csaf/blob/master/csaf_2.0/guidance/faq.md#the-cpe-pattern-changed-from-csaf-20-to-csaf-21-why
I still think that the |
Running the validation for
csaf_2_0
andcsaf_2_0_strict
, I get the following error:Testing again the following CPE:
cpe:/o:redhat:enterprise_linux:8::fastdatapath
(which seems valid to me).Testing with another regular expression too, I get an error that the regular expression is invalid for ECMAScript. Caused by two missing escape backslashes:
Diff:
The text was updated successfully, but these errors were encountered: