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

Create data yaml based on rules instances #130671

Merged
merged 27 commits into from
Apr 25, 2022

Conversation

CohenIdo
Copy link
Contributor

No description provided.

@CohenIdo CohenIdo added release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v8.3.0 labels Apr 20, 2022
@CohenIdo CohenIdo marked this pull request as ready for review April 20, 2022 13:06
@CohenIdo CohenIdo requested a review from a team as a code owner April 20, 2022 13:06
@CohenIdo CohenIdo requested a review from kfirpeled April 20, 2022 13:07
Copy link
Contributor

@eyalkraft eyalkraft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but what about adding a test that actually confirms you filter correctly? e.g add different package_policy_ids and policy_id to your concrete rules used in the test?

const cspRules = await soClient.find<CspRuleSchema>({
type: cspRuleAssetSavedObjectType,
search: '',
filter: `csp_rule.attributes.package_policy_id: ${packagePolicy.id} AND csp_rule.attributes.policy_id: ${packagePolicy.policy_id}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use the cspRuleAssetSavedObjectType for filtering instead csp_rule as suggeted by @kfirpeled in another PR

Copy link
Contributor

@kfirpeled kfirpeled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, lgtm.
see comments before merge

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@CohenIdo
Copy link
Contributor Author

CohenIdo commented Apr 25, 2022

Looks good but what about adding a test that actually confirms you filter correctly? e.g add different package_policy_ids and policy_id to your concrete rules used in the test?

it's requires an integration test, I'll add it in another PR

@CohenIdo CohenIdo merged commit 780333b into elastic:main Apr 25, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 25, 2022
dmlemeshko pushed a commit to dmlemeshko/kibana that referenced this pull request May 5, 2022
kertal pushed a commit to kertal/kibana that referenced this pull request May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants