Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: confluence anonymous access is failing after few requests (#146)
Fixes #144 The error is not always reproduced, and when it is, it is reproduced for a different page every time. Since the error is `500`, means that it is a server (Confluence) error, I can't fix it and I must work around it. I added a retry mechanism and I enabled it only for our request, when it returns `500`, it will retry it 3 times. It looks like this: ``` 11:38:19 WRN confluence credentials were not provided. The scan will be made anonymously only for the public pages 11:38:20 INF Total of all 4 Spaces detected 11:38:20 INF Space - secrets have 3 pages 11:38:20 INF Space - Secrets have 1 pages 11:38:20 INF Space - Checkmarx Resources have 3 pages 11:38:29 INF Space - Checkmarx Knowledge Center have 1231 pages 11:38:37 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1375995197?expand=body.storage,version,history.previousVersion 11:38:37 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1312260170?expand=body.storage,version,history.previousVersion 11:38:38 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1188135832?expand=body.storage,version,history.previousVersion 11:38:38 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/2093908162?expand=body.storage,version,history.previousVersion 11:38:38 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1829044450?expand=body.storage,version,history.previousVersion 11:38:38 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1534427435?expand=body.storage,version,history.previousVersion 11:38:38 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1383432225?expand=body.storage,version,history.previousVersion 11:38:38 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1191609716?expand=body.storage,version,history.previousVersion 11:38:38 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1636598107?expand=body.storage,version,history.previousVersion 11:38:38 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/2031092718?expand=body.storage,version,history.previousVersion 11:38:38 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1998946990?expand=body.storage,version,history.previousVersion 11:38:38 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1995211335?expand=body.storage,version,history.previousVersion 11:38:38 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/2100003058?expand=body.storage,version,history.previousVersion 11:38:38 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1192362348?expand=body.storage,version,history.previousVersion 11:38:40 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1169195803?expand=body.storage,version,history.previousVersion 11:38:40 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1131742701?expand=body.storage,version,history.previousVersion 11:38:40 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1947631705?expand=body.storage,version,history.previousVersion 11:38:40 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1158283441?expand=body.storage,version,history.previousVersion 11:38:41 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/2490630327?expand=body.storage,version,history.previousVersion 11:38:42 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/2600012551?expand=body.storage,version,history.previousVersion 11:38:39 WRN retrying http request https://checkmarx.atlassian.net/wiki/rest/api/content/1186267153?expand=body.storage,version,history.previousVersion exit status 1 Summary: totalitemsscanned: 1238 totalsecretsfound: 6 ``` We can see the `500` error code happens once a time and then all the requests will return with `500`.
- Loading branch information