blackducksoftware / github-action

Synopsys Detect integration with Github Actions
Apache License 2.0
17 stars 12 forks source link

Blackduck scan failing for .Net 6 project and detect version 7 #21

Open abhinaba-chakraborty-by opened 2 years ago

abhinaba-chakraborty-by commented 2 years ago

I am trying to run blackduck scan as part of a github workflow where my project is built using .Net Version 6.0.2

My blackduck scan step looks like this:

- name: Perform Blackduck Analysis
        uses: blackducksoftware/github-action@v2.2
        with:
          version: 7
          blackduck.url: ${{ secrets.BLACKDUCK_URL }}
          blackduck.api.token: ${{ secrets.BLACKDUCK_TOKEN }}
          args: --detect.project.name="${{ env.BLACKDUCK_PROJECT_NAME }}"
            --detect.blackduck.signature.scanner.upload.source.mode=false
            --detect.project.version.name="${{ env.BLACKDUCK_PROJ_VERSION }}"
            --detect.wait.for.results=false
            --logging.level.com.synopsys.integration=DEBUG
            --detect.risk.report.pdf=false
            --detect.timeout=3600
            --detect.detector.search.depth=9
            --detect.project.codelocation.unmap=true

With this , I am getting error during scan stating

2022-02-26 16:56:53 UTC DEBUG [main-Executable_Stream_Thread] --- It was not possible to find any compatible framework version
2022-02-26 16:56:53 UTC DEBUG [main-Executable_Stream_Thread] --- The framework 'Microsoft.NETCore.App', version '2.0.0' (x64) was not found.
2022-02-26 16:56:53 UTC DEBUG [main-Executable_Stream_Thread] ---   - The following frameworks were found:
2022-02-26 16:56:53 UTC DEBUG [main-Executable_Stream_Thread] ---       6.0.2 at [/home/runner/.dotnet/shared/Microsoft.NETCore.App]
2022-02-26 16:56:53 UTC DEBUG [main-Executable_Stream_Thread] --- 
2022-02-26 16:56:53 UTC DEBUG [main-Executable_Stream_Thread] --- You can resolve the problem by installing the specified framework and/or SDK.
2022-02-26 16:56:53 UTC DEBUG [main-Executable_Stream_Thread] --- 
2022-02-26 16:56:53 UTC DEBUG [main-Executable_Stream_Thread] --- The specified framework can be found at:
2022-02-26 16:56:53 UTC DEBUG [main-Executable_Stream_Thread] ---   - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.0.0&arch=x64&rid=ubuntu.20.04-x64
2022-02-26 16:56:53 UTC INFO  [main] --- Process return code: 150
2022-02-26 16:56:53 UTC DEBUG [main] --- ------------------------------------------------------------------------------------------------------
2022-02-26 16:56:53 UTC DEBUG [main] --- Finished extraction: EXCEPTION

So I tried to install .Net Core v2.0.0 also , but then getting different error

2022-02-26 17:11:36 UTC DEBUG [main-Executable_Stream_Thread] --- Registering MSBuild defaults.
2022-02-26 17:11:36 UTC DEBUG [main-Executable_Stream_Thread] --- No usable version of the libssl was found
2022-02-26 17:11:36 UTC INFO  [main] --- Process return code: 134
2022-02-26 17:11:36 UTC DEBUG [main] --- ------------------------------------------------------------------------------------------------------
2022-02-26 17:11:36 UTC DEBUG [main] --- Finished extraction: EXCEPTION
2022-02-26 17:11:36 UTC DEBUG [main] --- Code locations found: 0
2022-02-26 17:11:36 UTC DEBUG [main] --- Exception: DetectableException: Executing the nuget inspector failed: 134
2022-02-26 17:11:36 UTC DEBUG [main] --- Details: 

com.synopsys.integration.detectable.detectable.exception.DetectableException: Executing the nuget inspector failed: 134
    at com.synopsys.integration.detectable.detectables.nuget.NugetInspectorExtractor.executeTarget(NugetInspectorExtractor.java:93) ~[detectable-7.11.1.jar!/:na]

Any idea what I am missing here or how should I solve this issue?

JeroenKnoops commented 2 years ago

I've got the same problems. Scanner seems to work on 3.0 and 3.1 but not on 6.x

.NET 6 is now LTS since 8 march 2022: https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core

dawid-burek-maersk commented 2 years ago

Apparently it was fixed in v7.13.0.

Try using: detect-version: '7.13.0'