Commit 4e202dd
unworked validation sweep: fix all major findings for tasks 053-059
Address the 17 major-severity unworked review findings spanning the
five most recent task review files plus task-057. Findings that were
already addressed in code but never checked off in the review files
are marked as worked with a note pointing to the resolving commit.
Behavioural changes
-------------------
- .github/workflows/verify-build.yml: pin every `uses:` entry to a
full 40-char commit SHA (actions/checkout@11bd719, actions/cache@
0057852, msys2/setup-msys2@e989830, codecov/codecov-action@75cd116);
pin the IWYU clone to clang_18 commit 377eaef + rev-parse assertion;
add a sha256-pin (4d51346…) for the macOS curl tarball, with
`curl -fsSL` and `set -euo pipefail`. Closes the SEC-04 supply-chain
gaps flagged by cloud-infrastructure-reviewer on TASK-059.
- src/httpserver/detail/webserver_impl.hpp: swap exact_routes_ from
std::unordered_map<std::string, route_entry> to std::map<std::string,
route_entry, std::less<>>. Removes the hash-flooding (CWE-407/400)
surface on the dispatch hot path, same posture TASK-056 applied to
the radix-tree per-segment child container.
- src/http_request.cpp operator<<: collapse four symmetric if/else
blocks over `expose` into a function-pointer dispatch plus a ternary
for the pass field.
- test/unit/v2_dispatch_contract_test.cpp: renumber PORT from 8231 to
8260 to break the EADDRINUSE race with
hooks_handler_exception_user_handler_throws_continues_chain under
`make check -j`.
Test changes
------------
- routing_regression_test.cpp: rename six `*_does_not_collide` tests
to `*_throws_collision`; the bodies assert LT_CHECK(threw), the old
names suggested the opposite.
- auth_handler_optional_signature_test.cpp: remove the redundant
hook-count test (now owned by hooks_alias_count_test.cpp); add a
throwing-handler pin (swallowed → request passes) and a 64 KB
payload pin (large engaged optional arrives intact). Paired
per-test PORT_N/PORT_N_STRING macros so curl URLs cannot silently
drift from the constructor port.
- hooks_alias_count_test.cpp: add legacy_auth_handler_registers_one_
before_handler under a TU-scoped #pragma so the deprecation warning
doesn't break -Werror; matches the pattern in the legacy shim TU.
- auth_handler_legacy_shim_test.cpp: drop the moved-out hook-count
assertion and the now-unused helper + include.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent e97361f commit 4e202dd
14 files changed
Lines changed: 233 additions & 153 deletions
File tree
- .github/workflows
- specs/unworked_review_issues
- src
- httpserver/detail
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
| 357 | + | |
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
| 471 | + | |
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
483 | 482 | | |
484 | 483 | | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
495 | 502 | | |
496 | 503 | | |
497 | 504 | | |
| |||
502 | 509 | | |
503 | 510 | | |
504 | 511 | | |
505 | | - | |
| 512 | + | |
506 | 513 | | |
507 | 514 | | |
508 | 515 | | |
509 | 516 | | |
510 | 517 | | |
511 | 518 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
524 | 534 | | |
525 | 535 | | |
526 | 536 | | |
| |||
556 | 566 | | |
557 | 567 | | |
558 | 568 | | |
559 | | - | |
| 569 | + | |
560 | 570 | | |
561 | 571 | | |
562 | 572 | | |
| |||
588 | 598 | | |
589 | 599 | | |
590 | 600 | | |
591 | | - | |
| 601 | + | |
592 | 602 | | |
593 | 603 | | |
594 | 604 | | |
| |||
660 | 670 | | |
661 | 671 | | |
662 | 672 | | |
663 | | - | |
| 673 | + | |
664 | 674 | | |
665 | 675 | | |
666 | 676 | | |
| |||
949 | 959 | | |
950 | 960 | | |
951 | 961 | | |
952 | | - | |
| 962 | + | |
953 | 963 | | |
954 | 964 | | |
955 | 965 | | |
| |||
Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | | - | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
| 22 | + | |
20 | 23 | | |
21 | | - | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
0 commit comments