我正在尝试将黑鸭扫描作为 Github 工作流程的一部分运行,在该工作流程中,我的项目是使用 .Net 版本 6.0.2 构建的。
我的黑鸭扫描步骤如下:
- 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
我遇到了一个问题,在扫描过程中出现了错误。
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
我尝试安装 .Net Core v2.0.0 和 v6.0.2(使用v6构建项目),但出现不同的错误。
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]
请问我错过了什么,或者应该如何解决这个问题?
附言:我的项目不能使用 .Net 2.x 构建,它的结构看起来像这样:
.
├── 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