-
Notifications
You must be signed in to change notification settings - Fork 47
CMP-4518: Add support for manual rules in CEL scanner #1315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,20 @@ | ||
| # Coverage baseline for compliance-operator | ||
| # Generated by: make update-coverage-baseline | ||
| # Do not edit manually. | ||
| github.com/ComplianceAsCode/compliance-operator/cmd/manager 24.2 | ||
| github.com/ComplianceAsCode/compliance-operator/cmd/celctl 45.6 | ||
| github.com/ComplianceAsCode/compliance-operator/cmd/manager 24.1 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/apis/compliance/v1alpha1 7.5 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/celcontent 83.3 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/controller/common 33.7 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/controller/complianceremediation 53.2 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/controller/compliancescan 40.0 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/controller/compliancesuite 19.3 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/controller/compliancesuite 22.9 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/controller/customrule 65.7 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/controller/metrics 44.4 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/controller/metrics 42.9 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/controller/profilebundle 5.1 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/controller/scansettingbinding 53.6 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/controller/tailoredprofile 59.5 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/profileparser 78.1 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/profileparser 78.2 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/utils 67.5 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/utils/celvalidation 100.0 | ||
| github.com/ComplianceAsCode/compliance-operator/pkg/xccdf 48.1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -142,10 +142,10 @@ func loadRules(dir string) ([]CELRuleContent, error) { | |
| if rule.Name == "" { | ||
| return nil, fmt.Errorf("rule in %s has no name", f) | ||
| } | ||
| if rule.Expression == "" { | ||
| if rule.CheckType != "Manual" && rule.Expression == "" { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pasting here what I commented on ComplianceAsCode/content#14920
|
||
| return nil, fmt.Errorf("rule %q in %s has no expression", rule.Name, f) | ||
| } | ||
| if len(rule.Inputs) == 0 { | ||
| if rule.CheckType != "Manual" && len(rule.Inputs) == 0 { | ||
| return nil, fmt.Errorf("rule %q in %s has no inputs", rule.Name, f) | ||
| } | ||
| rules = append(rules, rule) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to output a log message?