Blackduck 扫描 .Net 6 项目失败并在 Github 工作流程中检测到版本 7

发布于 2025-01-10 05:49:32 字数 5168 浏览 2 评论 0原文

我正在尝试将 blackduck 扫描作为 github 工作流程的一部分运行,其中我的项目是使用 .Net 版本 6.0.2 构建的。

我的 blackduck 扫描步骤如下所示:

- 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

有了这个,我在扫描期间遇到错误,说明

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]

知道我在这里缺少什么或者我应该如何解决这个问题吗?

PS 我的项目无法使用 .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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

骷髅 2025-01-17 05:49:32

Synopsys检测当前不支持.Net 6项目
目前,它仅支持开发中的 .Net 5 和 .Net 6。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文