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

GROUP-56 Fix Dependency Check (v9.0 upgrade) #14

Merged
merged 4 commits into from
Dec 6, 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
5 changes: 3 additions & 2 deletions .github/workflows/commit-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ env:
REGISTRY: ghcr.io
IMAGE_NAME: grouphq/group-service
VERSION: ${{ github.sha }}
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}

jobs:
build:
Expand All @@ -23,7 +24,7 @@ jobs:
java-version: 17
cache: gradle
- name: Cache Gradle dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.gradle/dependency-check-data
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
Expand All @@ -32,7 +33,7 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Dependency vulnerability scanning
run: ./gradlew dependencyCheckAnalyze --stacktrace
run: ./gradlew dependencyCheckAnalyze --stacktrace -PnvdApiKey=${{ env.NVD_API_KEY }}
- name: Checking code style
run: |
./gradlew checkstyleMain
Expand Down
24 changes: 0 additions & 24 deletions .run/Dependency Vulnerability Check.run.xml

This file was deleted.

15 changes: 9 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
plugins {
id "java"
id "org.springframework.boot" version "3.1.3"
id "io.spring.dependency-management" version "1.1.3"
id 'org.springframework.boot' version '3.1.+'
id 'io.spring.dependency-management' version '1.+'

id "org.owasp.dependencycheck" version "8.4.0"
id "org.owasp.dependencycheck" version "latest.release"
id "checkstyle"
id "pmd"
}

// Checks Dependencies for Known Vulnerabilities
dependencyCheck {
suppressionFile = file("${project.rootDir}/config/dependency_check/suppressions.xml")
failBuildOnCVSS = 7.0 // fails on high and critical severity scores
failBuildOnCVSS = 8.0 // fails on mid-high to critical severity scores
nvd {
apiKey = project.findProperty('nvdApiKey') ?: 'NONE'
}
}

// Java Code Style Checker Following (mostly) Google Style Guidelines
checkstyle {
toolVersion = "10.12.4"
toolVersion = "latest.release"
configFile = file("${project.rootDir}/config/checkstyle/google_checks.xml")
configProperties = [ "suppressionFile" : project(':').file('config/checkstyle/suppressions.xml')]
}
Expand All @@ -28,7 +31,7 @@ pmd {
ruleSetFiles = files("config/pmd/bestpractices.xml", "config/pmd/codestyle.xml", "config/pmd/design.xml",
"config/pmd/documentation.xml", "config/pmd/errorprone.xml", "config/pmd/multithreading.xml",
"config/pmd/performance.xml", "config/pmd/security.xml")
toolVersion = "6.55.+"
toolVersion = "6.+"
}

group = "org.grouphq"
Expand Down