[K9VULN-11258] Implement config file v2 parser#806
Merged
jasonforal merged 7 commits intomainfrom Feb 3, 2026
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
bahar-shah
approved these changes
Feb 3, 2026
| V1 => YamlSchemaVersion::V1, | ||
| V2 => YamlSchemaVersion::V2, | ||
| _ => { | ||
| s.truncate(8); |
There was a problem hiding this comment.
i know you said this is preserving existing behavior but is there a reason we truncate to 8 characters? seems a little arbitrary
Collaborator
Author
There was a problem hiding this comment.
This will be new behavior for the v2 parser (this enum is unused by the v1 parser).
It is entirely arbitrary. However, should we eventually start to expose parse errors in the UI, I'd rather not accidentally print a 50 megabyte string someone (not so graciously) adds as a schema version :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem are you trying to solve?
Implementing the config V2 file schema.
What is your solution?
NOTE: this PR makes no changes to business logic or v1 semantics.
ConfigFile,RulesetConfig, etc.) have every field expressed as anOption. This preserves of the semantic meaning of an unset field beyond just the YAML parsing phase.Alternatives considered
What the reviewer should know