Closed jslivka closed 6 months ago
:white_check_mark: No new Action Items detected!
For posterity, here's the line that makes this work: https://github.com/FairwindsOps/polaris/blob/0b765df04db2960bb744ab3dcb23fdbe304cbcde/pkg/config/schema.go#L243
This PR fixes #1003
Checklist
Description
Polaris checks utilize
additionalSchemaStrings
, an additional section of jsonschema that will only evaluate if the object conforms toschemaString
. The conditional statements inadditionalSchemaStrings
need to be arranged in a manner such that when there's nothing to evaluate, the string is empty (not the object therein).What's the goal of this PR?
Fix false positives reported when running the Polaris CLI for the following checks:
What changes did you make?
adjust the ordering of conditional expressions in
additionalSchemaStrings
:e.g.
so that there is not an empty object being evaluated, but rather an empty string
I've also added success test cases as a regression check
What alternative solution should we consider, if any?