-
Notifications
You must be signed in to change notification settings - Fork 137
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
Profiles #51
Conversation
…available to the customization scripts.
Code looks good however I would like to see the feature in action. Can you post an example customization? Ideally one that would trigger all code paths: registry, document, directory and package. I would even consider it to be added as part of the smoke (build) automated testing. |
Agreed, I'll add at least one test customization profile! |
malboxes/malboxes.py
Outdated
@@ -43,6 +43,8 @@ def initialize(): | |||
# create appdata directories if they don't exist | |||
if not os.path.exists(DIRS.user_config_dir): | |||
os.makedirs(DIRS.user_config_dir) | |||
os.makedirs(os.path.join(DIRS.user_config_dir, "customization")) | |||
os.makedirs(os.path.join(DIRS.user_config_dir, "scripts", "user")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to use the cache directory here instead.
"{{ dir }}/scripts/windows/installtools.ps1" | ||
"{{ dir }}/scripts/windows/installtools.ps1", | ||
{% if customization_profile %}"{{ config_dir }}/scripts/user/{{ customization_profile }}.ps1",{% endif %} | ||
"{{ dir }}/scripts/windows/malware_analysis.ps1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will need to be repeated in the new provision_powershell_win7.json
file
We need the documentation to be updated to reflect that we support that also. |
As discussed, we think it should be clearer that this feature is what we will refer to from now on as profiles. What we previously called a profile will now be referred to as a template. |
This reverts commit ba5b4e4.
- using existing cache facilities - added a -Name to registry deletion (avoid build stalling) - Fixed cache file append bug (via using existing create_cachefd)
I think we are near completion here. |
If the variable is unset profiles are not used by default. If a profile name refers to no file on the filesystem, then a default one will be created based on our example config.
The refactor of the customization profiles have finally been tested and work. This removes the customization commands and moves that logic to a simpler json file in ~/.malboxes/customization (future work will involve creating examples for that). Tested on Ubuntu 16.04 and Windows 10 (with some bugs only found on Windows interestingly).