-
Notifications
You must be signed in to change notification settings - Fork 6
Add validation functionality #132
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: main
Are you sure you want to change the base?
Conversation
283dc46
to
40ad9aa
Compare
The remaining pylint error is not related to the PR:
|
Thanks!
The remaining pylint error is not related to the PR:
```
cvrf2csaf/cvrf2csaf.py:254:0: R0915: Too many statements (52/50)
(too-many-statements) ```
Can you also deal with it in another PR?
(Silence or rewrite.)
|
A question is if validation should be the default - I guess it makes more sense as the output files should be valid CSAF documents and for this the mandatory tests are required to pass (and the optional and recommendation tests can be useful as warnings and recommendations). |
A failure in the mandatory tests from the validator shall make the converter fail I think. |
That's what the code in https://github.com/csaf-tools/CVRF-CSAF-Converter/pull/132/files#diff-fa1a64ee695c90205cb0dc8aba4aa7a0dc8eb5e70ede667636ade192a8ddaaa1R359 does
That also means any user of the converter also needs to setup the validator first |
Yes, this is good. Please add this prerequisite to the documentation. If an error from the validator leads to an overall error from the converter, that is fine (I haven't tested this yet). |
40ad9aa
to
02c1bd0
Compare
The validator is now required by default and can be disabled by a parameter. (inverse to previous behavior)
Added a paragraph on the requirement to the section "Getting started"
As before, I also added handling of http errors (hiding the traceback for e.g. connection failures) and lowered the logging level for the |
solves this pylint error: cvrf2csaf/cvrf2csaf.py:254:0: R0915: Too many statements (52/50) (too-many-statements) by splitting the main() function into two
02c1bd0
to
d559436
Compare
As the pylint error (too many statements in This PR is now finally ready for a review. |
Adds parameter
--validate
that supports https://github.com/secvisogram/csaf-validator-service to validate the resulting document.Fixes #124
Result examples: