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

envi: do dynamic imports via importlib.import_module #587

Merged
merged 1 commit into from Mar 10, 2023

Conversation

williballenthin
Copy link
Contributor

This derives from the issue identified here: mandiant/capa#1342 (comment)

Basically, the existing vivisect dynamic import implementation relies on source code being present on the file system, which is not a guarantee provided by the Python import framework and breaks packages such as PyInstaller (and I'd guess vivisect cobra, too!). It appears the custom code can be trivially replaced by importlib.import_module, which is what I'm proposing here; however, I'm not aware of any potential outside discussion between @rakuy0 and @atlas0fd00m that may have decided against this implementation.

Without such a fix like this, capa and FLOSS will not be able to upgrade to vivisect v1.1.0+.

@mr-tz
Copy link
Contributor

mr-tz commented Mar 9, 2023

Would be grand to find a solution for this so we can continue to package vivisect and make it's powers easily accessible to many analysts.

@atlas0fd00m
Copy link
Contributor

we're working on it, @mr-tz . :)

Copy link
Contributor

@atlas0fd00m atlas0fd00m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can work in this direction. we'll attempt to keep file-/path-based code loading limited to extra functionality/plugins in the future.

@atlas0fd00m atlas0fd00m merged commit 98c0576 into vivisect:master Mar 10, 2023
@williballenthin
Copy link
Contributor Author

williballenthin commented Mar 10, 2023 via email

@mr-tz
Copy link
Contributor

mr-tz commented Mar 12, 2023

Amazing, thanks for the quick fix. Can you please provide a v1.1.1 release with these updates?

@rakuy0 rakuy0 added this to the v1.1.1 milestone Mar 17, 2023
@rakuy0 rakuy0 added the bug label Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants