From f76c9b621ff67f16a880a9b68bd94eb6a5554431 Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 17 Apr 2025 11:58:35 +0100 Subject: [PATCH] fix(ssh): correct logic to filter ssh client calls --- ssh/ssh_blocker.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ssh/ssh_blocker.sh b/ssh/ssh_blocker.sh index 3968c24..a551208 100644 --- a/ssh/ssh_blocker.sh +++ b/ssh/ssh_blocker.sh @@ -1,3 +1,9 @@ #!/bin/bash -echo "❌ SSH access to $1:$2 is blocked by company policy." -exit 1 +# Example: block push or connections to some hosts + +if [[ "$*" != *"gitea"* ]]; then + echo "❌ Outbound SSH is restricted" + exit 1 +fi + +exit 0