From 40d029914352e500ab05cc3292289cb636e4a9b7 Mon Sep 17 00:00:00 2001 From: jguerreiro Date: Mon, 12 Jul 2021 12:46:57 +0200 Subject: [PATCH] fix(urlib): do not warn if the user knows he's disabling SSL verification --- ggshield/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ggshield/utils.py b/ggshield/utils.py index 1025df3435..b32e516d84 100644 --- a/ggshield/utils.py +++ b/ggshield/utils.py @@ -4,6 +4,7 @@ from typing import Iterable, List, Optional import click +import urllib3 from pygitguardian import GGClient from pygitguardian.models import Match from requests import Session @@ -220,6 +221,7 @@ def retrieve_client(ctx: click.Context) -> GGClient: session = Session() if ctx.obj["config"].allow_self_signed: + urllib3.disable_warnings() session.verify = False return GGClient(