AParida (Community Member) asked a question.

SCA agent scan Jar File

While doing SCA Agent scan for a jar file, we are getting error as 'com.sourceclear.agent.FatalException: Unable to collect Git metadata\nVeracode SCA only supports git repos and requires an executable git to be on the PATH'. 

 

But as per SCA agent scan doc: --scan-collectors - Specify which build types to scan, rather than scanning all discovered build systems by default. Configuration options are: pip, maven, gradle, npm, gem, ant, bower, jar, yarn, cocoapods, sbt, "go get", godep, govendor, glide, ivy, trash, composer, MSBuildDotNet

 

The command we are using is: curl -sSL https://download.sourceclear.com/ci.sh | bash -s -- scan --scan-collectors "jar" --debug --json scaresults.json

 

Anything we are missing here for scanning the jar?


  • Hello @AParida (Community Member)​ ,

     

    GIT is required in order to run scans or you can set SCM variables. If you are sure it is git, the git files may just exist elsewhere in the repo and you can add this parameter to see if it helps: --recursive

     

    There is a Knowledgebase Article, SourceClear Error: Unable to collect Git metadata that I would also read to see if the information provided in it can assist you in the issue.

     

    Jason

    Veracode Support Engineer

    Expand Post
    Selected as Best
  • Hello @AParida (Community Member)​ ,

     

    GIT is required in order to run scans or you can set SCM variables. If you are sure it is git, the git files may just exist elsewhere in the repo and you can add this parameter to see if it helps: --recursive

     

    There is a Knowledgebase Article, SourceClear Error: Unable to collect Git metadata that I would also read to see if the information provided in it can assist you in the issue.

     

    Jason

    Veracode Support Engineer

    Expand Post
    Selected as Best
    • AParida (Community Member)

      Hi Jason, I tried with the option --recursive. But that did not work. Do you have any documentation link which I can follow please?

      • @AParida (Community Member)​ ,

         

        If the parameter, along with the knowledge article didn't resolve the issue, I would recommend you contact our technical support team to help you troubleshoot the issue.

         

        Here's how you can log a case:

        1. Navigate to the upper right corner of any page in the Community, click on your user avatar.
        2. Select Contact Support from the drop-down menu.

         

        Jason

        Veracode Support Engineer

        Expand Post
      • AParida (Community Member)

        Hi Jason, I tried scanning my repository instead of the Jar file and it worked fine. Thanks for the documentation.

Topics (4)

No articles found
Loading

Ask the Community

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