Skip to content

Commit f56e67f

Browse files
authored
Merge branch 'main' into upgradeMaven
2 parents 4566b08 + 3573f8c commit f56e67f

366 files changed

Lines changed: 10377 additions & 9694 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
*.html linguist-documentation
2-
(^|/)site/) linguist-documentation
3-
src/test/resources/* linguist-vendored
4-
cli/src/test/resources/* linguist-vendored
5-
core/src/test/resources/* linguist-vendored
6-
maven/src/test/resources/* linguist-vendored
7-
ant/src/test/resources/* linguist-vendored
8-
utils/src/test/resources/* linguist-vendored
2+
src/site/** linguist-documentation
3+
cli/src/site/** linguist-documentation
4+
core/src/site/** linguist-documentation
5+
maven/src/site/** linguist-documentation
6+
ant/src/site/** linguist-documentation
7+
utils/src/site/** linguist-documentation
8+
src/test/resources/** linguist-vendored
9+
cli/src/test/resources/** linguist-vendored
10+
core/src/test/resources/** linguist-vendored
11+
maven/src/test/resources/** linguist-vendored
12+
ant/src/test/resources/** linguist-vendored
13+
utils/src/test/resources/** linguist-vendored

.github/ISSUE_TEMPLATE/false-positive-report.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ body:
66
- type: markdown
77
attributes:
88
value: |
9+
**Ensure you are using the latest version of dependency-check.**
10+
911
**Automation is used to process most false positives reports**; failure to follow these guidelines will delay the process:
1012
1113
- Only enter a **single (1) Package URL**.
@@ -27,15 +29,15 @@ body:
2729
id: cpe
2830
attributes:
2931
label: CPE
30-
description: Please enter the single Common Platform enumeration (CPE) as identified in the HTML Report. Only a **single CPE** can be specified. **Please put backtic characters around the CPE to ensure it displays correctly**.
32+
description: Please enter the single Common Platform enumeration (CPE) as identified in the HTML Report. Only a **single CPE** can be specified. **Please put backtick characters around the CPE to ensure it displays correctly**.
3133
placeholder: ex. `cpe:2.3:a:apache:log4j:2.12.1:*:*:*:*:*:*:*`
3234
validations:
3335
required: true
3436
- type: input
3537
id: cve
3638
attributes:
3739
label: CVE
38-
description: The vulnerability name as identified in the HTML Report. If specifying a CPE this is not necassary; if entered please enter only a **signle CVE**; if multiple CVE should be suppressed please enter multiple FP reports. This is optional and may not be needed as most FP reports are due to an incorrect CPE.
40+
description: The vulnerability name as identified in the HTML Report. If specifying a CPE this is not necessary; if entered please enter only a **single CVE**; if multiple CVE should be suppressed please enter multiple FP reports. This is optional and may not be needed as most FP reports are due to an incorrect CPE.
3941
placeholder: ex. CVE-2021-44228
4042
validations:
4143
required: false
@@ -66,4 +68,4 @@ body:
6668
label: Description
6769
description: Additional information regarding the false positive report.
6870
validations:
69-
required: false
71+
required: false

.github/workflows/build.yml

Lines changed: 65 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -9,87 +9,99 @@ on:
99
- '**/*.txt'
1010

