From b3ec4ad85dcc24133022ca8f8d231de90e4da9cc Mon Sep 17 00:00:00 2001 From: Daniel D'Avella Date: Thu, 11 Jul 2024 16:16:14 -0400 Subject: [PATCH] Skip SensitiveDataLoggingCodemod when LLM not available --- .../io/codemodder/codemods/SensitiveDataLoggingCodemod.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core-codemods/src/main/java/io/codemodder/codemods/SensitiveDataLoggingCodemod.java b/core-codemods/src/main/java/io/codemodder/codemods/SensitiveDataLoggingCodemod.java index 599f0c6fe..6705b00ea 100644 --- a/core-codemods/src/main/java/io/codemodder/codemods/SensitiveDataLoggingCodemod.java +++ b/core-codemods/src/main/java/io/codemodder/codemods/SensitiveDataLoggingCodemod.java @@ -119,6 +119,9 @@ private static Optional getSingleStatement( @Override public boolean shouldRun() { + if (!service.isServiceAvailable()) { + return false; + } List runs = sarif.rawDocument().getRuns(); return runs != null && !runs.isEmpty() && !runs.get(0).getResults().isEmpty(); }