Add Python CEL content bundler and integrate into Konflux build by Vincent056 · Pull Request #14589 · ComplianceAsCode/content
Navigation Menu
- Notifications You must be signed in to change notification settings
- Fork 790
Conversation
Summary
- Adds
utils/cel_bundler.py, a Python port of the Gocel-bundlerfrom the compliance-operator repo, to bundle individual CEL rule and profile YAML files into a singlecel-content.yamlfor the compliance-operator parser. - Updates the Konflux Containerfile to run the bundler at build time when
build/cel-rules/andbuild/cel-profiles/directories are present, shippingcel-content.yamlalongside the existing XCCDF DataStream XML. - Adds 18 unit tests covering happy-path loading, field preservation, validation errors (missing fields, duplicates, unknown references), YAML serialization roundtrip, and key ordering.
Test plan
-
pytest tests/unit/utils/test_cel_bundler.py— 18 tests pass - Verify Konflux content image build succeeds with CEL rule/profile directories in
build/ - Verify the generated
cel-content.yamlis consumable by the compliance-operator parser
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