1111
permissions: {}
12+
1213
jobs:
1314
build:
15+
strategy:
16+
matrix:
17+
jdk_default_version: [ '25' ] # Single JDK version to run Maven with and use for compilation etc
18+
jdk_test_version: [ '11', '17', '21', '25' ] # JDK version to run surefire/failsafe tests using
19+
fail-fast: false
20+
21+
name: Build and Test (JDK ${{ matrix.jdk_test_version }}${{ matrix.jdk_test_version == matrix.jdk_default_version && ' - Default' || '' }})
1422
permissions:
1523
contents: read # to fetch code (actions/checkout)
16-
17-
name: Build dependency-check
18-
runs-on: ubuntu-latest
24+
runs-on: ubuntu-latest
1925
steps:
2026
- name: Install gpg secret key
27+
if: matrix.jdk_test_version == matrix.jdk_default_version && github.repository_owner == 'dependency-check'
2128
id: install-gpg-key
2229
run: |
23-
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
30+
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
2431
gpg --list-secret-keys --keyid-format LONG
25-
- uses: actions/checkout@v4
26-
- name: Check Maven Cache
27-
id: maven-cache
28-
uses: actions/cache@v4
29-
with:
30-
path: ~/.m2/repository
31-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
32-
restore-keys: |
33-
${{ runner.os }}-maven-
34-
- name: Check Local Maven Cache
32+
- uses: actions/checkout@v6
33+
- name: Maven Integration Test Cache
3534
id: maven-it-cache
36-
uses: actions/cache@v4
35+
uses: actions/cache@v5
3736
with:
3837
path: maven/target/local-repo
3938
key: mvn-it-repo
4039
- name: Check ODC Data Cache
4140
id: odc-data-cache
42-
uses: actions/cache@v4
41+
uses: actions/cache@v5
4342
with:
4443
path: core/target/data
4544
key: odc-data
46-
- uses: actions/setup-dotnet@v4.3.1
45+
- uses: actions/setup-dotnet@v5.1.0
4746
with:
4847
dotnet-version: '8.0.x'
49-
- name: Set up JDK 11
50-
id: jdk-11
51-
uses: actions/setup-java@v4
48+
- name: Set up JDKs
49+
uses: actions/setup-java@v5
5250
with:
53-
java-version: 11
51+
java-version: | # last version takes precedence as default
52+
${{ matrix.jdk_test_version }}
53+
${{ matrix.jdk_default_version }}
5454
distribution: 'zulu'
55-
server-id: ossrh
56-
server-username: ${{ secrets.OSSRH_USERNAME }}
57-
server-password: ${{ secrets.OSSRH_TOKEN }}
58-
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
55+
check-latest: true
56+
cache: 'maven'
57+
cache-dependency-path: '**/pom.xml'
58+
server-id: central
59+
server-username: ${{ secrets.CENTRAL_USER }}
60+
server-password: ${{ secrets.CENTRAL_PASSWORD }}
61+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
5962
with:
6063
version: 6.0.2
61-
- name: Build Snapshot with Maven
64+
- name: Build/Test Snapshot with Maven${{ steps.install-gpg-key.outcome == 'success' && ' (then Deploy)' || '' }}
6265
id: build-snapshot
6366
env:
64-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
65-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
67+
MAVEN_USERNAME: ${{ secrets.CENTRAL_USER }}
68+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
69+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSWORD }}
6670
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
67-
run: mvn -V -s settings.xml -Prelease clean package verify source:jar javadoc:jar gpg:sign deploy -DreleaseTesting --no-transfer-progress --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
71+
run: >
72+
mvn -V -s settings.xml
73+
clean verify -PFullIntegrationTesting
74+
-Dtoolchain.jdk.test.version=${{ matrix.jdk_test_version }} -Dtoolchain.jdk.test.home="$JAVA_HOME_${{ matrix.jdk_test_version }}_X64"
75+
${{ matrix.jdk_test_version == matrix.jdk_default_version && 'source:jar javadoc:jar site' || '' }}
76+
${{ steps.install-gpg-key.outcome == 'success' && '-Prelease gpg:sign deploy' || '' }}
77+
--no-transfer-progress --batch-mode -Dstyle.color=always
6878
- name: SARIF Multitool
69-
uses: microsoft/sarif-actions@v0.1
79+
uses: microsoft/sarif-actions@v0.2
7080
with:
7181
# Command to be sent to SARIF Multitool
7282
command: 'validate core/target/test-reports/Report.sarif'
7383
- name: Archive IT test logs
7484
id: archive-logs
7585
if: always()
76-
uses: actions/upload-artifact@v4
86+
uses: actions/upload-artifact@v6
7787
with:
78-
name: it-test-logs
88+
name: it-test-logs-jdk-${{ matrix.jdk_test_version }}
7989
retention-days: 7
8090
path: maven/target/it/**/build.log
8191
- name: Archive code coverage results
92+
if: matrix.jdk_test_version == matrix.jdk_default_version
8293
id: archive-coverage
83-
uses: actions/upload-artifact@v4
94+
uses: actions/upload-artifact@v6
8495
with:
8596
name: code-coverage-report
8697
retention-days: 7
8798
path: |
8899
**/target/jacoco-results/jacoco.xml
89100
**/target/jacoco-results/**/*.html
90101
- name: Archive Snapshot
102+
if: matrix.jdk_test_version == matrix.jdk_default_version
91103
id: archive-snapshot
92-
uses: actions/upload-artifact@v4
104+
uses: actions/upload-artifact@v6
93105
with:
94106
name: archive-snapshot
95107
retention-days: 7
@@ -100,49 +112,38 @@ jobs:
100112
ant/target/*.zip
101113
cli/target/*.zip
102114
103-
publish_coverage:
104-
name: publish code coverage reports
105-
runs-on: ubuntu-latest
106-
needs: build
107-
steps:
108-
- name: Download coverage reports
109-
uses: actions/download-artifact@v4
110-
with:
111-
name: code-coverage-report
112-
- name: Run codacy-coverage-reporter
113-
uses: codacy/codacy-coverage-reporter-action@master
114-
with:
115-
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
116-
coverage-reports: utils/target/jacoco-results/jacoco.xml,core/target/jacoco-results/jacoco.xml,maven/target/jacoco-results/jacoco.xml,ant/target/jacoco-results/jacoco.xml,cli/target/jacoco-results/jacoco.xml
117-
118115
docker:
119116
permissions:
120117
contents: read # to fetch code (actions/checkout)
121118

122119
name: Build and Test Docker
123120
runs-on: ubuntu-latest
124121
needs: build
125-
env:
126-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
127-
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
128122
steps:
129123
- name: Checkout code
130-
uses: actions/checkout@v4
131-
- name: Check Maven Cache
132-
id: maven-cache
133-
uses: actions/cache@v4
124+
uses: actions/checkout@v6
125+
- name: Set up JDK
126+
uses: actions/setup-java@v5
134127
with:
135-
path: ~/.m2/repository
136-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
137-
restore-keys: |
138-
${{ runner.os }}-maven-
128+
java-version: '25'
129+
distribution: 'zulu'
130+
check-latest: true
131+
cache: 'maven'
132+
cache-dependency-path: '**/pom.xml'
139133
- name: Download release build
140-
uses: actions/download-artifact@v4
134+
uses: actions/download-artifact@v7
141135
with:
142136
name: archive-snapshot
137+
- name: Set up Docker
138+
uses: docker/setup-docker-action@v4
139+
- name: Set up Docker Buildx
140+
uses: docker/setup-buildx-action@v3
143141
- name: Build Docker Image
144-
run: ./build-docker.sh
142+
run: ./docker-build.sh
145143
- name: build scan target
146-
run: mvn -V -s settings.xml package -DskipTests=true --no-transfer-progress --batch-mode
144+
run: >
145+
mvn -V -s settings.xml -pl cli -am
146+
package -DskipTests=true
147+
--no-transfer-progress --batch-mode -Dstyle.color=always
147148
- name: Test Docker Image
148-
run: ./test-docker.sh
149+
run: ./docker-test.sh

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ jobs:
3333

