Only trim spaces of array parameter entries #670
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some packages include a space in the names of their license. In particular this is a problem with “Public Domain” in org.json:json here: https://github.com/stleary/JSON-java/blob/master/pom.xml#L32
I added the function to read the list of allowed licenses from the environment variable that does not remove all spaces but only ones at the beginning and end of each individual entry. This preserves spaces inside the entries. I have updated a unit test to cover this change.
Note: While all unit tests are passing, the GitHub Job “Scan Pull Request Tests” fails in my fork. This, however, appears not to be related to my change, as these were failing before as well. I think this may be caused by a different JFrog server version that reports some vulnerabilities slightly different from what is expected by these tests.
Please let me know if I need to change anything to move this PR forward.