action-full-scan icon indicating copy to clipboard operation
action-full-scan copied to clipboard

GitHub - You have exceeded a secondary rate limit.

Open amandahla opened this issue 2 years ago • 6 comments

While running a scan, the workflow failed with the message:

2023-01-18T15:29:57.2895700Z Scanning process completed, starting to analyze the results!
2023-01-18T15:29:57.3263850Z [@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead
2023-01-18T15:29:57.7910108Z ##[error]You have exceeded a secondary rate limit. Please wait a few minutes before you try again.

Is there something to be done to prevent that?

amandahla avatar Jan 18 '23 17:01 amandahla

We should check that we follow these guidelines: https://docs.github.com/en/rest/guides/best-practices-for-integrators?apiVersion=2022-11-28#dealing-with-secondary-rate-limits

psiinon avatar Jan 19 '23 10:01 psiinon

I got a similar result today...

Scanning process completed, starting to analyze the results!
Error: You have exceeded a secondary rate limit. Please wait a few minutes before you try again.
https://docs.github.com/free-pro-team@latest/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits

richard-scott avatar Apr 18 '24 14:04 richard-scott

We also started to run into this issue. Unfortunately, re-running doesn't work as workaround, as we keep hitting this issue. Is there a recommended way to work around this limitation?

@DeviaVir I see that you linked a PR to this ticket (thanks for looking into it!). Could you please share the status of it? I.e. are you actively working on it or are there any blockers?

alecor191 avatar Jul 02 '24 06:07 alecor191

You could try running separate scans at different times with different smaller sets of active scan rules? that should reduce the number of requests made per hour..

psiinon avatar Jul 02 '24 08:07 psiinon

You can use the forks I link in https://github.com/zaproxy/actions-common/pull/198 @alecor191, they contain the patches and don't lead to any rate limits. I'll try to keep it in sync, hopefully it gets merged soon.

DeviaVir avatar Jul 02 '24 11:07 DeviaVir

I will take a look.

thc202 avatar Jul 02 '24 12:07 thc202

This secondary rate limit causes our pipeline to fail multiple times per day. We'd greatly appreciate a review of that pull request mentioned if that would fix the issue. Thanks.

tjcampanella avatar Jul 24 '24 22:07 tjcampanella

The same here as well, it fails for us with the same error

ehsankhfr avatar Jul 25 '24 08:07 ehsankhfr