Scoutsuite: Permission denied error on local folder running scout

Created on 5 Jun 2020  路  1Comment  路  Source: nccgroup/ScoutSuite

Running on Windows 10 in latest Ubuntu distro for WSL
New dir created, new venv, install and run scout aws -p test - runs through the various Fetching stages but then:

2020-06-05 18:31:21 MYLERD scout[16466] ERROR kms.py L41: Failed to get KMS key rotation: An error occurred (AccessDeniedException) when calling the GetKeyRotationStatus operation: User: arn:aws:iam::XXXXXXXXXXXX:user/dave is not authorize
d to perform: kms:GetKeyRotationStatus on resource: arn:aws:kms:eu-west-2:XXXXXXXXXXXX:key/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx                                                                                                                
2020-06-05 18:31:21 MYLERD scout[16466] ERROR kms.py L41: Failed to get KMS key rotation: An error occurred (AccessDeniedException) when calling the GetKeyRotationStatus operation: User: arn:aws:iam::XXXXXXXXXXXX:user/dave is not authorize
d to perform: kms:GetKeyRotationStatus on resource: arn:aws:kms:eu-west-1:XXXXXXXXXXXX:key/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxy                                                                                                                
2020-06-05 18:31:22 MYLERD scout[16466] ERROR kms.py L41: Failed to get KMS key rotation: An error occurred (AccessDeniedException) when calling the GetKeyRotationStatus operation: User: arn:aws:iam::XXXXXXXXXXXX:user/dave is not authorize
d to perform: kms:GetKeyRotationStatus on resource: arn:aws:kms:us-east-1:XXXXXXXXXXXX:key/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxz                                                                                                                2020-06-05 18:18:46 MYLERD scout[16451] INFO Running rule engine
2020-06-05 18:18:51 MYLERD scout[16451] INFO Applying display filters
Traceback (most recent call last):
  File "/c/dev/scout/venv/bin/scout", line 8, in <module>
    sys.exit(run_from_cli())
  File "/c/dev/scout/venv/lib/python3.6/site-packages/ScoutSuite/__main__.py", line 77, in run_from_cli
    programmatic_execution=False)
  File "/c/dev/scout/venv/lib/python3.6/site-packages/ScoutSuite/__main__.py", line 131, in run
    result = loop.run_until_complete(_run(**locals()))  # pass through all the parameters
  File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "/c/dev/scout/venv/lib/python3.6/site-packages/ScoutSuite/__main__.py", line 324, in _run
    cloud_provider, exceptions, force_write, debug)
  File "/c/dev/scout/venv/lib/python3.6/site-packages/ScoutSuite/output/html.py", line 99, in save
    self.prepare_html_report_dir()
  File "/c/dev/scout/venv/lib/python3.6/site-packages/ScoutSuite/output/html.py", line 82, in prepare_html_report_dir
    shutil.copytree(src_inc_scout_dir, inc_scout_dir)
  File "/c/dev/scout/venv/lib/python3.6/shutil.py", line 365, in copytree
    raise Error(errors)
shutil.Error: [('/c/dev/scout/venv/lib/python3.6/site-packages/ScoutSuite/output/data/inc-scoutsuite/css', 'scoutsuite-report/inc-scoutsuite/css', "[Errno 13] Permission denied: 'scoutsuite-report/inc-scoutsuite/css'"), ('/c/dev/scout/venv/lib/python3.6/site-packages/ScoutSuite/output/data/inc-scoutsuite', 'scoutsuite-report/inc-scoutsuite', "[Errno 13] Permission denied: 'scoutsuite-report/inc-scoutsuite'")]

The IAM account I'm using has the standard AWS AdministratorAccess and SecurityAudit policies attached.

bug potential

Most helpful comment

This seems to be if the above is run in a directory mounted from the Windows file system.
Run it in a local directory within the WSL installation (/dev instead of /c/dev) and it all works fine.

>All comments

This seems to be if the above is run in a directory mounted from the Windows file system.
Run it in a local directory within the WSL installation (/dev instead of /c/dev) and it all works fine.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

djcater picture djcater  路  5Comments

x4v13r64 picture x4v13r64  路  8Comments

prisas picture prisas  路  4Comments

heydonovan picture heydonovan  路  7Comments

zymergen-vdc picture zymergen-vdc  路  6Comments