3434
steps:
3535
- name: Checkout repository
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@v6
3737

3838
# Initializes the CodeQL tools for scanning.
3939
- name: Initialize CodeQL
40-
uses: github/codeql-action/init@v3
40+
uses: github/codeql-action/init@v4
4141
with:
4242
languages: ${{ matrix.language }}
4343
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -58,7 +58,7 @@ jobs:
5858
# uses a compiled language
5959

6060
- run: |
61-
mvn -s settings.xml clean package -DskipTests=true --no-transfer-progress --batch-mode
61+
mvn -s settings.xml clean package -DskipTests=true --no-transfer-progress --batch-mode -Dstyle.color=always
6262
6363
- name: Perform CodeQL Analysis
64-
uses: github/codeql-action/analyze@v3
64+
uses: github/codeql-action/analyze@v4

.github/workflows/coverity.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/false-positive-approvals.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,20 @@ jobs:
1818
(github.event.comment.user.login == 'jeremylong' ||
1919
github.event.comment.user.login == 'aikebah' ||
2020
github.event.comment.user.login == 'nhumblot' ||
21+
github.event.comment.user.login == 'marcelstoer' ||
2122
github.event.comment.user.login == 'chadlwilson') }}
2223
runs-on: ubuntu-latest
2324
steps:
24-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v6
2526
with:
2627
ref: generatedSuppressions
27-
- uses: actions/setup-node@v4.4.0
28+
- uses: actions/setup-node@v6.2.0
2829
- run: |
2930
npm install fast-xml-parser@4.0.9
3031
npm install fs
3132
- name: Commit Suppression Rule
3233
id: fp-ops-commit
33-
uses: actions/github-script@v7.0.1
34+
uses: actions/github-script@v8.0.0
3435
with:
3536
script: |
3637
const { execSync } = require("child_process");
@@ -117,7 +118,16 @@ jobs:
117118
if (!fs.existsSync('./suppressions')){
118119
fs.mkdirSync('./suppressions');
119120
}
120-
fs.appendFileSync('suppressions/publishedSuppressions.xml', '<?xml version="1.0" encoding="UTF-8"?>\n<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">' + generatedSuppressions + '\n' + suppression.trim() + '\n</suppressions>', function (err) {
121+
fs.appendFileSync('suppressions/publishedSuppressions.xml',
122+
`<?xml version="1.0" encoding="UTF-8"?>
123+
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd"
124+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
125+
xsi:schemaLocation="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd
126+
https://dependency-check.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
127+
${generatedSuppressions}
128+
${suppression.trim()}
129+
</suppressions>`,
130+
function (err) {
121131
if (err) throw err;
122132
console.log('publishedSuppressions.xml created');
123133
});
@@ -151,14 +161,14 @@ jobs:
151161
}
152162
- name: Publish Updated Suppressions
153163
if: ${{ steps.fp-ops-commit.outputs.publish == 'true' }}
154-
uses: JamesIves/github-pages-deploy-action@v4.7.3
164+
uses: JamesIves/github-pages-deploy-action@v4.8.0
155165
with:
156166
branch: gh-pages
157167
folder: suppressions
158168
target-folder: suppressions
159169
- name: Message failure
160170
if: ${{ failure() || steps.fp-ops-commit.outputs.failed }}
161-
uses: actions/github-script@v7.0.1
171+
uses: actions/github-script@v8.0.0
162172
with:
163173
script: |
164174
github.rest.issues.createComment({

.github/workflows/false-positive-cleanup.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
permissions: {}
88
jobs:
99
cleanup:
10+
if: github.repository_owner == 'dependency-check'
1011
permissions:
1112
actions: write # to delete workflow runs
1213

0 commit comments

Comments
 (0)