Closed thezim closed 4 years ago
Okay here is the deal. fortify-plugin
uses ssc-restapi-client which in turn uses okhttp. okhttp
default read timeout is 10s and neither fortify-plugin
or ssc-restapi-client
has functionality to pass timeouts down the call stack to okhttp
.
As a proof I modified ssc-restapi-client
with at hard coded timeout set and injected the new jar in to the plugin and it now works.
This plugin should support passing of timeouts for the web calls (ssc-restapi-client
too) as 10s simply isn't enough time especially across the internet or large FPRs.
I am encountering the same issue uploading an ~25 MB file.
I took a look at the proposed PR (https://github.com/fortify/ssc-restapi-client/pull/4) for ssc-restapi-client and believe this should be fixed directly in the Fortify Jenkins plugin. I modified the com.fortify.plugin/jenkins/fortify.client.ApiClientWrapper class's constructor to specify connect and read timeouts by calling the following methods:
I also modified the the plugin so that these values could be specified via pipeline. The modified code is attached and i have verified that the input values is used and that setting a larger value solves this problem.
@tvanhill Do you have a PR for this yet?
I did not open pull request as I saw the pull request linked below. I attached the updated source to that pull request and the author was going to test with it.
We are receiving read timeout errors when during the upload step. The strange part is that on the SSC server the FPR upload is successfully and it is processed correctly once there. Note that this only occurs for larger FPRs with more issues.