• 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.

    Expand Post
  • EDerito091563 (Community Member)

    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!

    Expand Post
  • EDerito091563 (Community Member)

    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)

      Expand Post
  • EDerito091563 (Community Member)

    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!

     

    Expand Post
  • 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.

    Expand Post
  • EDerito091563 (Community Member)

    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!

    Expand Post
10 of 18

Topics (3)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.