poc: add CELLanguage constant to RuleLanguages#170
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
so this is a small poc for the CEL engine project I'm working on as part of the LFX mentorship.
the change itself is pretty simple. I just added a new constant
CELLanguage = "CEL"to theRuleLanguagestype inreporthandling/datastructures.go. right now onlyRegoLanguageandRegoLanguage2exist there, and the dispatcher in kubescape's opaprocessor uses this type to decide which evaluator to run. so before we can even think about writing a CEL evaluator, this constant needs to exist.I also added two tests to make sure the value is correct and that it doesn't accidentally match either of the Rego constants. nothing fancy, just making sure the basics are solid.
this is not production ready at all, just laying the foundation. the actual wiring into the dispatcher and building out the evaluator comes later.