-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement/Leverage httplib2shim for GCP Client Libraries #676
Conversation
@rtomlinson-latacora, @kareem-DA, @nycnewman please test. |
I ran `test/httplib2shim` and I got the following error:
```
2020-03-17 14:35:59 blackduck-test scout[3822] ERROR base.py L110: Unable to list accessible Projects: 'Resource' object has no attribute 'list'
Traceback (most recent call last):
File "/home/kareem_khan_digitalasset_com/ScoutSuite/ScoutSuite/providers/gcp/facade/base.py", line 110, in _get_projects_recursively
folder_request = resourcemanager_client_v2.folders().list(parent='%ss/%s' % (parent_type, parent_id))
AttributeError: 'Resource' object has no attribute 'list'
```
|
I ran with |
If you look at the cprofile a huge % of the time was spent just creating the clients so I'm not surprised. What was the previous run time like? |
See below. |
python scout.py gcp --service-account /opt/scoutcreds/gcp.json --organization-id *** Removed *** --debug --services computeengine 2>&1 |tee ../scout.log
|
@kareem-DA should now be fixed, please retest? |
ScoutSuite was running for 2-3 hours with my semaphore fix for a large organization. |
2-3h to 5 minutes??? |
Haha, yeah. I was being pretty conservative with the semaphores so I probably could have cut that time down. |
Well great, that's a tremendous improvement. Could you confirm that the report generated is the same? A quick |
Yup. Running it the old way with the semaphore now since I already overwrote the existing report. It'll be a little while but I'll get you a response. |
This is much better. Ran the entire org in 3 minutes. All services and all projects. The results look accurate as well.
Thanks
Kareem
… On Mar 17, 2020, at 11:25 AM, rtomlinson-latacora ***@***.***> wrote:
ScoutSuite was running for 2-3 hours with my semaphore fix for a large organization.
2-3h to 5 minutes???
Haha, yeah. I was being pretty conservative with the semaphores so I probably could have cut that time down.
Well great, that's a tremendous improvement. Could you confirm that the report generated is the same? A quick diff against the results JSON should only show 2-3 differences.
Yup. Running it the old way with the semaphore now since I already overwrote the existing report. It'll be a little while but I'll get you a response.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#676 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AOFRDMXGJIHLDAE4D4BFSQ3RH6I5JANCNFSM4LNHLNKQ>.
--
This message, and any attachments, is for the intended recipient(s) only,
may contain information that is privileged, confidential and/or proprietary
and subject to important terms and conditions available at
http://www.digitalasset.com/emaildisclaimer.html
<http://www.digitalasset.com/emaildisclaimer.html>. If you are not the
intended recipient, please delete this message.
|
Great, I'll run some tests on my end and integrate into |
Findings are comparable on my end as well. |
Thanks @rtomlinson-latacora & @kareem-DA, this has now been merged into |
Description
Test fix for #665 & #443, leveraging https://github.com/GoogleCloudPlatform/httplib2shim.
Ran with no errors on my end, with the additional improvements:
Type of change
Select the relevant option(s):
Checklist: