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 fetching the registered targets from gitlab, we never paginate the api. This means we're just taking the default page_size of 20 and ignore all other targets that might exist.
Expected Behavior
Sparrow should find all targets, regardless of how many there might be.
This shouldn't be a crazy difficult thing to fix. We just need to add a few query parameters to the url, and look at the Link header in the response. If we get the header, just call the url in the header to get the next page. Do this until the header is not returned again and we're happy. This is all described in the gitlab documentation.
Steps To Reproduce
Create a gitlab repo with more than 20 targets
Configure the target manager to scan that repo
Observe how only some (20 to be exact) of the targets are actually found
Profit?
Relevant logs and/or screenshots, environment information, etc.
Is there an existing issue for this?
Current Behavior
When fetching the registered targets from gitlab, we never paginate the api. This means we're just taking the default
page_size
of 20 and ignore all other targets that might exist.Expected Behavior
Sparrow should find all targets, regardless of how many there might be.
This shouldn't be a crazy difficult thing to fix. We just need to add a few query parameters to the url, and look at the
Link
header in the response. If we get the header, just call the url in the header to get the next page. Do this until the header is not returned again and we're happy. This is all described in the gitlab documentation.Steps To Reproduce
Relevant logs and/or screenshots, environment information, etc.
No response
Who can address the issue?
Any Dev
Anything else?
Insert fix here
https://docs.gitlab.com/ee/api/rest/index.html#keyset-based-pagination
https://docs.gitlab.com/ee/api/repositories.html#list-repository-tree:~:text=with%20keyset%20pagination.-,pagination,-string
The text was updated successfully, but these errors were encountered: