Skip to content

Commit

Permalink
Merge pull request #1590 from st1020/fix/vul-status-error
Browse files Browse the repository at this point in the history
fix: vul status error in heartbeat
  • Loading branch information
Bidaya0 authored Jul 12, 2023
2 parents c8f91f6 + d712a5d commit 6a98baa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions dongtai_protocol/report/handler/heartbeat_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from dongtai_common.models.project import VulValidation
from dongtai_common.utils.systemsettings import get_vul_validate
from django.core.cache import cache
from dongtai_web.vul_log.vul_log import log_recheck_vul

logger = logging.getLogger('dongtai.openapi')

Expand Down Expand Up @@ -151,9 +152,12 @@ def get_result(self, msg=None):
IastReplayQueue.objects.filter(id__in=failure_ids).update(
update_time=timestamp, state=const.SOLVED)

IastVulnerabilityModel.objects.filter(
id__in=success_vul_ids).update(latest_time=timestamp,
status_id=2)
log_recheck_vul(
self.agent.user.id,
self.agent.user.username,
success_vul_ids,
"验证中",
)
IastVulnerabilityModel.objects.filter(
id__in=failure_vul_ids).update(latest_time=timestamp,
status_id=1)
Expand Down

0 comments on commit 6a98baa

Please sign in to comment.