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

move matching logic into its own namespace #1684

Closed
williballenthin opened this issue Aug 7, 2023 · 4 comments
Closed

move matching logic into its own namespace #1684

williballenthin opened this issue Aug 7, 2023 · 4 comments
Labels
breaking-change introduces a breaking change that should be released in a major version enhancement New feature or request

Comments

@williballenthin
Copy link
Collaborator

within main, we have a lot of code for finding capabilities: https://github.com/mandiant/capa/blob/master/capa/main.py#L122-L339

more than 200 lines for static analysis, and soon we'll have parallel implementations for dynamic analysis. this seems like too much code for the main script, which should probably be focused on handling CLI args and rendering the results.

we should move this logic into their own namespaces. this will be a breaking change for users that invoke capa as a library; however, its a good change for the long term health of capa.

@williballenthin williballenthin added enhancement New feature or request breaking-change introduces a breaking change that should be released in a major version labels Aug 7, 2023
@williballenthin williballenthin mentioned this issue Aug 7, 2023
3 tasks
@yelhamer
Copy link
Collaborator

yelhamer commented Aug 7, 2023

this will be a breaking change for users that invoke capa as a library

Perhaps we could still provide an extract_capabilities() function in main that calls into the new namespace, for backwards-compatibility reasons.

@williballenthin
Copy link
Collaborator Author

good idea. we can survey the scripts in capa/scripts/* to see how they reach into capa.main and try to preserve some level of compatibility.

@mr-tz
Copy link
Collaborator

mr-tz commented Jan 30, 2024

addressed as part of #1948?

@williballenthin
Copy link
Collaborator Author

closed in #1948

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change introduces a breaking change that should be released in a major version enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants