JN450653 (Community Member) asked a question.

alldetailedreports action is not getting me the latest build's report when executed with VeracodeC#API wrapper

VeracodeC#API -action alldetailedreports -vid <VeracodeApiId> -vkey <VeracodeApiKey> -outputfolderpath mentioiningThePath -onlylatest true -appid Appid -sandboxid SandboxID -format pdf

The above code is being used from command line to get the reports, The command seems to get executed without showing any errors in the command window but in the output path no report files are being get downloaded. Please let me know about the correct format of "alldetailedreports" action to be used to get the files downloaded.


  • Hello @JN450653 (Community Member)​,

     

    Based upon the listed documentation on the Help Center, it looks like you're including some parameters that aren't supported by the alldetailedreports action. You seem to be including appid and sandboxid values, but the purpose of the call is to download the available reports for the latest build of each application in the user account.

     

    Could you please try running the command again omitting the appid and sandboxid parameters?

    Expand Post
    • JD202445 (Community Member)

      hey Matthew

      java -jar ./VeracodeJavaAPI.jar -action alldetailedreports -vid $vid -vkey $vkey -appid $appid -outputfolderpath ~/temp/veracode

       

      but it does not get anything back in the specified folder

      btw, I got the uploadandscanbyappid and passfail work nicely using the java wrapper..

      thanks

       

      -JD

      Expand Post
      • JD202445 (Community Member)

        with the -debug true

         

        [2021.07.19 11:25:24.111] VeracodeJavaAPI v21.6.8.0 cUnknown

        [2021.07.19 11:25:24.112] Wrapper action: AllDetailedReports

        [2021.07.19 11:25:24.538] Invoking API https://analysiscenter.veracode.com/api/4.0/getappbuilds.do

        [2021.07.19 11:25:24.538] Connecting to host: analysiscenter.veracode.com

        [2021.07.19 11:25:24.962] Writing to request output stream

        [2021.07.19 11:25:24.963] Close request output stream

        [2021.07.19 11:25:24.963] Connecting to response input stream

        [2021.07.19 11:25:25.854] Reading response input stream

        [2021.07.19 11:25:25.857] Close response input stream

        [2021.07.19 11:25:26.074] Wrapper return code 0 = Success

         

        but nothing in the outputfolder ...

        Expand Post
      • Hello,

        I mentioned in my previous post that the appid parameter isn't valid for this action, as the purpose is to download the available reports for the latest build of each application profile accessible to the user that is authenticating.

         

        Could you please try running the command again, but omitting the appid parameter?

        Expand Post
      • JD202445 (Community Member)

        thanks for your reply, Matthew

        $ java -jar ./VeracodeJavaAPI.jar -action alldetailedreports -vid $vid -vkey $vkey -outputfolderpath ./veracode -debug true

        [2021.07.19 12:27:01.319] VeracodeJavaAPI v21.6.8.0 cUnknown

        [2021.07.19 12:27:01.320] Wrapper action: AllDetailedReports

        [2021.07.19 12:27:01.653] Invoking API https://analysiscenter.veracode.com/api/4.0/getappbuilds.do

        [2021.07.19 12:27:01.653] Connecting to host: analysiscenter.veracode.com

        [2021.07.19 12:27:01.957] Writing to request output stream

        [2021.07.19 12:27:01.957] Close request output stream

        [2021.07.19 12:27:01.957] Connecting to response input stream

        [2021.07.19 12:27:03.203] Reading response input stream

        [2021.07.19 12:27:03.205] Close response input stream

        [2021.07.19 12:27:03.335] Wrapper return code 0 = Success

         

        $ ls ./veracode

        # empty folder

         

        I read around, maybe because, all my builds are uploaded to sandboxes... thanks...

        Expand Post
      • That's right. This action was designed to only pull in policy scan results, so unfortunately it's working as intended. Sorry for the confusion!

      • JD202445 (Community Member)

        thanks Matthew for confirming.

        is there a way (or workaround) to pull the report for a scan within a sandbox, somehow our security team is using sandbox for scanning internal builds...

         

Topics (6)

No articles found
Loading

Ask the Community

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