Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add owasp dependency check action #31511

Merged
merged 1 commit into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/owasp-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "OWASP Dependency Check"

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0,3'

jobs:
owasp:
name: OWASP Dependency Check Report
runs-on: ubuntu-latest
if: github.repository == 'quarkusio/quarkus'

strategy:
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
ref: main
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11


- name: Build Java
run: ./mvnw -B --settings .github/mvn-settings.xml -Dquickly-ci install

- name: Perform OWASP Dependency Check Report
run: ./mvnw -Dowasp-report

- uses: actions/upload-artifact@v3
with:
name: dependency-check-report
path: target/dependency-check-report.html
retention-days: 5
25 changes: 0 additions & 25 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@

<!-- google cloud functions invoker-->
<gcf-invoker.version>1.1.1</gcf-invoker.version>
<owasp-dependency-check-plugin.version>8.2.1</owasp-dependency-check-plugin.version>

<!-- Jakarta JMS API -->
<jakarta.jms-api.version>3.1.0</jakarta.jms-api.version>
</properties>
Expand Down Expand Up @@ -719,18 +717,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>${owasp-dependency-check-plugin.version}</version>
<configuration>
<!-- Disable Net Analyzer -->
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
<nugetconfAnalyzerEnabled>false</nugetconfAnalyzerEnabled>
<nuspecAnalyzerEnabled>false</nuspecAnalyzerEnabled>
<retireJsAnalyzerEnabled>false</retireJsAnalyzerEnabled>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
Expand Down Expand Up @@ -1267,17 +1253,6 @@
</plugins>
</build>
</profile>
<profile>
<id>owasp-check</id>
<activation>
<property>
<name>owasp-check</name>
</property>
</activation>
<build>
<defaultGoal>dependency-check:check</defaultGoal>
</build>
</profile>
<profile>
<id>Windows</id>
<activation>
Expand Down
39 changes: 37 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.parameters>true</maven.compiler.parameters>

<graalvmHome>${env.GRAALVM_HOME}</graalvmHome>
<postgres.url>jdbc:postgresql:hibernate_orm_test</postgres.url>

Expand All @@ -66,6 +66,8 @@
<skipDocs>false</skipDocs>
<skip.gradle.tests>false</skip.gradle.tests>

<owasp-dependency-check-plugin.version>8.2.1</owasp-dependency-check-plugin.version>

<!-- Dependency versions -->
<jacoco.version>0.8.10</jacoco.version>
<kubernetes-client.version>6.5.1</kubernetes-client.version> <!-- Please check with Java Operator SDK team before updating -->
Expand Down Expand Up @@ -149,6 +151,18 @@
<artifactId>quarkus-platform-bom-maven-plugin</artifactId>
<version>${quarkus-platform-bom-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>${owasp-dependency-check-plugin.version}</version>
<configuration>
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
<nugetconfAnalyzerEnabled>false</nugetconfAnalyzerEnabled>
<nuspecAnalyzerEnabled>false</nuspecAnalyzerEnabled>
<retireJsAnalyzerEnabled>false</retireJsAnalyzerEnabled>
<nodeAnalyzerEnabled>false</nodeAnalyzerEnabled>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<extensions>
Expand Down Expand Up @@ -356,6 +370,27 @@
</plugins>
</build>
</profile>
<profile>
<id>owasp-check</id>
<activation>
<property>
<name>owasp-check</name>
</property>
</activation>
<build>
<defaultGoal>org.owasp:dependency-check-maven:check</defaultGoal>
sberyozkin marked this conversation as resolved.
Show resolved Hide resolved
</build>
</profile>
<profile>
<id>owasp-report</id>
<activation>
<property>
<name>owasp-report</name>
</property>
</activation>
<build>
<defaultGoal>org.owasp:dependency-check-maven:aggregate</defaultGoal>
</build>
</profile>
</profiles>

</project>