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

🐛 whitehat sentinel fix mitigated tzinfo attribute #9872

Merged
merged 1 commit into from
Apr 8, 2024
Merged
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
4 changes: 3 additions & 1 deletion dojo/tools/whitehat_sentinel/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
import re
from typing import Union, List

from datetime import datetime
from dojo.models import Finding, Endpoint


Expand Down Expand Up @@ -203,6 +203,8 @@ def _convert_whitehat_sentinel_vulns_to_dojo_finding(
for whitehat_vuln in whitehat_sentinel_vulns:
date_created = whitehat_vuln["found"].split("T")[0]
mitigated_ts = whitehat_vuln.get("closed".split("T")[0], None)
if mitigated_ts is not None:
mitigated_ts = datetime.strptime(mitigated_ts, "%Y-%m-%dT%H:%M:%SZ")
cwe = self._parse_cwe_from_tags(
whitehat_vuln["attack_vectors"][0].get("scanner_tags", [])
)
Expand Down
Loading