java - 如何进行 OWASP 依赖检查-Maven
问题描述
我是 Maven 的新手,我被告知要对其进行安全分析。我已经读过检查它的最佳方法是通过依赖性检查。我们的老师给了我们一个执行分析的 POM 文件。但是,如果我检查报告,我看不到任何错误1 。
这是该项目的 POM 文件:
<modelVersion>4.0.0</modelVersion>
<groupId>TOP</groupId>
<artifactId>ExpositoTOP</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Exposito</name>
<!-- FIXME change it to the project's website -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.10</maven.compiler.source>
<maven.compiler.target>1.10</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.1</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>6.0.3</version>
<reportSets>
<reportSet>
<reports>
<report>aggregate</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
<build>
<pluginManagement>
<!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
我应该如何编辑 POM 文件以便执行检查?
解决方案
推荐阅读
- html - 渲染 PDF 错误字体粗细。只有或正在显示,其他是块
- javascript - 使用打字稿功能的Angular 6路由
- c - 当我从另一个链表中删除节点时,为什么我的链表值从另一个链表中被删除?
- java - 我将如何在我的代码中使用抽象类或接口来减少重复?
- jquery - Ajax 提交表单与 jquery 未验证
- reactjs - 如何在反应组件中找出道具是否是节点?
- python - 需要了解如何将数据分解为同一图表上的 2 条单独的线
- android - 在 Unity 奖励视频广告后打开 AppCompatDialogFragment 时出现错误/崩溃
- java - 如何修复新版本的 java 与 windows 10 和 libgdx 一起使用?
- lambda - 我们如何为 java8 函数、谓词、双函数做 junit