From 40ab7da7ed787a8e958c1c621c0478d8e7ff0878 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Thu, 9 Oct 2025 14:49:00 +0000 Subject: [PATCH] fix(data/clients/git): more strictly match the git client Signed-off-by: Xe Iaso --- data/clients/git.yaml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/data/clients/git.yaml b/data/clients/git.yaml index 4fba66b7..f6296f3b 100644 --- a/data/clients/git.yaml +++ b/data/clients/git.yaml @@ -2,13 +2,19 @@ action: ALLOW expression: all: - - > - ( - userAgent.startsWith("git/") || - userAgent.contains("libgit") || - userAgent.startsWith("go-git") || - userAgent.startsWith("JGit/") || - userAgent.startsWith("JGit-") - ) - - '"Git-Protocol" in headers' - - headers["Git-Protocol"] == "version=2" \ No newline at end of file + - > + ( + userAgent.startsWith("git/") || + userAgent.contains("libgit") || + userAgent.startsWith("go-git") || + userAgent.startsWith("JGit/") || + userAgent.startsWith("JGit-") + ) + - '"Accept" in headers' + - headers["Accept"] == "*/*" + - '"Cache-Control" in headers' + - headers["Cache-Control"] == "no-cache" + - '"Pragma" in headers' + - headers["Pragma"] == "no-cache" + - '"Accept-Encoding" in headers' + - headers["Accept-Encoding"].contains("gzip")