Skip to content

Commit 40e2aab

Browse files
authored
Merge branch 'main' into dependabot/maven/slf4j.version-2.0.17
2 parents 317bddf + 2806b2a commit 40e2aab

File tree

18 files changed

+129
-141
lines changed

18 files changed

+129
-141
lines changed

.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/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ jobs:
7474
- name: Archive IT test logs
7575
id: archive-logs
7676
if: always()
77-
uses: actions/upload-artifact@v4
77+
uses: actions/upload-artifact@v5
7878
with:
7979
name: it-test-logs
8080
retention-days: 7
8181
path: maven/target/it/**/build.log
8282
- name: Archive code coverage results
8383
id: archive-coverage
84-
uses: actions/upload-artifact@v4
84+
uses: actions/upload-artifact@v5
8585
with:
8686
name: code-coverage-report
8787
retention-days: 7
@@ -90,7 +90,7 @@ jobs:
9090
**/target/jacoco-results/**/*.html
9191
- name: Archive Snapshot
9292
id: archive-snapshot
93-
uses: actions/upload-artifact@v4
93+
uses: actions/upload-artifact@v5
9494
with:
9595
name: archive-snapshot
9696
retention-days: 7
@@ -107,7 +107,7 @@ jobs:
107107
# needs: build
108108
# steps:
109109
# - name: Download coverage reports
110-
# uses: actions/download-artifact@v5
110+
# uses: actions/download-artifact@v6
111111
# with:
112112
# name: code-coverage-report
113113
# - name: Run codacy-coverage-reporter
@@ -138,7 +138,7 @@ jobs:
138138
restore-keys: |
139139
${{ runner.os }}-maven-
140140
- name: Download release build
141-
uses: actions/download-artifact@v5
141+
uses: actions/download-artifact@v6
142142
with:
143143
name: archive-snapshot
144144
- name: Set up Docker

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v5
2626
with:
2727
ref: generatedSuppressions
28-
- uses: actions/setup-node@v5.0.0
28+
- uses: actions/setup-node@v6.0.0
2929
- run: |
3030
npm install [email protected]
3131
npm install fs

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
issue-body: ${{ github.event.issue.body }}
4343
template-path: odc/.github/ISSUE_TEMPLATE/false-positive-report.yml
44-
- uses: actions/setup-node@v5.0.0
44+
- uses: actions/setup-node@v6.0.0
4545
with:
4646
node-version: 14
4747
- name: Initialize npm
@@ -144,7 +144,7 @@ jobs:
144144
--ossIndexPassword ${{ secrets.OSS_INDEX_API_TOKEN }}
145145
- name: Upload FP Report
146146
if: steps.check_files.outputs.files_exists == 'true'
147-
uses: actions/upload-artifact@v4
147+
uses: actions/upload-artifact@v5
148148
with:
149149
name: FP Report
150150
path: ${{github.workspace}}/reports

.github/workflows/publish-suppressions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v5
1616
with:
1717
ref: generatedSuppressions
18-
- uses: actions/setup-node@v5.0.0
18+
- uses: actions/setup-node@v6.0.0
1919
- run: |
2020
npm install fs
2121
- name: Create Generated Suppressions XML

