亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

無法在 Maven 中獲得依賴項檢查報告

無法在 Maven 中獲得依賴項檢查報告

慕碼人8056858 2021-12-10 15:44:47
我正在嘗試獲取我的 Maven 項目之一的依賴項檢查報告,但每次運行時:mvn verify依賴關系報告中的依賴關系顯示沒有易受攻擊的 JAR。我在 POM 中添加了以下插件以生成依賴項檢查報告: <dependencyManagement>    <dependencies>        <dependency>        <groupId>org.apache.commons</groupId>        <artifactId>commons-email</artifactId>        <version>1.1</version>    </dependency>        <dependency>            <groupId>apache.axis</groupId>            <artifactId>jaxrpc</artifactId>            <version>1.2beta</version>            <scope>provided</scope>        </dependency>       <dependencies><dependencyManagement><build>  <plugins>    <plugin>          <groupId>org.owasp</groupId>          <artifactId>dependency-check-maven</artifactId>          <version>3.3.2</version>          <executions>              <execution>                  <goals>                      <goal>check</goal>                  </goals>              </execution>          </executions>        </plugin>  </plugins>我需要糾正什么或有其他方法嗎?commons-email-1.1.jar有一些漏洞,但仍然沒有被檢測到。這些是 Maven 日志:[INFO] Scanning for projects...[INFO] Inspecting build with total of 1 modules...[INFO] Installing Nexus Staging features:[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin[INFO][INFO][INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ version-mana -  --[INFO][INFO] --- maven-source-plugin:2.4:jar-no-fork (attach-sources) @ version-  mana ---[INFO][INFO] --- maven-source-plugin:2.4:test-jar-no-fork (attach-sources) @ version-mana ---[INFO]
查看完整描述

2 回答

?
搖曳的薔薇

TA貢獻1793條經驗 獲得超6個贊

如果您有權訪問 maven 存儲庫(在執行此命令時)并安裝了 mvn/mvnw ,則可以從命令行執行此行。

mvn org.owasp:dependency-check-maven:5.2.2:check

“dependency-check-report.html”報告將在目標文件夾中生成。


查看完整回答
反對 回復 2021-12-10
?
慕的地10843

TA貢獻1785條經驗 獲得超8個贊

出于興趣,我嘗試了它,對我來說它正在工作:


<project>

    <modelVersion>4.0.0</modelVersion>

    <groupId>test</groupId>

    <artifactId>test</artifactId>

    <version>1.0</version>


    <dependencies>

        <dependency>

            <groupId>org.apache.commons</groupId>

            <artifactId>commons-email</artifactId>

            <version>1.1</version>

        </dependency>

    </dependencies>


    <build>

        <plugins>

            <plugin>

                <groupId>org.owasp</groupId>

                <artifactId>dependency-check-maven</artifactId>

                <version>3.3.3</version>

                <executions>

                    <execution>

                        <goals>

                            <goal>check</goal>

                        </goals>

                    </execution>

                </executions>

            </plugin>

        </plugins>

    </build>

</project>

依賴檢查 Maven 告訴我:


[INFO] Analysis Complete (1 seconds)

[WARNING] 


One or more dependencies were identified with known vulnerabilities in test:


commons-email-1.1.jar (org.apache.commons:commons-email:1.1, cpe:/a:apache:commons_email:1.1) : CVE-2017-9801, CVE-2018-1294



See the dependency-check report for more details.

您的依賴項部分看起來如何?例如,如果您為 commons-email 定義范圍測試,則不會顯示警告


查看完整回答
反對 回復 2021-12-10
  • 2 回答
  • 0 關注
  • 322 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號