microsoft / ghcrawler

Crawl GitHub APIs and store the discovered orgs, repos, commits, ...
MIT License
373 stars 90 forks source link

blob.count() failure is not logged #144

Open jeffmcaffer opened 6 years ago

jeffmcaffer commented 6 years ago

If you run the crawler with azure blob configured as the deadletter store but using a SAS token that does not have List permissions, and hit the deadletter store count end point, the blob list appears to not fail (no error) but the result is null and then is accessed unprotected resulting the in the below stack trace. Note tha thtis was in the jm/apiCrawler branch but the code is the same as master

TypeError: Cannot read property 'entries' of null at /opt/service/node_modules/ghcrawler/providers/storage/storageDocStore.js:174:32 at finalCallback (/opt/service/node_modules/azure-storage/lib/services/blob/blobservice.js:5814:7) at /opt/service/node_modules/azure-storage/lib/common/filters/retrypolicyfilter.js:178:13