Repository navigation
Commit e9ecd0b
committed
fix(cli): count post-suppression findings in recursive multi-skill report
The recursive summary table and combined JSON report computed finding_count
from filtered_findings, but the report node returns filtered_findings as the
full pre-partition set (kept plus baseline-suppressed) and lists the suppressed
subset separately under suppressed_findings; it never reduces filtered_findings
to active-only. Counting len(filtered_findings) therefore reported
pre-suppression totals, so a baselined sub-skill showed score 0 but a non-zero
finding_count, disagreeing with the per-skill report body and risk score.
Add _result_finding_count(), which returns len(filtered_findings) -
len(suppressed_findings) when filtered_findings is a list (partition_findings
guarantees kept + suppressed == filtered_findings, so this is the active count),
and falls back to the raw findings length only when filtered_findings is absent
or not a list, without subtracting there since raw findings are not the
population that produced suppressed_findings. Use it at both the summary table
and the combined JSON report. Add a regression test covering a fully suppressed
sub-skill (active 0) and a partially suppressed one (active 1), plus a unit test
exercising each branch of the helper.
Refs NVIDIA#201
Signed-off-by: Werner Kasselman <[email protected]>1 parent a99a32d commit e9ecd0b
2 files changed
Lines changed: 128 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
378 | 402 | | |
379 | 403 | | |
380 | 404 | | |
| |||
429 | 453 | | |
430 | 454 | | |
431 | 455 | | |
432 | | - | |
433 | | - | |
| 456 | + | |
434 | 457 | | |
435 | 458 | | |
436 | 459 | | |
| |||
452 | 475 | | |
453 | 476 | | |
454 | 477 | | |
455 | | - | |
456 | | - | |
457 | | - | |
| 478 | + | |
458 | 479 | | |
459 | 480 | | |
460 | 481 | | |
461 | 482 | | |
462 | 483 | | |
463 | 484 | | |
464 | | - | |
465 | | - | |
466 | | - | |
| 485 | + | |
467 | 486 | | |
468 | 487 | | |
469 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
0 commit comments