praetorian-inc/gato

Runlog download error 400s

AdnaneKhan opened this issue · 0 comments

The GET request for run logs appears to be returning the following response after some time:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request</h2>
<hr><p>HTTP Error 400. The request is badly formed.</p>
</BODY></HTML>

GitHub likely has an undocumented rate limit for their run-log download API. I will keep an eye on this issue. The mitigation might be to run the run-log download feature only after exhausting YAML-based analysis to ensure we are not downloading excessive duplicate logs. For example, we can check the yaml associated with each run and confirm that it is associated with a self-hosted runner before pulling the run logs.

EDIT: This behavior only seems to manifest when proxying through Burp.