mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 05:53:24 +00:00
profile_generator.py - All baselines use the same 'mobileconfigs' directory #329
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @peterlewis on GitHub.
Summary
When running
profile_generator.py, no matter which baseline you are targeting, the outputted.mobileconfigfiles are put into a folder namedmobileconfigs. This means that, when running the script against multiple baselines, the.mobileconfigfiles are combined into a single directory.When running
Steps to reproduce
python3 profile_generator.py ../baselines/high.yamlpython3 profile_generator.py ../baselines/low.yamlOperating System version
10.15.5 (19F101)
What is the current bug behavior?
The
mobileconfigsdirectory contains.mobileconfigfiles from both of steps 1 and 2What is the expected correct behavior?
In line with the behaviour of the other scripts, I believe that output directory should contain the name of the targeted baseline, e.g.:
Possible fixes
I think that something along the lines of the following, should fix:
I would open a PR myself, but not hugely Python-y and so wouldn't wish to define/duplicate
profile_namein the wrong place/way.Many thanks!
Peter
@golbiga commented on GitHub:
The fix is in master, please test. Closing issue.
@golbiga commented on GitHub:
This has been fixed in the 0.9_prerelease branch, it will be included in the release.
Thanks for reporting it.
@peterlewis commented on GitHub:
Sounds/looks good, to me! So long as I'm not unintentionally overwriting .mobileconfig sets, then I'm happy! :)
@golbiga commented on GitHub:
@peterlewis, one thing to note. The output will still be in the mobileconfigs folder. There will just be an additional folder within, based on the selected baseline.
@peterlewis commented on GitHub:
That's great. Thanks, @golbiga, for sorting that out so quickly!