OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[GHA] CVS-196141 bandit audit fix (#38683)
Jakub Koniuszewski960628d3f602
diff --git a/.github/scripts/npu_cip_notify_teams.py b/.github/scripts/npu_cip_notify_teams.pyindex dad57e129c8..15b46791f1a 100644--- a/.github/scripts/npu_cip_notify_teams.py+++ b/.github/scripts/npu_cip_notify_teams.py@@ -17,6 +17,7 @@ import jsonimport osimport sysimport urllib.error+import urllib.parseimport urllib.request@@ -78,6 +79,8 @@ def main() -> None:if entities:payload["msteams"] = {"entities": entities}+ if urllib.parse.urlsplit(webhook_url).scheme != "https":+ sys.exit("TEAMS_WEBHOOK_URL must use the https scheme.")request = urllib.request.Request(webhook_url,data=json.dumps(payload).encode("utf-8"),@@ -85,7 +88,7 @@ def main() -> None:method="POST",)try:- with urllib.request.urlopen(request) as response:+ with urllib.request.urlopen(request) as response: # nosec B310 - scheme restricted to https aboveprint(f"Teams webhook responded with HTTP {response.status}")except urllib.error.HTTPError as error:sys.exit(f"Teams webhook failed with HTTP {error.code}: {error.read().decode('utf-8', 'replace')}")