Blackduck scan failing for .Net 6 project and detect version 7 in Github Workflow

3.3k views Asked by At

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/[email protected]
        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 along with v6.0.2 (building the project using v6) , 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?

P.S My project cannot be built with .Net 2.x and it's structure looks like this

.
├── XYZ
│   ├── XYZ.csproj
│   ├── ABC.cs
│   ├── DEF.cs
│   ├── bin
│   │   └── Debug
│   │       └── net6.0
│   │           ├── XYZ.deps.json
│   │           ├── XYZ.dll
│   │           └── XYZ.pdb
│   └── obj
│       ├── XYZ.csproj.nuget.dgspec.json
│       ├── XYZ.csproj.nuget.g.props
│       ├── XYZ.csproj.nuget.g.targets
│       ├── Debug
│       │   └── net6.0
│       │       ├── XYZ.AssemblyInfo.cs
│       │       ├── XYZ.AssemblyInfoInputs.cache
│       │       ├── XYZ.GeneratedMSBuildEditorConfig.editorconfig
│       │       ├── XYZ.GlobalUsings.g.cs
│       │       ├── XYZ.assets.cache
│       │       ├── XYZ.csproj.AssemblyReference.cache
│       │       ├── XYZ.csproj.CoreCompileInputs.cache
│       │       ├── XYZ.csproj.FileListAbsolute.txt
│       │       ├── XYZ.dll
│       │       ├── XYZ.pdb
│       │       ├── ref
│       │       │   └── XYZ.dll
│       │       └── refint
│       │           └── XYZ.dll
│       ├── project.assets.json
│       └── project.nuget.cache
├── MyProject.sln
├── README.md
1

There are 1 answers

1
dustykiddo On

Synopsys detect currently do not support .Net 6 project. It currently support only upto .Net 5 and .Net 6 in in development.