How to use the dlint.tree.kwarg_str function in dlint

To help you get started, we’ve selected a few dlint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github duo-labs / dlint / dlint / linters / bad_duo_client_use.py View on Github external
def http_or_disable(call, kwarg_name):
            return (
                tree.kwarg_str(call, kwarg_name, "HTTP")
                or tree.kwarg_str(call, kwarg_name, "DISABLE")
            )
github duo-labs / dlint / dlint / linters / bad_onelogin_kwarg_use.py View on Github external
def missing_or_string(s, call, kwarg_name):
            return (
                tree.kwarg_not_present(call, kwarg_name)
                or tree.kwarg_str(call, kwarg_name, s)
            )
github duo-labs / dlint / dlint / linters / bad_itsdangerous_kwarg_use.py View on Github external
def none_string_predicate(call, kwarg_name):
            return tree.kwarg_str(call, kwarg_name, "none")
github duo-labs / dlint / dlint / linters / bad_urllib3_kwarg_use.py View on Github external
def unverified_cert_reqs(call, kwarg_name):
            return tree.kwarg_any([
                functools.partial(
                    tree.kwarg_str,
                    call,
                    kwarg_name,
                    "CERT_NONE"
                ),
                functools.partial(
                    tree.kwarg_str,
                    call,
                    kwarg_name,
                    "NONE"
                ),
                functools.partial(
                    tree.kwarg_module_path,
                    call,
                    kwarg_name,
                    "ssl.CERT_NONE",
                    self.namespace
github duo-labs / dlint / dlint / linters / bad_onelogin_kwarg_use.py View on Github external
def insecure_algorithm(call, kwarg_name):
            return tree.kwarg_any([
                functools.partial(
                    tree.kwarg_str,
                    call,
                    kwarg_name,
                    "http://www.w3.org/2000/09/xmldsig#sha1"
                ),
                functools.partial(
                    tree.kwarg_str,
                    call,
                    kwarg_name,
                    "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
                ),
                functools.partial(
                    tree.kwarg_str,
                    call,
                    kwarg_name,
                    "http://www.w3.org/2000/09/xmldsig#dsa-sha1"
                ),
                functools.partial(
                    tree.kwarg_module_path,
                    call,
                    kwarg_name,
                    "onelogin.saml2.constants.OneLogin_Saml2_Constants.SHA1",
                    self.namespace
                ),
                functools.partial(
                    tree.kwarg_module_path,
                    call,
                    kwarg_name,
                    "onelogin.saml2.constants.OneLogin_Saml2_Constants.RSA_SHA1",
github duo-labs / dlint / dlint / linters / bad_urllib3_kwarg_use.py View on Github external
def unverified_cert_reqs(call, kwarg_name):
            return tree.kwarg_any([
                functools.partial(
                    tree.kwarg_str,
                    call,
                    kwarg_name,
                    "CERT_NONE"
                ),
                functools.partial(
                    tree.kwarg_str,
                    call,
                    kwarg_name,
                    "NONE"
                ),
                functools.partial(
                    tree.kwarg_module_path,
                    call,
                    kwarg_name,
                    "ssl.CERT_NONE",
                    self.namespace
                ),
github duo-labs / dlint / dlint / linters / bad_duo_client_use.py View on Github external
def http_or_disable(call, kwarg_name):
            return (
                tree.kwarg_str(call, kwarg_name, "HTTP")
                or tree.kwarg_str(call, kwarg_name, "DISABLE")
            )
github duo-labs / dlint / dlint / linters / bad_onelogin_kwarg_use.py View on Github external
def insecure_algorithm(call, kwarg_name):
            return tree.kwarg_any([
                functools.partial(
                    tree.kwarg_str,
                    call,
                    kwarg_name,
                    "http://www.w3.org/2000/09/xmldsig#sha1"
                ),
                functools.partial(
                    tree.kwarg_str,
                    call,
                    kwarg_name,
                    "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
                ),
                functools.partial(
                    tree.kwarg_str,
                    call,
                    kwarg_name,
                    "http://www.w3.org/2000/09/xmldsig#dsa-sha1"
                ),
                functools.partial(
                    tree.kwarg_module_path,
                    call,
                    kwarg_name,
                    "onelogin.saml2.constants.OneLogin_Saml2_Constants.SHA1",
                    self.namespace