Commit 8f055f5
[UPDATE PRIMITIVE]
* Initial plan
* Fix PR #236 review comments: refRange validation, ClassifiedResult.file, test mocking
1. Validate refRange in sarif_diff_by_commits to reject strings starting
with '-' or containing whitespace (prevents git option injection).
2. Use matchingDiff.path for ClassifiedResult.file when a diff match exists,
falling back to normalizeUri(uri) only for unmatched results (produces
repo-relative paths instead of long file:// URI paths).
3. Replace vi.doMock with module-scope vi.mock + shared mockExecuteCLICommand
to prevent module-cache flakiness in sarif_diff_by_commits handler tests.
Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/1960960b-9658-44b5-87d8-bc29cc55a5ef
Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>sarif_diff_by_commits — refRange validation, file path improvement, test mock fix (#242)1 parent 7a7f8df commit 8f055f5
File tree
6 files changed
+104
-50
lines changed- server
- dist
- src
- lib
- tools
- test/src
- lib
- tools
6 files changed
+104
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189548 | 189548 | | |
189549 | 189549 | | |
189550 | 189550 | | |
189551 | | - | |
| 189551 | + | |
189552 | 189552 | | |
189553 | 189553 | | |
189554 | 189554 | | |
| |||
200832 | 200832 | | |
200833 | 200833 | | |
200834 | 200834 | | |
| 200835 | + | |
| 200836 | + | |
| 200837 | + | |
| 200838 | + | |
| 200839 | + | |
| 200840 | + | |
| 200841 | + | |
| 200842 | + | |
200835 | 200843 | | |
200836 | 200844 | | |
200837 | 200845 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
949 | | - | |
| 949 | + | |
950 | 950 | | |
951 | 951 | | |
952 | 952 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
376 | 386 | | |
377 | 387 | | |
378 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1550 | 1550 | | |
1551 | 1551 | | |
1552 | 1552 | | |
| 1553 | + | |
| 1554 | + | |
1553 | 1555 | | |
1554 | 1556 | | |
1555 | 1557 | | |
| |||
1652 | 1654 | | |
1653 | 1655 | | |
1654 | 1656 | | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
1655 | 1677 | | |
1656 | 1678 | | |
1657 | 1679 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
| |||
507 | 514 | | |
508 | 515 | | |
509 | 516 | | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
524 | 528 | | |
525 | 529 | | |
526 | 530 | | |
| |||
538 | 542 | | |
539 | 543 | | |
540 | 544 | | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
553 | 555 | | |
554 | 556 | | |
555 | 557 | | |
| |||
569 | 571 | | |
570 | 572 | | |
571 | 573 | | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
601 | 599 | | |
602 | 600 | | |
603 | 601 | | |
| |||
612 | 610 | | |
613 | 611 | | |
614 | 612 | | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
615 | 629 | | |
616 | 630 | | |
617 | 631 | | |
0 commit comments