
EDerito091563 (Community Member) asked a question.
Hi, I have a problem with the veracode plugin in jenkins
Jenkins has the option of Fail Job checked and is also active in the stage but not cancel the job.
Can you help me?
Thank you

EDerito091563 (Community Member) asked a question.
Hi, I have a problem with the veracode plugin in jenkins
Jenkins has the option of Fail Job checked and is also active in the stage but not cancel the job.
Can you help me?
Thank you
Ask the Community
Get answers, share a use case, discuss your favorite features, or get input from the community.
By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.
.png)
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Hi @EDerito091563 (Community Member) , thank you for the question. I have passed along your question to our technical support rep and here is the feedback:
"The attached show Error- Returned code from wrapper:4". This error indicates that the scan did not pass policy compliance. This code only applies to an uploadandscan composite action (also run by the wrapper) that specifies the scantimeout parameter of the plugin.
The user would need to check their policy and validate compliance.
There is no cancel scan option available in Jenkins Plugin. If the prescan fails for any reason, they would need to log into the Veracode Platform and review the application's current scans to determine if the previous scan did not successfully complete. A previous scan may still be in progress. If a previous scan is still running due to an error, select Delete. You can then use the plugin to submit a new scan request."
Hope this helps! Let us know if you still have any issue with a scan. Or, if you'd like to go over results of a completed scan, you can schedule a consultation call with our Application Security Consulting team. You can check out this knowledge article on how to schedule a consultation call.
Hi,
May be i did not express my self correctly, what we need to do is cancel the jenkins job when the scan did not pass policy compliance, we don't want to continue to run the other stages of the pipeline if veracode scan fails.
Is there a way to do this?
Thanks in Advance!
Hi @EDerito091563 (Community Member) - here is the feedback from our Support team:
Are you referring to deleting the scan? If so, you can delete an in-progress scan here.
Hi @Shuning, Veracode Community Manager (Veracode) Thanks for your answer. I'm not talking about deleting the scan. What I'm trying to say is that, if the scan fails, the jenkins job shoud stop running. We can't let the jenkins job continue if the veracode scan fails. Can you help me with this?
Thanks in advance
Hi @EDerito091563 (Community Member) - thank you for the follow-up. To clarify, the Veracode scan did not fail, it completed successfully. It was the scan that failed the policy. Your team will need to review why it failed and fix 🙂 Does that make sense?
To understand why the scan failed the policy or to get support in remediation, you can:
1. Schedule a consultation call with our Application Security Team (how to schedule a consultation call) OR
2.Open a support case with scan URL and full Jenkins build log with debug on (how to submit a support case)
Hi Shuning,
We get your point, the scan technically was correct but the code did not pass the policy, We need the jenkins Job to stop when code does not pass the policy, this way we force the developer to fix the code and re-scan.
Does Veracode provide a way to do this or we have to do our own logic in our pipeline.
Thanks in Advance!
Hi @EDerito091563 (Community Member) - Sorry for the confusion. I think we got what you mean. To cancel the job, you will need to log into the Veracode Platform to do it (you can't cancel the job in Jenkins). However, it seems that you're not given the access to the Platform. What you can do is: reach out to either the Veracode admin on your team or your SPM @William, Senior Security Program Manager (Veracode, Inc.) ) from Veracode to provision you a user id with delete scan option OR cancel the request for you.
Hi Shuning,
Still not getting it, but I'm probably asking the wrong way let me make my self clear:
1- We run Veracode from jenkins Step using Veracode Pluginn.
2 - job runs, sends the code to veracode to do the scan
3 - Veracode returns the result of scan: OK or FAIL
4 - Here is the dilema, do we have to code the jenkins step to interpreter the vecaracode exist status? or can we configure the plugin to do this? if policy scan fails we have to stop jenkins job there.
thanks!
HI @EDerito091563 (Community Member) - our support rep has reached out to you by email. He will set up a call with you to get this resolved 🙂
Hi Team,
Do we have solution this issue