duo-labs / duo-labs/cloudmapper
Improvement: Support mutli-account output files. Add options for output filename for report.html, iam_report.html, data.json
- Dominant language
- JavaScript
- Stars
- 6.3k
- Forks
- 836
- PR merge metrics
- No merged PRs in 30d
Description
- commands: iam_report, report, weboftrust
- this improves any env, but especially docker
Collect supports multi-account by automatically pre-pending the account-name from config.json to the file path
cloudmapper/account-data/$account_name/.
This enhancement would bring similar mutli-account support to the above-mentioned commands
All of the mentioned commands write to a file at the end of the run.
For weboftrust.py, the output is written to web/data.json. This is hard-coded which creates both a docker-mounting
problem (to persist outside the container you [clobber the web/ directory](https://github.com/duo-labs/cloudmapper/issues/814) which has needed files) and blocks
multi-account runs.
iam_report and report place their outputfile in web/account-data and are also hard-coded.
The proposed fix is to
1. prefix all output files with $account_name
2. move web/data.json to web/account-data/$account_name-data.json
3. fix all references (eg webserver.py) to use the config.json default account $default_account_name- as the default displayed report etc. or have them select from all files with .endswith('iam_report.html')
4. add argparse options for allowing over-ride of file location and selection of account data for display
If this is acceptable, i can create a PR
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.