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

Rename vulnerability.under_evaluation field #7046

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ All notable changes to the Wazuh app project will be documented in this file.

- Support for Wazuh 4.10.0
- Added sample data for YARA [#6964](https://github.com/wazuh/wazuh-dashboard-plugins/issues/6964)
- Added a custom filter and visualization for vulnerability.under_evaluation field [#6968](https://github.com/wazuh/wazuh-dashboard-plugins/issues/6968)
- Added a custom filter and visualization for vulnerability.under_evaluation field [#6968](https://github.com/wazuh/wazuh-dashboard-plugins/issues/6968) [#7046](https://github.com/wazuh/wazuh-dashboard-plugins/issues/7046)

### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type VulsEvaluatedFilterProps = {
value: boolean | null;
};

const UNDER_EVALUATION_FIELD = 'wazuh.vulnerability.under_evaluation';
const UNDER_EVALUATION_FIELD = 'vulnerability.under_evaluation';

export const getUnderEvaluationFilterValue = (
filters: Filter[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ const getVisStateEvaluatedEvaluationPending = (indexPatternId: string) => {
{
input: {
language: 'kuery',
query: 'wazuh.vulnerability.under_evaluation:true',
query: 'vulnerability.under_evaluation:true',
},
label: 'Pending',
},
Expand Down
10 changes: 3 additions & 7 deletions scripts/vulnerabilities-events-injector/DIS_Template.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@
"severity": {
"ignore_above": 1024,
"type": "keyword"
},
"under_evaluation": {
"type": "boolean"
}
}
},
Expand Down Expand Up @@ -257,13 +260,6 @@
"type": "keyword"
}
}
},
"vulnerability": {
"properties": {
"under_evaluation": {
"type": "boolean"
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ def generateRandomVulnerability():
vulnerability['severity'] = random.choice(['Low','Medium','High','Critical'])
vulnerability['published_at'] = generateRandomDate(2000)
vulnerability['detected_at'] = generateRandomDate(180)
vulnerability['under_evaluation'] = random.choice([True, False])
return(vulnerability)

def generateRandomWazuh():
wazuh = {}
wazuh['cluster'] = {'name':random.choice(['wazuh.manager', 'wazuh']), 'node':random.choice(['master','worker-01','worker-02','worker-03'])}
wazuh['vulnerability'] = {'under_evaluation': random.choice([True, False])}
return(wazuh)

def generateRandomData(number):
Expand Down
Loading