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

Security fixes from the forked repo #32

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

sam-caldwell
Copy link

  1. fixed directory traversal detections
  2. move log4j to slf4j and bump versions

@thedeadliestcatch
Copy link

This breaks some of the tests and contains typos, FYI. LOGGER -> logger, a few missing parentheses, and leftover level parameters where they are no longer supported (slf4j's info() does not take a level argument).

@thedeadliestcatch
Copy link

Also the directory traversal "fixes" do not comment sufficiently what you are trying to fix, since the path is an UUID-based path randomly generated with no user-controlled components. The only one that is more obvious is the 'zip slip', but it is also debatable whether the applied fix will cover all cases.

I added comments to specific commits but I will summarize those here:

  • YaraException handling is eliminated where it is actually needed. You remove Throwable and replace it with the IO-specific IOException, instead of handling these in a more fine-grained manner. This breaks unit tests.
  • The repeated instances for the slf4j dependency in pom.xml are unnecessary.
  • The refactoring for Logger use is incomplete. slf4j needs a LoggerFactory.

The PR also will fail to build as-is (the unit testing will fail).

Not nitpicking here but yara-java needs quite a bit of work and a PR filed without proper verification can mislead people. I'm working with others to bring it up to speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants