Commit dc08c80
fix(locations): LocationData.code robust to unhashable context; progpilot scalars
CI (the V3-on rest-framework matrix variant) caught two coupled defects the
local V3-off run could not, since the emission only fires under V3:
- LocationData.code filtered unset context with `value not in {"", None}` — a
SET membership test that hashes `value`, so any unhashable value crashed with
"cannot use 'list' as a set element". Switched to tuple membership (`in
("", None)`), which compares by equality and never hashes — robust for every
call site, present and future.
- progpilot reports taint-source fields as single-element arrays
(source_name=["$sql"], source_line=[610]); the sweep passed those lists
straight into the context kwargs. Now collapsed to scalars via a _first()
helper, with str()/int guards.
Audited every other converted parser's context kwargs: all pass .text/int/
string scalars (checkmarx pathnode elements, sarif get_snippet, etc.) — progpilot
was the only list-valued source. Verified against the full unittests.tools suite
run with V3_FEATURE_LOCATIONS=True.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 58938cd commit dc08c80
2 files changed
Lines changed: 22 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
9 | 21 | | |
10 | 22 | | |
11 | 23 | | |
| |||
80 | 92 | | |
81 | 93 | | |
82 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
83 | 98 | | |
84 | 99 | | |
85 | 100 | | |
86 | 101 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
91 | 106 | | |
92 | 107 | | |
93 | 108 | | |
| |||
0 commit comments