Java: Add a flow step for Path::toFile in ZipSlip#904
Merged
Conversation
aschackmull
reviewed
Feb 8, 2019
| |----------------------------|------------------------|------------------------------------------------------------------| | ||
| | Double-checked locking is not thread-safe (`java/unsafe-double-checked-locking`) | Fewer false positive results and more true positive results | Results that use safe publication through a `final` field are no longer reported. Results that initialize immutable types like `String` incorrectly are now reported. | | ||
| | Result of multiplication cast to wider type (`java/integer-multiplication-cast-to-long`) | Fewer results | Results involving conversions to `float` or `double` are no longer reported, as they were almost exclusively false positives. | | ||
| | Arbitrary file write during archive extraction ("Zip Slip") (`java/zipslip`) | Fewer false positive results | Results involving a sanitization step that converts a destination `Path` to a `File` are no longer reported. | |
Contributor
There was a problem hiding this comment.
Could you move this two lines up, such that it is in alphabetical order.
Contributor
Author
There was a problem hiding this comment.
Sure, now done.
aschackmull
approved these changes
Feb 11, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This fixes this false positive: https://lgtm.com/projects/g/GoogleContainerTools/jib/snapshot/83d33f2b220d3d8183028ddaaa15cf84255ddc9f/files/jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/ZipUtil.java?sort=name&dir=ASC&mode=heatmap#x89296eae147d2e8:1