WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  using binaryScanner for zip files

    Posted Tue February 02, 2021 08:25 AM
    Hello,

    Good Day,

    binaryScanner tool, helps to scan the "war", "ear" files only (based on the tool documentation),  if I want to scan jar file or "zip" files  (I bundled the binaries into zip or jar file), how can I do it, is any tool available for this?

    Thanks,
    Prabakar

    ------------------------------
    PRABAKAR SINGARAM
    ------------------------------


  • 2.  RE: using binaryScanner for zip files

    Posted Tue February 02, 2021 09:28 AM
    Hi Prabakar,
    The binary scanner was created primarily to scan Java EE applications, which is why is supports reading EAR, WAR, and JAR files. 

    The jar tool can be used to create a jar file: https://docs.oracle.com/javase/tutorial/deployment/jar/build.html

    Alternatively, if you are using an IDE to update the code, it might have an export option to create a JAR or WAR file. I have exported selected classes this way.

    ------------------------------
    Cindy High
    IBM
    ------------------------------



  • 3.  RE: using binaryScanner for zip files

    Posted Tue February 02, 2021 09:36 AM
    Edited by PRABAKAR SINGARAM Tue February 02, 2021 09:44 AM
    Hello Cindy,

    Thanks for the reply, just wanted to clarify that my ask is not about how to create the jar file, my question is how to scan the binary files bundled as jar or zip file using binaryScannerTool?  When I tried to scan it throws..."war or ear is not identified" error...that is because it looks for only war and ear file...

    ------------------------------
    PRABAKAR SINGARAM
    ------------------------------



  • 4.  RE: using binaryScanner for zip files
    Best Answer

    Posted Tue February 02, 2021 10:14 AM
    Ah!  Sorry I misunderstood your question.  You will need to scan the JAR file using the --analyze option rather than --all parameter.   The --all parameter only supports scanning EAR and WAR files.

    ------------------------------
    Cindy High
    IBM
    ------------------------------



  • 5.  RE: using binaryScanner for zip files

    Posted Tue February 02, 2021 10:25 AM
    Awesome, thank you Cindy, "--analyze" option fix the issue....thank you so much...


    ------------------------------
    PRABAKAR SINGARAM
    ------------------------------