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
Widen restrictive archive traversal, fixes #1925 #1930
Widen restrictive archive traversal, fixes #1925 #1930
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One request I left, please check. And if possible, try to reproduce the issue you want to fix by a unit test.
@KengoTODA I have updated the public API as per your request. I am having a hard time finding the existing unit-tests relating to the ClassPathBuilder, though. Could you give me a hint where I should be looking? |
@KengoTODA I added some unit-tests that rely on a handbuilt nested archive I added to the spotbugsTestCases. I really dislike this setup for the test case, but since I am not familiar enough with the codebase (and there was virtually no documentation on how something like this could even be attempted), that's the hack I went with. Because these tests require acessing the engine configuration and I didn't want to mess with user preferences between test cases I added an overload to the SpotBugsRule used to integrate the Engine into UnitTests to support modifying the engine in code just before the execution of the actual analysis. |
test-harness-core/src/main/java/edu/umd/cs/findbugs/test/AnalysisRunner.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is LGTM. Thanks! Add an entry to CHANGELOG.md
then I'll merge this PR for the coming release.
Includes unit-tests against a handrolled archive containing multiple other archives, each with a single classfile.
2566c4f
to
bfb3811
Compare
@KengoTODA Added a changelog entry and rebased onto the master branch. All commits have been squashed into a single one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything LGTM. Thanks a lot! 👍
Make sure these boxes are checked before submitting your PR -- thank you!
CHANGELOG.md
if you have changed SpotBugs code