mandiant / capa

The FLARE team's open-source tool to identify capabilities in executable files.
Apache License 2.0
4.01k stars 505 forks source link

Restrict signature debug logging to vivisect backend #2044

Closed acelynnzhang closed 3 months ago

acelynnzhang commented 3 months ago

I noticed that signatures will only load when the backend is vivisect: https://github.com/mandiant/capa/blob/7debc54dbd90372af8f4e3b1819fe632afdaa3fa/capa/main.py#L695-L698

I moved the debug logging from handle_common_args to get_signatures_from_cli, so it's only printed when the signatures are actually used. This means that other backends don't need the default signatures directory to exist.

Closes #1875

Checklist

google-cla[bot] commented 3 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

acelynnzhang commented 3 months ago

see inline comment, then good to go

is this good? thanks!