From 36db0d67df581dd49b07c8d6d729923f3563fc8f Mon Sep 17 00:00:00 2001 From: hiaashna Date: Fri, 6 Jan 2023 18:48:40 +0530 Subject: [PATCH 1/5] added and modified a rule --- rules/sinks/leakages/logs/java.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rules/sinks/leakages/logs/java.yaml b/rules/sinks/leakages/logs/java.yaml index 1c34fea3..3748938e 100644 --- a/rules/sinks/leakages/logs/java.yaml +++ b/rules/sinks/leakages/logs/java.yaml @@ -3,7 +3,7 @@ sinks: - id: Leakages.Log.Error name: Log Error patterns: - - "(?i)(?:org.slf4j.Logger|org.apache.logging.log4j|org.tinylog.Logger|ch.qos.logback|java.util.logging|timber.log.Timber|android.util.Log).*(?:error|severe|fatal|[.]e[:]).*" + - "(?i)(?:org.slf4j.Logger|org.apache.logging.log4j|org.tinylog.Logger|ch.qos.logback|java.util.logging|timber.log.Timber|android.util.Log).*(?:wtf|error|severe|fatal|[.]e[:]).*" tags: - id: Leakages.Log.Warn @@ -29,3 +29,9 @@ sinks: patterns: - "(?i)(java.io.PrintStream|android.util.(?:Log){0,1}Printer).(?:print|println|write).*" tags: + + - id: Leakages.Log.equals + name: Log Equal + patterns: + - "(?i)(?:org.slf4j.Logger).*(?:equals).*" + tags: From 28bab441129adca37f90eda3e3223d0710dfff3e Mon Sep 17 00:00:00 2001 From: Aashna Chourasia <121782841+hiaashna@users.noreply.github.com> Date: Sat, 7 Jan 2023 11:03:52 +0530 Subject: [PATCH 2/5] Capitalised Equals --- rules/sinks/leakages/logs/java.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/sinks/leakages/logs/java.yaml b/rules/sinks/leakages/logs/java.yaml index 3748938e..f20d601b 100644 --- a/rules/sinks/leakages/logs/java.yaml +++ b/rules/sinks/leakages/logs/java.yaml @@ -30,7 +30,7 @@ sinks: - "(?i)(java.io.PrintStream|android.util.(?:Log){0,1}Printer).(?:print|println|write).*" tags: - - id: Leakages.Log.equals + - id: Leakages.Log.Equals name: Log Equal patterns: - "(?i)(?:org.slf4j.Logger).*(?:equals).*" From 7278d0d04ec0664fba588b1e6289a95073e122a2 Mon Sep 17 00:00:00 2001 From: Aashna Chourasia <121782841+hiaashna@users.noreply.github.com> Date: Thu, 12 Jan 2023 13:04:53 +0530 Subject: [PATCH 3/5] Removed log.equals and added new log --- rules/sinks/leakages/logs/java.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rules/sinks/leakages/logs/java.yaml b/rules/sinks/leakages/logs/java.yaml index f20d601b..dcf1bec2 100644 --- a/rules/sinks/leakages/logs/java.yaml +++ b/rules/sinks/leakages/logs/java.yaml @@ -30,8 +30,8 @@ sinks: - "(?i)(java.io.PrintStream|android.util.(?:Log){0,1}Printer).(?:print|println|write).*" tags: - - id: Leakages.Log.Equals - name: Log Equal + - id: Leakages.Log.IP + name: IP Address patterns: - - "(?i)(?:org.slf4j.Logger).*(?:equals).*" + - "(?i)(\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b)" tags: From 0bdbb628578e8020aecac186513b949230b0aa6f Mon Sep 17 00:00:00 2001 From: Aashna Chourasia <121782841+hiaashna@users.noreply.github.com> Date: Mon, 16 Jan 2023 10:55:57 +0530 Subject: [PATCH 4/5] removed IP log rule IP log rule is not a sink and its already included in sources --- rules/sinks/leakages/logs/java.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/rules/sinks/leakages/logs/java.yaml b/rules/sinks/leakages/logs/java.yaml index dcf1bec2..e2977a57 100644 --- a/rules/sinks/leakages/logs/java.yaml +++ b/rules/sinks/leakages/logs/java.yaml @@ -29,9 +29,3 @@ sinks: patterns: - "(?i)(java.io.PrintStream|android.util.(?:Log){0,1}Printer).(?:print|println|write).*" tags: - - - id: Leakages.Log.IP - name: IP Address - patterns: - - "(?i)(\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b)" - tags: From 20850a1e446727f93b3e81c3f6cfe4ccf0549151 Mon Sep 17 00:00:00 2001 From: Khemraj Rathore Date: Tue, 24 Jan 2023 17:35:17 +0530 Subject: [PATCH 5/5] add - exclusion rule for WEB-INF application.properties --- config/exclusions/java.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/exclusions/java.yaml b/config/exclusions/java.yaml index 0e402ce4..2b426343 100644 --- a/config/exclusions/java.yaml +++ b/config/exclusions/java.yaml @@ -3,6 +3,11 @@ exclusions: name: Exclude test source code patterns: - "(.*/src/test/.*)|/Test[A-Z]|Test[.]" + + - id: Exclusions.Invalid.Properties + name: Exclude invalid properties file + patterns: + - ".*/WEB-INF/.*properties" - id: Exclusions.Empty name: Exclude file which cannot be read