Skip to content

Commit c92d38c

Browse files
Adding maven dependency check to identify publicly disclosed vulnerabilities (#751)
* Added dependency-check-maven and updated grpc modules * Adding dependency check to pipeline * Test pipeline * Test pipeline * Test pipeline * Test pipeline
1 parent 01caa73 commit c92d38c

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

azure-pipelines.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ jobs:
6060
.\package-pipeline.ps1 -buildNumber $buildNumber
6161
name: output
6262
displayName: 'Executing build script'
63+
- pwsh: |
64+
mvn dependency-check:check
65+
condition: and(eq(variables['Build.SourceBranch'], 'refs/heads/dev'), eq(variables['SkipMavenDependencyCheck'], 'false'))
66+
displayName: 'Maven dependency check'
6367
- task: CopyFiles@2
6468
inputs:
6569
SourceFolder: '$(Build.Repository.LocalPath)/pkg'
@@ -155,7 +159,7 @@ jobs:
155159
displayName: 'Install .NET 6'
156160
inputs:
157161
version: 6.0.x
158-
- pwsh: | # Download JDK for later installation
162+
- pwsh: | # Download JDK for later installation
159163
Invoke-WebRequest $(JDK_DOWNLOAD_LINK) -O "$(JAVA_VERSION).tar.gz"
160164
$current = get-location | select -ExpandProperty Path
161165
Write-Host "##vso[task.setvariable variable=downloadPath;]$current"

pom.xml

+19-3
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,17 @@
7272
<dependency>
7373
<groupId>io.grpc</groupId>
7474
<artifactId>grpc-protobuf</artifactId>
75-
<version>1.57.2</version>
75+
<version>1.61.0</version>
7676
</dependency>
7777
<dependency>
7878
<groupId>io.grpc</groupId>
7979
<artifactId>grpc-stub</artifactId>
80-
<version>1.45.2</version>
80+
<version>1.61.0</version>
8181
</dependency>
8282
<dependency>
8383
<groupId>io.grpc</groupId>
8484
<artifactId>grpc-netty-shaded</artifactId>
85-
<version>1.45.2</version>
85+
<version>1.61.0</version>
8686
</dependency>
8787
<dependency>
8888
<groupId>com.google.code.gson</groupId>
@@ -303,6 +303,22 @@
303303
</systemProperties>
304304
</configuration>
305305
</plugin>
306+
<!-- This plugin is used to detect publicly disclosed vulnerabilities contained within a project’s dependencies -->
307+
<plugin>
308+
<groupId>org.owasp</groupId>
309+
<artifactId>dependency-check-maven</artifactId>
310+
<version>9.0.9</version>
311+
<configuration>
312+
<failBuildOnCVSS>7</failBuildOnCVSS>
313+
</configuration>
314+
<executions>
315+
<execution>
316+
<goals>
317+
<goal>check</goal>
318+
</goals>
319+
</execution>
320+
</executions>
321+
</plugin>
306322
</plugins>
307323
</build>
308324
</project>

0 commit comments

Comments
 (0)