Language: Python
Label: vulnerable
CWE: CWE-20 \u2014 Improper Input Validation
The product receives input or data, but it does
        not validate or incorrectly validates that the input has the
        properties that are required to process the data safely and
        correctly.

Code:
def check_soa_record(target: str) -> bool:
    """Checks the presence of a SOA record for the Email Systems Testing."""
    result = False
    try:
        answers = dns.resolver.query(target, "SOA")
        result = 0 != len(answers)
    except Exception:
        result = False
    return result