Add Python CEL content bundler and integrate into Konflux build by Vincent056 · Pull Request #14589 · ComplianceAsCode/content

Skip to content

Navigation Menu

Sign in

Appearance settings

Conversation

@Vincent056

Summary

  • Adds utils/cel_bundler.py, a Python port of the Go cel-bundler from the compliance-operator repo, to bundle individual CEL rule and profile YAML files into a single cel-content.yaml for the compliance-operator parser.
  • Updates the Konflux Containerfile to run the bundler at build time when build/cel-rules/ and build/cel-profiles/ directories are present, shipping cel-content.yaml alongside 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.yaml is consumable by the compliance-operator parser

@Vincent056

2 participants

@Vincent056 @yuumasato