.github/workflows/pull_requests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
category: spotbugs-core
6767
- name: Archive Snapshot
6868
id: archive-snapshot
69-
uses: actions/upload-artifact@v4
69+
uses: actions/upload-artifact@v5
7070
with:
7171
name: archive-snapshot
7272
retention-days: 1
@@ -114,7 +114,7 @@ jobs:
114114
- name: Archive IT test logs
115115
id: archive-logs
116116
if: always()
117-
uses: actions/upload-artifact@v4
117+
uses: actions/upload-artifact@v5
118118
with:
119119
name: it-test-logs
120120
retention-days: 7
@@ -176,7 +176,7 @@ jobs:
176176
restore-keys: |
177177
${{ runner.os }}-maven-
178178
- name: Download release build
179-
uses: actions/download-artifact@v5
179+
uses: actions/download-artifact@v6
180180
with:
181181
name: archive-snapshot
182182
- name: Set up Docker

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
mvn -V -s settings.xml -Prelease clean package source:jar javadoc:jar gpg:sign deploy site site:stage -DreleaseTesting --no-transfer-progress --batch-mode
8181
- name: Archive code coverage results
8282
id: archive-coverage
83-
uses: actions/upload-artifact@v4
83+
uses: actions/upload-artifact@v5
8484
with:
8585
name: code-coverage-report
8686
retention-days: 7
@@ -89,7 +89,7 @@ jobs:
8989
**/target/jacoco-results/**/*.html
9090
- name: Archive Release
9191
id: archive-release
92-
uses: actions/upload-artifact@v4
92+
uses: actions/upload-artifact@v5
9393
with:
9494
name: archive-release
9595
retention-days: 7
@@ -102,7 +102,7 @@ jobs:
102102
target/*.buildinfo
103103
- name: Archive Site
104104
id: archive-site
105-
uses: actions/upload-artifact@v4
105+
uses: actions/upload-artifact@v5
106106
with:
107107
name: archive-site
108108
retention-days: 7
@@ -114,7 +114,7 @@ jobs:
114114
# needs: build
115115
# steps:
116116
# - name: Download coverage reports
117-
# uses: actions/download-artifact@v5
117+
# uses: actions/download-artifact@v6
118118
# with:
119119
# name: code-coverage-report
120120
# - name: Run codacy-coverage-reporter
@@ -146,7 +146,7 @@ jobs:
146146
- name: Checkout code
147147
uses: actions/checkout@v5
148148
- name: Download release build
149-
uses: actions/download-artifact@v5
149+
uses: actions/download-artifact@v6
150150
with:
151151
name: archive-release
152152
- name: Set up Docker
@@ -185,7 +185,7 @@ jobs:
185185
VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout )
186186
echo "VERSION=$VERSION" >> $GITHUB_ENV
187187
- name: Download release build
188-
uses: actions/download-artifact@v5
188+
uses: actions/download-artifact@v6
189189
with:
190190
name: archive-release
191191
- name: Create Release
@@ -260,7 +260,7 @@ jobs:
260260
- name: Checkout code
261261
uses: actions/checkout@v5
262262
- name: Download Site
263-
uses: actions/download-artifact@v5
263+
uses: actions/download-artifact@v6
264264
with:
265265
name: archive-site
266266
path: target/staging

core/src/main/java/org/owasp/dependencycheck/data/cpe/AbstractMemoryIndex.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import org.apache.lucene.index.IndexWriterConfig;
4040
import org.apache.lucene.queryparser.classic.ParseException;
4141
import org.apache.lucene.queryparser.classic.QueryParser;
42-
import org.apache.lucene.search.BooleanQuery;
4342
import org.apache.lucene.search.IndexSearcher;
4443
import org.apache.lucene.search.Query;
4544
import org.apache.lucene.search.TopDocs;
@@ -282,15 +281,15 @@ public synchronized Query parseQuery(String searchString) throws ParseException,
282281
Query query;
283282
try {
284283
query = queryParser.parse(searchString);
285-
} catch (BooleanQuery.TooManyClauses ex) {
286-
BooleanQuery.setMaxClauseCount(Integer.MAX_VALUE);
284+
} catch (IndexSearcher.TooManyClauses ex) {
285+
IndexSearcher.setMaxClauseCount(Integer.MAX_VALUE);
287286
query = queryParser.parse(searchString);
288287
} catch (ParseException ex) {
289288
if (ex.getMessage() != null && ex.getMessage().contains("too many boolean clauses")) {
290-
BooleanQuery.setMaxClauseCount(Integer.MAX_VALUE);
289+
IndexSearcher.setMaxClauseCount(Integer.MAX_VALUE);
291290
query = queryParser.parse(searchString);
292291
} else {
293-
LOGGER.debug("Parse Excepction", ex);
292+
LOGGER.debug("Parse Exception", ex);
294293
throw ex;
295294
}
296295
}
@@ -325,7 +324,7 @@ public synchronized TopDocs search(Query query, int maxQueryResults) throws Corr
325324
*/
326325
@Override
327326
public synchronized Document getDocument(int documentId) throws IOException {
328-
return indexSearcher.doc(documentId);
327+
return indexSearcher.storedFields().document(documentId);
329328
}
330329

331330
/**

core/src/main/java/org/owasp/dependencycheck/dependency/VulnerableSoftware.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ public int hashCode() {
157157
// ideally different for each class
158158
return new HashCodeBuilder(13, 59)
159159
.appendSuper(super.hashCode())
160-
.append(versionEndExcluding)
161-
.append(versionEndIncluding)
162-
.append(versionStartExcluding)
163-
.append(versionStartIncluding)
160+
.append(normalizeForComparison(versionEndExcluding))
161+
.append(normalizeForComparison(versionEndIncluding))
162+
.append(normalizeForComparison(versionStartExcluding))
163+
.append(normalizeForComparison(versionStartIncluding))
164164
.toHashCode();
165165
}
166166

@@ -175,10 +175,10 @@ public boolean equals(Object obj) {
175175
final VulnerableSoftware rhs = (VulnerableSoftware) obj;
176176
return new EqualsBuilder()
177177
.appendSuper(super.equals(obj))
178-
.append(versionEndExcluding, rhs.versionEndExcluding)
179-
.append(versionEndIncluding, rhs.versionEndIncluding)
180-
.append(versionStartExcluding, rhs.versionStartExcluding)
181-
.append(versionStartIncluding, rhs.versionStartIncluding)
178+
.append(normalizeForComparison(versionEndExcluding), normalizeForComparison(rhs.versionEndExcluding))
179+
.append(normalizeForComparison(versionEndIncluding), normalizeForComparison(rhs.versionEndIncluding))
180+
.append(normalizeForComparison(versionStartExcluding), normalizeForComparison(rhs.versionStartExcluding))
181+
.append(normalizeForComparison(versionStartIncluding), normalizeForComparison(rhs.versionStartIncluding))
182182
.isEquals();
183183
}
184184

0 commit comments

Comments
 (0)