Commit e566530
fix(recon): catch inner crt.sh timeout in full_domain_report closures (v1.33.20)
The two helper closures that share the crt.sh task wrapped their inner
asyncio.wait_for(asyncio.shield(...)) without a guard, so a slow upstream
made the inner timeout raise inside the closure; the task ended with an
unretrieved exception and the outer await failed the whole domain report.
Catch the inner TimeoutError in both closures and fall through to the
partial-success path (empty CT data + crt_sh_timeout sentinel). The
certificates branch already accepted that input via check_ct_logs; extend
enumerate_subdomains / _crtsh_subdomains with an optional crtsh_error so
the subdomains branch can honestly surface crtsh_status='timeout' instead
of masquerading as 'ok' with an empty result. Defaults preserve existing
call sites — no schema delta, no breaking change.
Add a regression test that hangs the crt.sh fetch and asserts both
branches report the timeout via the documented status fields.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 54f4071 commit e566530
3 files changed
Lines changed: 81 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
339 | 345 | | |
340 | 346 | | |
341 | 347 | | |
| |||
354 | 360 | | |
355 | 361 | | |
356 | 362 | | |
357 | | - | |
| 363 | + | |
358 | 364 | | |
359 | 365 | | |
360 | 366 | | |
| |||
445 | 451 | | |
446 | 452 | | |
447 | 453 | | |
448 | | - | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
449 | 457 | | |
450 | 458 | | |
451 | 459 | | |
| |||
454 | 462 | | |
455 | 463 | | |
456 | 464 | | |
457 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
458 | 469 | | |
459 | 470 | | |
460 | 471 | | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
461 | 476 | | |
462 | 477 | | |
463 | 478 | | |
| |||
1446 | 1461 | | |
1447 | 1462 | | |
1448 | 1463 | | |
1449 | | - | |
1450 | | - | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
1451 | 1473 | | |
1452 | 1474 | | |
1453 | | - | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
1454 | 1479 | | |
1455 | 1480 | | |
1456 | 1481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3445 | 3445 | | |
3446 | 3446 | | |
3447 | 3447 | | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + | |
| 3486 | + | |
| 3487 | + | |
| 3488 | + | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
| 3492 | + | |
| 3493 | + | |
| 3494 | + | |
3448 | 3495 | | |
3449 | 3496 | | |
3450 | 3497 | | |
| |||
0 commit comments