Skip to content

Add Python CEL content bundler and integrate into Konflux build#14589

Closed
Vincent056 wants to merge 1 commit intoComplianceAsCode:masterfrom
Vincent056:add-cel-bundler
Closed

Add Python CEL content bundler and integrate into Konflux build#14589
Vincent056 wants to merge 1 commit intoComplianceAsCode:masterfrom
Vincent056:add-cel-bundler

Conversation

@Vincent056
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor Author

/retest

@yuumasato yuumasato self-assigned this Mar 23, 2026
@Vincent056
Copy link
Copy Markdown
Contributor Author

let's deprecate this one in favor of #14597

@Vincent056 Vincent056 closed this Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants