(sigma_rule_query: str)
return sigma_rule_query
Returns a sanatized sigma rule
    Args:
        sigma_rule_query: path to the sigma rule to be parsed
    Returns:
        String of a cleaned string
Returns a sanatized sigma rule
    Args:
        sigma_rule_query: path to the sigma rule to be parsed
    Returns:
        String of a cleaned string
Returns a sanatized sigma rule Args : sigma_rule_query : path to the sigma rule to be parsed Returns : String of a cleaned string
def _sanatize_sigma_rule(sigma_rule_query: str) -> str:
    """Returns a sanatized sigma rule
    Args:
        sigma_rule_query: path to the sigma rule to be parsed
    Returns:
        String of a cleaned string
    """
    # TODO: Investigate how to handle .keyword
    # fields in Sigma.
    # https://github.com/google/timesketch/issues/1199#issuecomment-639475885
    sigma_rule_query = sigma_rule_query.replace('.keyword:', ':')
    sigma_rule_query = sigma_rule_query.replace('\\ ', ' ')
    sigma_rule_query = sigma_rule_query.replace('\"', '"')
    sigma_rule_query = sigma_rule_query.replace('\\:', ':')
    sigma_rule_query = sigma_rule_query.replace('\\-', '-')
    sigma_rule_query = sigma_rule_query.replace('*\\\\', ' *')

    return sigma_rule_query
def _sanatize_sigma_rule ( sigma_rule_query : str ) -> str : # TODO: Investigate how to handle .keyword # fields in Sigma. # https://github.com/google/timesketch/issues/1199#issuecomment-639475885 sigma_rule_query = sigma_rule_query . replace ( '.keyword:' , ':' ) sigma_rule_query = sigma_rule_query . replace ( '\\ ' , ' ' ) sigma_rule_query = sigma_rule_query . replace ( '\"' , '"' ) sigma_rule_query = sigma_rule_query . replace ( '\\:' , ':' ) sigma_rule_query = sigma_rule_query . replace ( '\\-' , '-' ) sigma_rule_query = sigma_rule_query . replace ( '*\\\\' , ' *' ) return sigma_rule_query