google / tsunami-security-scanner

Tsunami is a general purpose network security scanner with an extensible plugin system for detecting high severity vulnerabilities with high confidence.
Apache License 2.0
8.2k stars 881 forks source link

SSLHandshake Exception during build #70

Closed turkmenkaan closed 8 months ago

turkmenkaan commented 3 years ago

When I use docker build -t tsunami . to build the scanner on a MacOS Catalina Docker Host Machine, I get an error in the build stage with the following error message

 > [ 6/15] RUN chmod +x build_all.sh     && ./build_all.sh:
#9 347.0
#9 347.0 Building detectors/credentials/ncrack ...
#9 616.1 Downloading https://services.gradle.org/distributions/gradle-6.5-bin.zip
#9 1027.8
#9 1030.7 Exception in thread "main" javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
#9 1033.4   at java.base/sun.security.ssl.SSLSocketImpl.handleEOF(SSLSocketImpl.java:1659)
#9 1033.4   at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1468)
#9 1033.4   at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1368)
#9 1033.4   at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:437)
#9 1033.4   at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
#9 1033.4   at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:171)
#9 1033.4   at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1587)
#9 1033.4   at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1515)
#9 1033.4   at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
#9 1033.4   at org.gradle.wrapper.Download.downloadInternal(Download.java:83)
#9 1033.4   at org.gradle.wrapper.Download.download(Download.java:66)
#9 1033.4   at org.gradle.wrapper.Install$1.call(Install.java:68)
#9 1033.4   at org.gradle.wrapper.Install$1.call(Install.java:48)
#9 1033.4   at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
#9 1033.4   at org.gradle.wrapper.Install.createDist(Install.java:48)
#9 1033.4   at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
#9 1033.4   at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
#9 1033.4   Suppressed: java.net.SocketException: Broken pipe
#9 1033.4       at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:421)
#9 1033.4       at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:441)
#9 1033.4       at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:825)
#9 1033.4       at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1007)
#9 1033.4       at java.base/sun.security.ssl.SSLSocketOutputRecord.encodeAlert(SSLSocketOutputRecord.java:82)
#9 1033.4       at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:355)
#9 1033.4       at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:267)
#9 1033.4       at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:440)
#9 1033.4       ... 13 more
#9 1033.4 Caused by: java.io.EOFException: SSL peer shut down incorrectly
#9 1033.4   at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:167)
#9 1033.4   at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:108)
#9 1033.4   at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1460)
#9 1033.4   ... 15 more
------
executor failed running [/bin/sh -c chmod +x build_all.sh     && ./build_all.sh]: exit code: 1
magl0 commented 3 years ago

Hi @turkmenkaan, sorry for late reply! Is this still an issue for you? If so, are you using a proxy?

Meanwhile, FYI we are working on publishing the docker images to gcr.io. Once the work is done you can directly use the public image rather than building it by yourself.

raakasf commented 3 years ago

Hi @magl0 I am facing the same issue. Docker image sounds good, in the meantime if you can send us any pointers as to why we see this issue that would be much appreciated. I am running Ubuntu and not using any proxy. I think it's just that the system doesn't trust that host that's trying to download something?