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

[Cloud Security][Dashboard Enhancements] Create Aggregation query to get benchmarks #170750

Closed
4 tasks done
Tracked by #170795
Omolola-Akinleye opened this issue Nov 7, 2023 · 2 comments
Closed
4 tasks done
Tracked by #170795
Assignees
Labels
8.12 candidate Feature:Cloud-Security Cloud Security related features Team:Cloud Security Cloud Security team related verified

Comments

@Omolola-Akinleye
Copy link
Contributor

Omolola-Akinleye commented Nov 7, 2023

Motivation: I aim to create a new aggregation query that retrieves findings by benchmark, enabling users to quickly view and analyze grouped cloud assets. This will include benchmark data (ID, name, versions), passed/failed findings, posture score, and CIS section’s Compliance Score. The benchmark aggregation will utilize the stats API to enhance the Compliance Dashboard Data API ticket.

Acceptance Criteria:

  1. Create Benchmark Aggregation:
  • A new aggregation query that collects cloud assets metadata and stats by rule.benchmark.id and `rule.benchmark.version.

  • The aggregated results return a list of benchmark assets which include the rule benchmark ID and benchmark versions

  • The aggregated results should include

    • Benchmark Id
    • Benchmark Version
    • Benchmark Name
    • Resource Type Aggregation by passed/failed findings by benchmark id and version
    • Passed/Failed findings by benchmark id and version
    • Count of assets
  • Apply getIdentifierRuntimeMapping to the aggregation query in order to get the number of cloud assets depending on posture type and ensure querying Backward compatibility.

  1. Add Passed/Failed Findings Aggregation under Benchmark Version aggs
  • The query shall aggregate using result.evaluation field passed/failed findings.
  • The query results shall return the count of passed findings and the count of failed findings.

3.Add Resource type Aggregation under Benchmark Version Aggs

  • The Resource type aggregation shall aggregate CIS section compliance scores.
  • The aggregation results will return the CIS section, counts of passed and failed findings, and the overall score.

4.Add Error Handling

  • The aggregation query shall throw an error if the cloud assets by benchmark ID aggregation fails.
  • The aggregation query shall throw an error if the cloud assets by benchmark version aggregation fail.
  • The aggregation query shall throw an error if the passed/failed findings aggregation fails.
  • The aggregation query shall throw an error if the resource type aggregation fails.

Definition of Done

Preview Give feedback

Note:
This ticket is subtask to

Epic - https://github.com/elastic/security-team/issues/7621

@Omolola-Akinleye Omolola-Akinleye self-assigned this Nov 7, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 7, 2023
@Omolola-Akinleye Omolola-Akinleye removed the needs-team Issues missing a team label label Nov 7, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 7, 2023
@Omolola-Akinleye Omolola-Akinleye added Team:Cloud Security Cloud Security team related Feature:Cloud-Security Cloud Security related features 8.12 candidate labels Nov 7, 2023
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Nov 7, 2023
@Omolola-Akinleye Omolola-Akinleye changed the title [Cloud Security][Dashboard Enhancements] Create Aggregation query to get cloud assets by Benchmark [Cloud Security][Dashboard Enhancements] Create Aggregation query to get benchmarks Nov 14, 2023
@animehart
Copy link
Contributor

Screenshot 2023-12-12 at 3 01 10 PM Screenshot 2023-12-12 at 3 01 43 PM

benchmark id, benchmark version, failed findings, passed findings, resource type are shown in the Benchmark response and can also be seen in the UI :verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.12 candidate Feature:Cloud-Security Cloud Security related features Team:Cloud Security Cloud Security team related verified
Projects
None yet
Development

No branches or pull requests

4 participants