Repository navigation
panel: Refuse framing and throttle failed sign-in guesses - #194
Conversation
Every response now carries frame-ancestors 'none' and X-Frame-Options: DENY, so a page cannot frame the panel and redress an operator's clicks into a repointed endpoint. Failed Basic-auth guesses are counted per peer and in total over a 15-minute window; once either cap trips the panel answers 429 until the window ends. Co-Authored-By: matt.dzwonczyk <mattdzwonczyk@gmail.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
Prompt hidden (unlisted session) |
|
@greptileai review |
[Medium impact] The PR appears safe to merge within its stated deployment limits. SummaryThe PR blocks framing and limits failed panel sign-ins to 10 per connecting address in a 15-minute window.
Both earlier findings are addressed. No new actionable issues found. In the PR description, devin-ai-integration[bot] accepts separate budgets per replica and shared lockouts behind reverse proxies, deferring trusted-proxy support. They intentionally omit a shared limit across addresses to prevent attackers from locking everyone out. Reviews (7) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
The failure was recorded only after the asynchronous password check, so a concurrent burst could all pass the throttle first. Each guess now takes its slot up front and gives it back only if the password was right. Co-Authored-By: matt.dzwonczyk <mattdzwonczyk@gmail.com>
|
@greptileai review |
Counting each guess as a failure before checking it closed the burst gap but let overlapping correct sign-ins trip the limit. Checks now run through a per-throttle queue, so the counters are exact when each request is admitted and only a wrong password is ever counted. Co-Authored-By: matt.dzwonczyk <mattdzwonczyk@gmail.com>
|
@greptileai review |
…rator out A cap shared by every source let anyone who can reach the panel keep it answering 429 to the operator's correct password. Failed guesses are now limited per connecting peer only. Co-Authored-By: matt.dzwonczyk <mattdzwonczyk@gmail.com>
|
@greptileai review |
Devin Review🟢 Devin Review found nothing to fix · View findings · Follow Devin's work |
There was a problem hiding this comment.
Devin Review found 1 finding. It is left for you to triage below.
Co-Authored-By: matt.dzwonczyk <mattdzwonczyk@gmail.com>
|
@greptileai review |
…l-framing-throttle
|
@greptileai review |
…l-framing-throttle
|
@greptileai review |
The problem
Two weaknesses in the operator control panel:
The fix
Content-Security-Policy: frame-ancestors 'none'andX-Frame-Options: DENY).429 Too Many Requests. Other addresses aren't affected.I deliberately didn't add a cap across all addresses. It would let anyone lock the real operator out. An attacker who rotates addresses is still up against the password itself.
Proof
I ran the server with a password set and sent 11 wrong guesses, then the right one. The first 10 got
401, then429, and every response carried the anti-framing headers. New tests intests/panel-boundary.test.tscheck that:These tests fail without the change, and the full suite passes.
Not proven
🟢 Devin Review found nothing to fix · View findings · Follow Devin's work