You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running quickscan_target.py against an S3 bucket containing folders, it fails when it tries to scan the folder object.
Steps to Reproduce:
Create an S3 bucket and add test objects
Run quickscan
Add an object in a folder
run quickscan
Expected Behavior:
The files will be uploaded and scanned
Actual Behavior:
When the script attempts to scan the folder, it will error out when attempting to upload the folder
File "/home/me/quickscan_target.py", line 307, in
upload_bucket_samples()
File "/home/me/quickscan_target.py", line 150, in upload_bucket_samples
sha = response["body"]["resources"][0]["sha256"]
Possible Cause:
When you create a folder in Amazon S3, S3 creates a 0-byte object with a key that's set to the folder name.
When scanning a bucket containing folders, quickscan_target.py attempts to get the object filename via os.path.basename. When the object is a folder, it results in filename, response and sha being empty and the script crashes when calling the analyzer.
Resolution:
Change line 137 to:
for item in [files for files in summaries if files.size != 0]:
The text was updated successfully, but these errors were encountered:
When running quickscan_target.py against an S3 bucket containing folders, it fails when it tries to scan the folder object.
Steps to Reproduce:
Create an S3 bucket and add test objects
Run quickscan
Add an object in a folder
run quickscan
Expected Behavior:
The files will be uploaded and scanned
Actual Behavior:
When the script attempts to scan the folder, it will error out when attempting to upload the folder
File "/home/me/quickscan_target.py", line 307, in
upload_bucket_samples()
File "/home/me/quickscan_target.py", line 150, in upload_bucket_samples
sha = response["body"]["resources"][0]["sha256"]
Possible Cause:
When you create a folder in Amazon S3, S3 creates a 0-byte object with a key that's set to the folder name.
When scanning a bucket containing folders, quickscan_target.py attempts to get the object filename via os.path.basename. When the object is a folder, it results in filename, response and sha being empty and the script crashes when calling the analyzer.
Resolution:
Change line 137 to:
for item in [files for files in summaries if files.size != 0]:
The text was updated successfully, but these errors were encountered: