fix(config-validator): accept scanner keys in $global and validate removeOnException#79
Open
Valyrian-Code wants to merge 1 commit into
Open
Conversation
…emoveOnException KNOWN_GLOBAL_KEYS was missing semgrep, trufflehog, claude, and piAgent, so using \$global.semgrep (functional since the config-inheritance fix) caused validate-config to report an unknown key error despite the config being correct. Also wires their content validators inside validateGlobal. validateLabels was also missing removeOnException from its checked key list even though the worker reads and applies it for exception label cleanup.
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.
Summary
Two validator gaps, both follow-ons to the
$globalinheritance fix:KNOWN_GLOBAL_KEYSwas missingsemgrep,trufflehog,claude, andpiAgent. Using$global.semgrep(which now works at runtime) would causenpm run validate-configto report an unknown key error. Added all four keys and wired their content validators insidevalidateGlobal.validateLabelschecked five keys but was missingremoveOnException, even though the worker reads and applies it. Invalid values (non-array, non-string items) passed the validator unchecked.Test plan
$global.semgrep/trufflehog/claude/piAgentaccepted without unknown-key error$global.claude.modellabels.removeOnExceptionaccepted; non-array and non-string-items rejectednpm test— 635 tests, 0 failures