Skip to content

Commit

Permalink
[Cloud Security] Adding vuln filter to the scores index (#161648)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanSh authored Jul 12, 2023
1 parent ea1e6ed commit 47d099e
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
import { SearchRequest } from '@kbn/data-plugin/common';
import { ElasticsearchClient } from '@kbn/core/server';
import type { Logger } from '@kbn/core/server';
import { getSafeVulnerabilitiesQueryFilter } from '../../common/utils/get_safe_vulnerabilities_query_filter';
import { getSafePostureTypeRuntimeMapping } from '../../common/runtime_mappings/get_safe_posture_type_runtime_mapping';
import { getIdentifierRuntimeMapping } from '../../common/runtime_mappings/get_identifier_runtime_mapping';
import {
Expand Down Expand Up @@ -181,9 +182,7 @@ const getScoreQuery = (): SearchRequest => ({
const getVulnStatsTrendQuery = (): SearchRequest => ({
index: LATEST_VULNERABILITIES_INDEX_DEFAULT_NS,
size: 0,
query: {
match_all: {},
},
query: getSafeVulnerabilitiesQueryFilter(),
aggs: {
critical: {
filter: { term: { 'vulnerability.severity': VULNERABILITIES_SEVERITY.CRITICAL } },
Expand Down

0 comments on commit 47d099e

Please sign in to comment.