Debugging Jenkins + Checkmarx Maximum Upload Limit

The problem:

Desirable Outcome:

Issues:

The next issue is locating the place in the Checkmarx plugin source code where the limit was configured. After cloning down the source code, I discovered a configuration setting inside of src/main/resources/com/checkmarx/jenkins/cxconfig.xml and a hard coded entry to assign the value if the configuration file was not accessible in src/main/java/com/checkmarx/jenkins/CxConfig.java. The hard coded value was set to 209715200. I modified this to be 2^32-1 and the plugin would compile successfully. After installing the modified plugin, Jenkins was unable to authenticate to the Checkmarx server and the logs were displaying a WebServiceException. I found a ticket which explained the error and Igor, the maintainer of the Checkmarx plugin, said that they develop in the Master branch. I was to revert to a previous tag (https://issues.jenkins-ci.org/browse/JENKINS-33607?focusedCommentId=268738&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-268738). The functionality to authenticate to the Checkmarx server was regained after switching to the Release_8.1.0-2 branch, modifying the values in the source code and compiling the plugin.

However, when zipping files, Jenkins would immediately throw the error: “error: java.lang.NumberFormatException: For input string: "4294967295".” This is likely due to the fact that Jenkins is doing some sort of type casting from string to int. The int limit in Java is 2147483647 (2^31-1).

Solution:

Final Thoughts:

Comments and suggestions are welcomed at: https://www.reddit.com/r/jenkinsci/comments/53kthh/debugging_jenkins_checkmarx_maximum_upload_limit/