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

Prevent ConcurrentModificationException on addFalseNegativeCPEs #3619

Merged
merged 3 commits into from Sep 1, 2021

Conversation

aikebah
Copy link
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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