Issues with GitHub REST API for Secret Scanning Alerts #127188
Unanswered
nmarkana-crest
asked this question in
API and Webhooks
Replies: 2 comments 3 replies
-
Do we have any updates on this? |
Beta Was this translation helpful? Give feedback.
3 replies
-
Switch to a timestamp-based approach instead of using page parameters. Track the latest updated timestamp you processed and use that to fetch new alerts. This way, you only get new or updated alerts since your last check, avoiding duplicates and missed alerts. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Bug
Body
REST APIs:
Bugs/Issues:
Reproduction Steps:
Let us assume we have 5 alerts (1,2,3,4,5 - all in ascending order of update date) in our GitHub enterprise
Keeping the per_page to “2” and “sort” ascending on updated date
Expected outcome when no event is updated in between :
1st page - 1,2
2nd page - 3,4
3 page - 5
Expected outcome when any event is updated in between :
1st page - 1,2
Updating the alert 2 from GitHub
2nd page - 3,4
3 page - 5, 2
Actual outcome when any event is updated in between :
1st page - 1,2
Updating the alert 2 from GitHub
2nd page - 4,5
3 page - 2
In actual outcome, we are not receiving the 3rd event and then that event is lost.
You can perform the same reproduction steps with the code scanning alerts API (link) and verify that we didn’t experience any loss of alerts while updating the previously fetched alerts.
Could someone please prioritise looking into this issue as we are currently blocked on it?
Beta Was this translation helpful? Give feedback.
All reactions