Skip to content

[Cloud Security] Refactor hard coded Findings filter fields in CSPM benchmark dashboard's#225692

Merged
seanrathier merged 3 commits intoelastic:mainfrom
seanrathier:remove-namespace-const
Jul 11, 2025
Merged

[Cloud Security] Refactor hard coded Findings filter fields in CSPM benchmark dashboard's#225692
seanrathier merged 3 commits intoelastic:mainfrom
seanrathier:remove-namespace-const

Conversation

@seanrathier
Copy link
Contributor

@seanrathier seanrathier commented Jun 27, 2025

Summary

This pull request introduces a new constant, FINDINGS_FILTER_OPTIONS, to centralize filter keys used throughout the Cloud Security Posture plugin. The changes replace hardcoded filter keys with references to this constant across multiple components and tests, improving maintainability and consistency.

Introduction of FINDINGS_FILTER_OPTIONS:

  • Added FINDINGS_FILTER_OPTIONS to constants.ts to centralize filter keys such as CLOUD_PROVIDER, NAMESPACE, RULE_BENCHMARK_ID, and others. This ensures a single source of truth for filter key definitions.

Refactoring in components:

  • Updated AccountsEvaluatedWidget to replace hardcoded filter keys with FINDINGS_FILTER_OPTIONS
  • Updated BenchmarksSection to use FINDINGS_FILTER_OPTIONS
  • Updated SummarySection to use `FINDINGS_FILTER_OPTIONS

Checklist

@seanrathier seanrathier self-assigned this Jun 27, 2025
@seanrathier seanrathier added Team:Cloud Security Cloud Security team related backport:version Backport to applied version labels v9.1.0 labels Jun 27, 2025
@seanrathier seanrathier marked this pull request as ready for review June 27, 2025 17:57
@seanrathier seanrathier requested a review from a team as a code owner June 27, 2025 17:57
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

@seanrathier seanrathier added ci:project-deploy-security Create a Security Serverless Project release_note:skip Skip the PR/issue when compiling release notes labels Jun 27, 2025
@seanrathier seanrathier force-pushed the remove-namespace-const branch from f85ff4f to 6b26b38 Compare June 27, 2025 18:32
@seanrathier seanrathier enabled auto-merge (squash) June 27, 2025 18:40
@seanrathier seanrathier disabled auto-merge June 27, 2025 18:40
Copy link
Contributor

@opauloh opauloh left a comment

Choose a reason for hiding this comment

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

🚀

@seanrathier seanrathier enabled auto-merge (squash) June 30, 2025 14:05
@seanrathier seanrathier force-pushed the remove-namespace-const branch from 62bd121 to 6f06493 Compare July 11, 2025 17:48
@elasticmachine
Copy link
Contributor

elasticmachine commented Jul 11, 2025

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cloudSecurityPosture 558.4KB 559.0KB +593.0B

History

cc @seanrathier

@seanrathier seanrathier merged commit e8d9e52 into elastic:main Jul 11, 2025
12 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.1

https://github.com/elastic/kibana/actions/runs/16227971594

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 11, 2025
…CSPM benchmark dashboard's (#225692) (#227706)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Cloud Security] Refactor hard coded Findings filter fields in CSPM
benchmark dashboard's
(#225692)](#225692)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT
[{"author":{"name":"seanrathier","email":"sean.rathier@gmail.com"},"sourceCommit":{"committedDate":"2025-07-11T19:17:23Z","message":"[Cloud
Security] Refactor hard coded Findings filter fields in CSPM benchmark
dashboard's
(#225692)","sha":"e8d9e525dd4c8dea82c80b242dd075c02914a2fd","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Cloud
Security","ci:project-deploy-security","backport:version","v9.1.0","v9.2.0"],"title":"[Cloud
Security] Refactor hard coded Findings filter fields in CSPM benchmark
dashboard's","number":225692,"url":"https://github.com/elastic/kibana/pull/225692","mergeCommit":{"message":"[Cloud
Security] Refactor hard coded Findings filter fields in CSPM benchmark
dashboard's
(#225692)","sha":"e8d9e525dd4c8dea82c80b242dd075c02914a2fd"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225692","number":225692,"mergeCommit":{"message":"[Cloud
Security] Refactor hard coded Findings filter fields in CSPM benchmark
dashboard's
(#225692)","sha":"e8d9e525dd4c8dea82c80b242dd075c02914a2fd"}}]}]
BACKPORT-->

Co-authored-by: seanrathier <sean.rathier@gmail.com>
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
@seanrathier seanrathier deleted the remove-namespace-const branch March 6, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels ci:project-deploy-security Create a Security Serverless Project release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants