Skip to content
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

🌱 Allow multiple rules per validator #61

Open
mattwelke opened this issue Jul 10, 2024 · 2 comments · May be fixed by #65
Open

🌱 Allow multiple rules per validator #61

mattwelke opened this issue Jul 10, 2024 · 2 comments · May be fixed by #65
Labels
enhancement Enhancement to an existing feature

Comments

@mattwelke
Copy link
Member

Summary

Plugins should support defining more than one rule of the same rule type per validator. For example, in the AWS plugin:

type AwsValidatorSpec struct {
...
	AmiRules []AmiRule `json:"amiRules,omitempty" yaml:"amiRules,omitempty"`
...
}

The Kubescape plugin should be changed to allow this too. Right now, its spec only allows one rule of each type per validator:

type KubescapeValidatorSpec struct {
...
	SeverityLimitRule SeverityLimitRule `json:"severityLimitRule,omitempty" yaml:"severityLimitRule,omitempty"`
...
	IgnoredCVERule []string `json:"ignoredCVERule,omitempty" yaml:"ignoredCVERule,omitempty"`
...
	FlaggedCVERule []FlaggedCVE `json:"flaggedCVERule,omitempty" yaml:"flaggedCVERule,omitempty"`
}

For example, SeverityLimitRule can be changed to []SeverityLimitRule to accomplish this.

After the spec is changed, the controller logic should be changed to iterate through each rule, processing them one at a time.

@TylerGillson
Copy link
Member

@wcrum was working on a refactor to the plugin that I believe would address this. @wcrum can you please chime in?

@wcrum wcrum linked a pull request Jul 11, 2024 that will close this issue
@TylerGillson TylerGillson added the enhancement Enhancement to an existing feature label Jul 25, 2024
@TylerGillson TylerGillson changed the title ✨ Allow multiple rules per validator 🌱 Allow multiple rules per validator Jul 25, 2024
@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Oct 24, 2024
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 31, 2024
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Oct 31, 2024
@TylerGillson TylerGillson reopened this Oct 31, 2024
Copy link

dosubot bot commented Jan 30, 2025

Hi, @mattwelke. I'm Dosu, and I'm helping the validator-plugin-kubescape team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You proposed an enhancement to allow multiple rules of the same type per validator in the Kubescape plugin.
  • This would require changes to KubescapeValidatorSpec and updates to the controller logic.
  • @TylerGillson mentioned that @wcrum was working on a refactor that might address this issue and requested input from @wcrum.

Next Steps:

  • Could you confirm if this issue is still relevant with the latest version of the validator-plugin-kubescape repository? If so, please comment to keep the discussion open.
  • If there is no further activity, this issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jan 30, 2025
@TylerGillson TylerGillson removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants