Commit 472d780
fix(security): escape quotes in HTML attrs + mark node-id hash non-security
CodeQL alerts:
- #80–83 (Medium, js/incomplete-sanitization): _esc/esc in trace.js +
trace_detail.js escaped <>& but NOT quotes, so a value containing " broke
out of data-file="…" / data-path="…" / data-sid="…" attributes (XSS).
Both helpers now escape " → " and ' → ' — safe in text AND
quoted-attribute contexts. Also escape the (constant) data-lazy value.
- #79 (High, py/weak-sensitive-data-hashing): _short_hash in
workflow_graph_schema.py mints DETERMINISTIC NODE IDs (non-security). Add
usedforsecurity=False to document intent + let CodeQL skip it. SHA-1 kept
(not upgraded) so existing node IDs stay stable across graphs/snapshots.
py compile + ruff clean; trace.js/trace_detail.js parse.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent c573a3f commit 472d780
3 files changed
Lines changed: 22 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
121 | 129 | | |
122 | 130 | | |
123 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
349 | 353 | | |
350 | | - | |
| 354 | + | |
| 355 | + | |
351 | 356 | | |
352 | 357 | | |
353 | 358 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | | - | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
57 | | - | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| |||
0 commit comments