Repository navigation
Commit 2ba149d
fix(analyzer): keep one TM1 owner for true-prefixed names without AST proof
Port the six true-prefixed TM1 regression tests from NVIDIA#577. This branch
already carries test_true_direct_calls_on_one_line_keep_distinct_locations
unchanged, so only the other five are added. Two of them reported the
same call twice on this branch:
- A variable window for a name spelled `true` (in any case) duplicated
the case-insensitive direct `shell=True` owner at the same call. AST
reconciliation removes that window only when the dataflow companion
takes the call, so a file that does not parse, or a call after an
unknown receiver effect, kept both findings. coalesce_path_findings
now drops such a window when a direct lexical owner starts at the
same call. A window for a call whose direct candidate was folded into
an identical same-line call still reports that call.
- A call-anchored window for a longer true-prefixed name (`true_value`)
used its raw text as identity, so the raw and normalized security
views of one call did not collapse, and reconciliation then moved both
to the call. The window now takes its identity from the normalized
view text, as the direct owner already does.
Also cover both root causes with a test for a nested `true` call after
an unknown receiver effect and a normalized `true_value` call in a file
that does not parse.
Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 8ed05b6 commit 2ba149d
2 files changed
Lines changed: 100 additions & 2 deletions
File tree
- src/skillspector/nodes/analyzers
- tests/nodes/analyzers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5162 | 5162 | | |
5163 | 5163 | | |
5164 | 5164 | | |
| 5165 | + | |
| 5166 | + | |
| 5167 | + | |
5165 | 5168 | | |
5166 | 5169 | | |
5167 | 5170 | | |
| |||
5277 | 5280 | | |
5278 | 5281 | | |
5279 | 5282 | | |
| 5283 | + | |
| 5284 | + | |
| 5285 | + | |
| 5286 | + | |
| 5287 | + | |
| 5288 | + | |
| 5289 | + | |
| 5290 | + | |
| 5291 | + | |
| 5292 | + | |
| 5293 | + | |
| 5294 | + | |
| 5295 | + | |
5280 | 5296 | | |
5281 | 5297 | | |
5282 | 5298 | | |
5283 | 5299 | | |
5284 | | - | |
5285 | | - | |
| 5300 | + | |
| 5301 | + | |
| 5302 | + | |
5286 | 5303 | | |
5287 | 5304 | | |
5288 | 5305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1508 | 1508 | | |
1509 | 1509 | | |
1510 | 1510 | | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
0 commit comments