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

csaf_validator: Warn if remote_validator is not configured #601

Open
s-l-teichmann opened this issue Nov 29, 2024 · 3 comments · May be fixed by #602
Open

csaf_validator: Warn if remote_validator is not configured #601

s-l-teichmann opened this issue Nov 29, 2024 · 3 comments · May be fixed by #602

Comments

@s-l-teichmann
Copy link
Contributor

The validator only validates against the JSON schema if the remote validator is not configured.

In this case a warning should be issued.

@s-l-teichmann s-l-teichmann self-assigned this Nov 29, 2024
@tschmidtb51
Copy link
Collaborator

We should also consider the exit codes. Suggestion:

  • 0: all valid
  • 2⁰: schema invalid
  • : no remove validator configured
  • : failure in remote validation

@bernhardreiter
Copy link
Member

Would it be a plus to run the JSON schema validation in any case? This would eat some CPU cycles, but may potentially catch differences in the schema validation codepaths between the csaf_validator and the remote validator.

@bernhardreiter
Copy link
Member

More about the use case from @tschmidtb51:
He wants to use the exit code in scripting (e.g. bash scripting) to make a distinction between the suggested situations and their combinations.

We should introduce an 1 aka 2⁰ as general failure exit code and move the other ones one bit left.

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

Successfully merging a pull request may close this issue.

4 participants