Skip to content

Commit

Permalink
Cache OWASP database
Browse files Browse the repository at this point in the history
  • Loading branch information
acanda committed Dec 15, 2023
1 parent da6bc8a commit 3ae6500
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Cache OWASP database
uses: actions/cache@v3
with:
path: target/owasp/data
key: owasp-data
- name: Build with Maven
env:
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
Expand Down
46 changes: 38 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,22 @@
</testResource>
</testResources>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>9.0.5</version>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
Expand Down Expand Up @@ -296,14 +312,6 @@
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>9.0.4</version>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<nvdApiKey>${env.NVD_API_KEY}</nvdApiKey>
</configuration>
Expand All @@ -312,6 +320,28 @@
</build>
</profile>

<profile>
<id>dependency-check-github</id>

<activation>
<property>
<name>env.CI</name>
</property>
</activation>

<build>
<plugins>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<configuration>
<dataDirectory>target/owasp/data</dataDirectory>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>release</id>

Expand Down

0 comments on commit 3ae6500

Please sign in to comment.