CMP-4040, CMP-4041: Add support for CEL based rules and profiles#14597
CMP-4040, CMP-4041: Add support for CEL based rules and profiles#14597yuumasato wants to merge 14 commits intoComplianceAsCode:masterfrom
Conversation
|
I verified PR #14597 and PR ComplianceAsCode/compliance-operator#1103 together. Generally it is good. The only problem is there is no |
e7d189f to
af527ae
Compare
|
Thanks for the review @xiaojiey. Hopefully I have addessed the BuildConfig issue in the last commit. |
af527ae to
188024f
Compare
188024f to
25fe7a6
Compare
|
@yuumasato Sorry, I forgot to highlight, there is one more need to be updated. The ################# without --datastream-only parameter |
applications/openshift-virtualization/kubevirt-nonroot-feature-gate-is-enabled/rule.yml
Outdated
Show resolved
Hide resolved
Vincent056
left a comment
There was a problem hiding this comment.
I think the PR looks good, just some questions on formatting and templating.
|
@xiaojiey Thanks, instead of removing '--datastream-only' I have added a new parameter '--cel-content=ocp4'. |
|
@yuumasato Thanks for the update. Now with/without CEL profiles, the profiles can be created successfully. |
|
/retest |
build_product
Outdated
| printf '\t%s\n' "-t, --thin, --no-thin: Build thin data streams for each rule. Do not build any of the guides, tables, etc (off by default)" | ||
| printf '\t%s\n' "-r, --rule-id: Rule ID: Build a thin data stream with the specified rule. Do not build any of the guides, tables, etc (off by default)" | ||
| printf '\t%s\n' "-d, --datastream-only, --no-datastream-only: Build the data stream only. Do not build any of the guides, tables, etc (off by default)" | ||
| printf '\t%s\n' "--datastream, --no-datastream: Build the data stream. Do not build any of the guides, tables, etc (off by default)" |
There was a problem hiding this comment.
--no-datastream that name is confusing to me.
There was a problem hiding this comment.
Lol, it just following the pattern of the script.
There was a problem hiding this comment.
@Mab879 Thanks for review, hopefully I have addressed your comments in the new commits I added.
I kept the historical --no-datastream-only to be deprecated / removed when convenient, 😂
We expect this profile to exclusively leverage the CEL rules.
Add a new build-script along with a new output type that builds the CEL rules into the yaml that can be loaded by Compliance Operator.
Copies the CEL content file to the content images.
Adds --cel-content parameter that takes a comma separated list of products to build cel-content for. Add the new parameter with OCP4 product where it makes sense.
With addition of '--cel-content' as an option to build CEL content. And with it being additional to data stream builds, having '--datastream-only' parameter feels weird. This add '--datastream' so that we can move away from '--datastream-only' and be more consistent.
Keep only the --datastream option, which builds the CMake target that generates the data stream files, in addition to any other target defined during script invocation.
Keeps the fields pertainint to CEL scanning engine separate from the rule.yml, which can remain agnostic. This facilitates the implementation of templates later on. 'scanner_type' is completely removed from rules, and inferred by presence of 'cel' directory or presence of 'expression' and 'input' keys.
|
@Mab879 I have moved the CEL specific keys to its own file. |
|
/retest |
|
@yuumasato: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description:
ocp4product.Rationale:
Review Hints: