Skip to content

Commit

Permalink
fix: change logging level in VD functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Rebits committed Feb 29, 2024
1 parent 50c33e4 commit 6f3fe36
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ def check_vulnerability_alerts(results: Dict, check_data: Dict, current_datetime
vulnerability_alerts_mitigated = {}
vulnerability_index = {}


for agent in host_manager.get_group_hosts('agent'):

agent_all_alerts = parse_vulnerability_detector_alerts(get_indexer_values(host_manager,
greater_than_timestamp=current_datetime,
agent=agent)['hits']['hits'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def check_vuln_state_consistency(vulnerabilities_alerts, vulnerabilities_states)
for agent, vuln_alerts in vulnerabilities_alerts.items():
for vuln_alert in vuln_alerts:
if agent != vuln_alert['_source']['agent']['name']:
logging.error("Agent name is not the same as the agent in the alert")
logging.critical("Agent name is not the same as the agent in the alert")
alert_agent = vuln_alert['_source']['agent']['name']
alert_cve = vuln_alert['_source']['data']['vulnerability']['cve']
alert_package_version = vuln_alert['_source']['data']['vulnerability']['package']['version']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -830,5 +830,5 @@ def test_vulnerability_detector_scans_cases(self, setup_vulnerability_tests, req
results[test_name] = test_result

logger.critical("Final Results")

assert success_for_all_agents is True, "Test failed. Check logs for more information"

0 comments on commit 6f3fe36

Please sign in to comment.