From 5f306d7edca262931c721a9a33e12af6f2120349 Mon Sep 17 00:00:00 2001 From: curo1305 Date: Mon, 13 Apr 2026 23:05:00 +0200 Subject: [PATCH] Suppress noisy pip warnings in pre-commit hook --no-warn-script-location: bandit scripts go to /tmp/.local/bin which is not on PATH, but we invoke via 'python -m bandit' so this is harmless. PIP_DISABLE_PIP_VERSION_CHECK=1: silence the version upgrade notice. Co-Authored-By: Claude Sonnet 4.6 --- .githooks/pre-commit | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 213d207..4159402 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -21,8 +21,9 @@ docker run --rm \ -e STAGED_FILES="$STAGED" \ -u 1001:1001 \ -e HOME=/tmp \ + -e PIP_DISABLE_PIP_VERSION_CHECK=1 \ python:3.12-slim \ - sh -c "pip install --quiet --user bandit && python scripts/security_check.py" + sh -c "pip install --quiet --user --no-warn-script-location bandit && python scripts/security_check.py" EXIT_CODE=$?