From f8d4b822f5e79069b71fc5157b3897243e1706a3 Mon Sep 17 00:00:00 2001 From: Hitesh Mahajan Date: Thu, 7 Dec 2023 16:59:35 +0530 Subject: [PATCH] refine cookie storage rule (#369) * refine cookie storage rule * refine cookie storage rule --------- Co-authored-by: Hitesh Mahajan --- rules/sinks/storages/cookiemanager/javascript.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/sinks/storages/cookiemanager/javascript.yaml b/rules/sinks/storages/cookiemanager/javascript.yaml index 4effeac3..972233fe 100644 --- a/rules/sinks/storages/cookiemanager/javascript.yaml +++ b/rules/sinks/storages/cookiemanager/javascript.yaml @@ -9,7 +9,7 @@ sinks: - id: Storages.Web.Cookie.Write name: Web Storage Cookie(Write) patterns: - - "(?i)(.*cookie.*set.*)|(.*setCookie)" + - "(?i)(.*cookie[^{}()]*set.*)|(.*:setcookie)" tags: - id: Storages.Web.Cookie.Delete @@ -48,4 +48,4 @@ sinks: name: Web SessionStorage(Read) patterns: - "(?i)(\\bstorage\\b|sessionstorage)(.*)(getItem)" - tags: \ No newline at end of file + tags: