Skip to content

Prevent ConcurrentModificationException on addFalseNegativeCPEs#3619

Merged
jeremylong merged 3 commits intomainfrom
issue-3618
Sep 1, 2021
Merged

Prevent ConcurrentModificationException on addFalseNegativeCPEs#3619
jeremylong merged 3 commits intomainfrom
issue-3618

Conversation

@aikebah
Copy link
Copy Markdown
Collaborator

@aikebah aikebah commented Aug 31, 2021

Fixes Issue #3618

Description of Change

Started with a defensive copy, but preferred to gather the additions in a list instead to add all of them outside the loop that iterates over the already known vulnerableSoftwareIds.
If you have a good way to test that migration of the code to the hints rulebase is properly effective feel free to dispose of this and instead fix #3618 by removing the code and move its intended effect into the base-hints rulebase as already suggested in the existing TODO comment).
Without an ability (due to lack of access to opensso libraries) that hints that I create would trigger the desired detections I felt safer to extend the code to prevent the ConcurrentModificationException.
Scanned the source-code for calls to the getVulnerableSoftwareIdentifiers() method and did not spot any other potential ConcurrentModificationException for the set returned by that method.

Have test cases been added to cover the new functionality?

no

@boring-cyborg boring-cyborg Bot added the core changes to core label Aug 31, 2021
@jeremylong jeremylong added this to the 6.3.1 milestone Sep 1, 2021
@jeremylong jeremylong merged commit 3ed3ee0 into main Sep 1, 2021
@aikebah aikebah deleted the issue-3618 branch September 7, 2021 18:33
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

core changes to core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An unexpected error occurred during analysis of '...pom.xml' (False Positive Analyzer): null

2 participants