google / cloud-forensics-utils

Python library to carry out DFIR analysis on the Cloud
Apache License 2.0
460 stars 88 forks source link

Possible bug in checking the number of volumes to attach #190

Closed binglot closed 4 years ago

binglot commented 4 years ago

The aws_cli.py file checks the number of provided volumes to attach, as shown in the below code:

https://github.com/google/cloud-forensics-utils/blob/d50d4e36dca0fe450e286e351b2a4bf3942b8786/examples/aws_cli.py#L118-L129

It seems that args.attach_volumes is a string, so shouldn't the check look like this instead?

  if args.attach_volumes and len(args.attach_volumes.split(',')) > 11:
    print('error: --attach_volumes must be < 11')
    return
hacktobeer commented 4 years ago

Yes it should, good catch. Also (e2e) tests tests tests (me talking to myself).