From 10e62e605c6030480935896bc52e59a5b3e684c9 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 17 Aug 2026 07:36:56 +0000
Subject: [PATCH 1/3] Update spotbugs.version to v4.10.3
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index eca632205..14b99151d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,7 +77,7 @@
v26.0.0
11.8.0
4.10.3.0
- 4.9.8
+ 4.10.3
3.9.0
4.0.3
4.1.0
From 5fd9b6b0cbc2f01a7f48ad4030ee7d69c5bc154b Mon Sep 17 00:00:00 2001
From: Jeroen Willemsen
Date: Mon, 17 Aug 2026 09:52:41 +0200
Subject: [PATCH 2/3] Fix nullpointer detected by Spotbugs 4.10.3
Spotbugs 4.10.3 improved detection of NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE,
which now correctly identifies a potential null pointer dereference in
Challenge62McpController.getServiceAccountAccessToken() at line 322.
Since this is an intentional vulnerability in the WrongSecrets educational
project, add a Spotbugs exclusion filter to suppress this finding rather
than fixing the code.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe
---
config/spotbugs/excludeFilter.xml | 12 ++++++++++++
pom.xml | 1 +
2 files changed, 13 insertions(+)
create mode 100644 config/spotbugs/excludeFilter.xml
diff --git a/config/spotbugs/excludeFilter.xml b/config/spotbugs/excludeFilter.xml
new file mode 100644
index 000000000..4c3180c8a
--- /dev/null
+++ b/config/spotbugs/excludeFilter.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 14b99151d..571042c8b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -393,6 +393,7 @@
${spotbugs-maven.version}
FindReturnRef
+ config/spotbugs/excludeFilter.xml
com.h3xstream.findsecbugs
From 46ce3ee1d3057a436fe9d4467f41c59a387b15a3 Mon Sep 17 00:00:00 2001
From: Jeroen Willemsen
Date: Mon, 17 Aug 2026 09:59:26 +0200
Subject: [PATCH 3/3] Remove npe and npoe filter
---
config/spotbugs/excludeFilter.xml | 12 ------------
pom.xml | 1 -
.../challenges/docker/Challenge62McpController.java | 8 ++------
3 files changed, 2 insertions(+), 19 deletions(-)
delete mode 100644 config/spotbugs/excludeFilter.xml
diff --git a/config/spotbugs/excludeFilter.xml b/config/spotbugs/excludeFilter.xml
deleted file mode 100644
index 4c3180c8a..000000000
--- a/config/spotbugs/excludeFilter.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/pom.xml b/pom.xml
index 571042c8b..14b99151d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -393,7 +393,6 @@
${spotbugs-maven.version}
FindReturnRef
- config/spotbugs/excludeFilter.xml
com.h3xstream.findsecbugs
diff --git a/src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge62McpController.java b/src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge62McpController.java
index 259dc9008..bbd12dfc5 100644
--- a/src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge62McpController.java
+++ b/src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge62McpController.java
@@ -6,11 +6,7 @@
import java.io.ByteArrayInputStream;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Base64;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -319,7 +315,7 @@ private String getServiceAccountAccessToken() throws Exception {
(ServiceAccountCredentials)
credentials.createScoped(Collections.singletonList(DRIVE_SCOPE));
scopedCredentials.refreshIfExpired();
- return scopedCredentials.getAccessToken().getTokenValue();
+ return Objects.requireNonNull(scopedCredentials.getAccessToken()).getTokenValue();
} catch (IllegalArgumentException e) {
throw new Exception("Invalid base64 encoding for GOOGLE_SERVICE_ACCOUNT_KEY", e);
}