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

CPE pattern #693

Open
tschmidtb51 opened this issue Feb 23, 2024 · 1 comment
Open

CPE pattern #693

tschmidtb51 opened this issue Feb 23, 2024 · 1 comment
Assignees
Labels
csaf 2.1 csaf 2.1 work editor-revision already worked on in the editor revision investigation needed anything that needs some investigation

Comments

@tschmidtb51
Copy link
Contributor

The current CPE regex seems to have some issues:

  1. The CPE version are not restricted correctly. Instead of ^(CPE2.3|CPE2.2)$, the pattern uses ^(CPE2.3)|(CPE2.2)$. This allows values like NOTAVALIDCPEcpe:/o:example:a:42::anyother resp. (appended ones in CPE2.3).
  2. Some implementations (e.g. deno) don't like the / as un-escaped character in JSON patterns.

Regarding 1:

  • That is definitely something that we need to address in CSAF 2.1.

Regarding 2:

  • Our test scripts (using python and nodejs) haven't complained so far. So we need to find out whether an un-escaped / is valid in JSON patterns or just accepted. (This means reading the standard.)
  • We need to consider improving the situation in CSAF 2.1 by adding the \\ to escape /.
@tschmidtb51 tschmidtb51 added csaf 2.1 csaf 2.1 work investigation needed anything that needs some investigation labels Feb 23, 2024
@tschmidtb51
Copy link
Contributor Author

Regarding both parts, the TC needs to decide whether that is something for an errata. I think that heavily depends on the result of 2 as it might be an implementation specific problem.

tschmidtb51 added a commit to tschmidtb51/csaf that referenced this issue Mar 27, 2024
- addresses parts of oasis-tcs#693, oasis-tcs#710
- correct pattern to `^((CPE2.3)|(CPE2.2))$`
- add additional `\\` to escape previously unescaped `/`
tschmidtb51 added a commit to tschmidtb51/csaf that referenced this issue Mar 27, 2024
- addresses parts of oasis-tcs#693
- correct parsing of CPE 2.3 Dictionary (to also capture endings `">` instead of just `"/>`)
tschmidtb51 added a commit to tschmidtb51/csaf that referenced this issue Mar 27, 2024
- addresses parts of oasis-tcs#693
- add new local test cases
- adopt test script
tschmidtb51 added a commit to tschmidtb51/csaf that referenced this issue Mar 27, 2024
- addresses parts of oasis-tcs#693
- add conversion rule
@tschmidtb51 tschmidtb51 added the editor-revision already worked on in the editor revision label Mar 27, 2024
tschmidtb51 added a commit to tschmidtb51/csaf that referenced this issue May 25, 2024
- addresses parts of oasis-tcs#693
- add FAQ regarding usage of the new pattern
tschmidtb51 added a commit to tschmidtb51/csaf that referenced this issue May 25, 2024
- addresses parts of oasis-tcs#693
- add missing `\\` for overlooked `/`
- adopt prose to reflect schema
tschmidtb51 added a commit to tschmidtb51/csaf that referenced this issue May 25, 2024
- addresses parts of oasis-tcs#693
- add new local testcases
tschmidtb51 added a commit to tschmidtb51/csaf that referenced this issue May 25, 2024
- addresses parts of oasis-tcs#693
- clarify that the pattern was changed in CSAF 2.1
@tschmidtb51 tschmidtb51 self-assigned this Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
csaf 2.1 csaf 2.1 work editor-revision already worked on in the editor revision investigation needed anything that needs some investigation
Projects
None yet
Development

No branches or pull requests

1 participant