HTML Output Issue?
brendan-s1 opened this issue · 4 comments
I'm not 100% sure if this is a bug or not. Seeing this script error at the end, when it tries to open the HTML file...
Permissions are wide open on this directory. So it's not a permission problem.
Additionally the UI appears to have lost the color and other attributes i'm used to seeing, has this been changed or perhaps related to my first issue above?
The colors missing is a different issue from a wrong merge here #200.
@brendan-s1 - under the hood, Cloudsplaining uses Python's webbrowser.open()
method. It opens the default web browser. I am not sure what the permissions issue is specifically. Perhaps it has something to do with how your machine has the default browser configured? But in any case I don't think this is necessarily something having to do with Cloudsplaining's code base.
https://github.com/salesforce/cloudsplaining/blob/master/cloudsplaining/command/scan.py#L130-L134
Workarounds
Just thought I'd post some immediate workarounds for you.
- If you don't want to open the web browser from Cloudsplaining automatically, you can run
cloudsplaining scan
with the flag--skip-open-report
, or-s
for short:
cloudsplaining scan -i master.json -o /tmp/cloudsplaining/ -m -s
- If you still want to open the report in the browser, but you're still running into this issue, you can combine that with the
open
command.
# Create alias for Google Chrome - this works for me on my Mac
alias chrome='open -a "Google Chrome" '
# Run the scan and open with chrome
cloudsplaining scan -i master.json -o /tmp/cloudsplaining/ -m -s
chrome /tmp/cloudsplaining/iam-results-master.html
Oh! In your example, are you using WSL? If so, I suspect this issue may be related to how WSL might handle webbrowser.open()
specifically.
Closing this for now since I think this is specific to the user's environment. If you are running into this again, feel free to re-open