Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

com.h3xstream.findsecbugs.password.GoogleApiKeyDetector java.lang.NullPointerException #28

Closed
PeterLenahan opened this issue Jan 5, 2018 · 4 comments

Comments

@PeterLenahan
Copy link

The warning at the bottom says out of memory, but that there are 2 GB free

/home/java/java_bin/findbugs/spotbugs-3.1.0/bin/spotbugs -textui -exclude /home/java/gen/HEAD/spotbugs_ignore.xml -property findbugs.refcomp.reportAll=true -property findbugs.de.comment=true -property findbugs.sf.comment=true -maxHeap 4096 -output /home/java/gen/HEAD/spotbugs.htm -auxclasspath .:/home/java/source/HEAD/work/jar_classes:/home/java/source/HEAD/work/jar_classes17:/home/java/source/HEAD/work/jar_classes_servlet:::/home/tomcat/apache-tomcat-8.5.23/lib/annotations-api.jar:/home/tomcat/apache-tomcat-8.5.23/lib/catalina-ant.jar:/home/tomcat/apache-tomcat-8.5.23/lib/catalina-ha.jar:/home/tomcat/apache-tomcat-8.5.23/lib/catalina-storeconfig.jar:/home/tomcat/apache-tomcat-8.5.23/lib/catalina-tribes.jar:/home/tomcat/apache-tomcat-8.5.23/lib/catalina.jar:/home/tomcat/apache-tomcat-8.5.23/lib/ecj-4.6.3.jar:/home/tomcat/apache-tomcat-8.5.23/lib/el-api.jar:/home/tomcat/apache-tomcat-8.5.23/lib/jasper-el.jar:/home/tomcat/apache-tomcat-8.5.23/lib/jasper.jar:/home/tomcat/apache-tomcat-8.5.23/lib/jaspic-api.jar:/home/tomcat/apache-tomcat-8.5.23/lib/jsp-api.jar:/home/tomcat/apache-tomcat-8.5.23/lib/servlet-api.jar:/home/tomcat/apache-tomcat-8.5.23/lib/tomcat-api.jar:/home/tomcat/apache-tomcat-8.5.23/lib/tomcat-coyote.jar:/home/tomcat/apache-tomcat-8.5.23/lib/tomcat-dbcp.jar:/home/tomcat/apache-tomcat-8.5.23/lib/tomcat-i18n-es.jar:/home/tomcat/apache-tomcat-8.5.23/lib/tomcat-i18n-fr.jar:/home/tomcat/apache-tomcat-8.5.23/lib/tomcat-i18n-ja.jar:/home/tomcat/apache-tomcat-8.5.23/lib/tomcat-jdbc.jar:/home/tomcat/apache-tomcat-8.5.23/lib/tomcat-jni.jar:/home/tomcat/apache-tomcat-8.5.23/lib/tomcat-util-scan.jar:/home/tomcat/apache-tomcat-8.5.23/lib/tomcat-util.jar:/home/tomcat/apache-tomcat-8.5.23/lib/tomcat-websocket.jar:/home/tomcat/apache-tomcat-8.5.23/lib/websocket-api.jar -html /home/java/source/HEAD/work/tomcat85/classes17_output /home/java/source/HEAD/classes
The following errors occurred during analysis:
Exception analyzing com.ibi.ibfs.objects.IBFSPropertyNames using detector com.h3xstream.findsecbugs.password.GoogleApiKeyDetector
java.lang.NullPointerException
At com.h3xstream.findsecbugs.password.GoogleApiKeyDetector.visitClassContext(GoogleApiKeyDetector.java:81)
At edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76)
At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1079)
At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:280)
At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:401)
At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1187)
Exception analyzing com.ibi.webapp.security.WFCorsFilter using detector com.h3xstream.findsecbugs.PermissiveCORSDetector
java.lang.NullPointerException
At com.h3xstream.findsecbugs.PermissiveCORSDetector.analyzeMethod(PermissiveCORSDetector.java:86)
At com.h3xstream.findsecbugs.PermissiveCORSDetector.visitClassContext(PermissiveCORSDetector.java:57)
At edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76)
At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1079)
At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:280)
At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:401)
At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1187)

Out of memory
Total memory: 3817M
free memory: 2421M
Analyzed: /home/java/source/HEAD/work/tomcat85/classes17_output
Analyzed: /home/java/source/HEAD/classes

@vorburger
Copy link

@PeterLenahan it looks to me that this NPE at com.h3xstream.findsecbugs.password.GoogleApiKeyDetector.visitClassContext(GoogleApiKeyDetector.java:81) and at com.h3xstream.findsecbugs.PermissiveCORSDetector.analyzeMethod(PermissiveCORSDetector.java:86) should be filed in the https://github.com/find-sec-bugs/find-sec-bugs/ instead of this (SpotBugs) project, no? Perhaps you could even debug and contribute a fix to that project there... and IMHO this issue should be closed on this project.

@PeterLenahan
Copy link
Author

PeterLenahan commented Jan 8, 2018 via email

@PeterLenahan
Copy link
Author

I will follow your suggestion,
thanks,
Peter

@PeterLenahan
Copy link
Author

PeterLenahan commented Jan 9, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants