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

Allow users to specify a custom ghidrathon.save path via an environment variable #99

Merged
merged 18 commits into from
Apr 30, 2024

Conversation

fariss
Copy link
Contributor

@fariss fariss commented Apr 5, 2024

This PR closes #98.

util/ghidrathon_configure.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@mike-hunhoff mike-hunhoff left a comment

Choose a reason for hiding this comment

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

Thanks @s-ff , nice work! I've left comments for your review. Please let me know if you have any questions.

README.md Outdated Show resolved Hide resolved
util/ghidrathon_configure.py Outdated Show resolved Hide resolved
@mike-hunhoff
Copy link
Collaborator

@s-ff looks like lints are failing, please see https://github.com/mandiant/Ghidrathon/blob/main/doc/contributing.md for more information on running lints locally.

.github/workflows/tests.yml Outdated Show resolved Hide resolved
.github/workflows/tests.yml Outdated Show resolved Hide resolved
.github/workflows/tests.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@mike-hunhoff mike-hunhoff left a comment

Choose a reason for hiding this comment

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

Great updates, I've left comments for your review

To make sure that Ghidrathon plugin aligns with configure_ghidrathon.py
we need to make sure that the GHIDRATHON_SAVE_PATH is never set to "".
The following commit fixes incorrect login in the previous commit.
Please refer to the explination below:

if GHIDRATHON_SAVE_PATH is set to any value (other than None or ""),
check if it exists and is a directory.

elif GHIDRATHON_SAVE_PATH is an empty string, report an invalid
directory to avoid confusion.

else GHIDRATHON_SAVE_PATH is not, use default install path.
Copy link
Collaborator

@mike-hunhoff mike-hunhoff left a comment

Choose a reason for hiding this comment

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

Thanks @s-ff , we're almost ready merge. I've left two comments for you to address.

util/ghidrathon_configure.py Outdated Show resolved Hide resolved
Added log messages to indicate whether the file path was read from the
environment variable or the default path was used.
Copy link
Collaborator

@mike-hunhoff mike-hunhoff left a comment

Choose a reason for hiding this comment

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

Thanks @s-ff , LGTM 🚀

@mike-hunhoff mike-hunhoff merged commit a3deefd into mandiant:main Apr 30, 2024
14 checks passed
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.

enable users to configure, via an environment variable, the path where the file ghidrathon.save is written
3 participants