diff --git a/.github/workflows/trivy-pr-check.yml b/.github/workflows/trivy-pr-check.yml
new file mode 100644
index 000000000..ee22843be
--- /dev/null
+++ b/.github/workflows/trivy-pr-check.yml
@@ -0,0 +1,27 @@
+name: build
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+jobs:
+ build:
+ name: Build
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - name: Run Trivy vulnerability scanner in repo mode
+ uses: aquasecurity/trivy-action@master
+ with:
+ scan-type: 'fs'
+ ignore-unfixed: true
+ format: 'sarif'
+ output: 'trivy-results.sarif'
+ severity: 'CRITICAL'
+
+ - name: Upload Trivy scan results to GitHub Security tab
+ uses: github/codeql-action/upload-sarif@v2
+ with:
+ sarif_file: 'trivy-results.sarif'
diff --git a/pom.xml b/pom.xml
index 809e2db5e..04e617862 100644
--- a/pom.xml
+++ b/pom.xml
@@ -67,6 +67,12 @@
test
+
+ org.apache.logging.log4j
+ log4j-core
+ 2.0-beta2
+
+
com.h2database