Commit 63c62fd
fix: resolve 12 CodeQL security findings
py/path-injection (10 findings):
- governance_logic.py: add _safe_resolve() helper that rejects null bytes
and .. traversal components before Path.resolve(); use it in
run_preflight(), run_verify(), and _read_confidence_threshold()
- broker.py: add _safe_file_read() helper with the same validation;
apply in parse_requirements() and infer_scope() before all file reads
py/http-response-splitting (1 finding):
- governance_logic.py: strip CR/LF from req_role, effective_model, and
effective_provider before writing them to X-Specsmith-* response headers
py/incomplete-url-substring-sanitization (1 finding):
- tests/test_intelligence.py: replace bare 'in e.base_url' substring check
with urlparse() hostname comparison for the OpenAI URL assertion
Co-Authored-By: Oz <oz-agent@warp.dev>1 parent 0d0307d commit 63c62fd
3 files changed
Lines changed: 57 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
45 | 60 | | |
46 | 61 | | |
47 | 62 | | |
| |||
190 | 205 | | |
191 | 206 | | |
192 | 207 | | |
193 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
194 | 212 | | |
195 | 213 | | |
196 | 214 | | |
| |||
258 | 276 | | |
259 | 277 | | |
260 | 278 | | |
261 | | - | |
262 | | - | |
| 279 | + | |
| 280 | + | |
263 | 281 | | |
264 | 282 | | |
265 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
22 | 40 | | |
23 | 41 | | |
24 | 42 | | |
| |||
46 | 64 | | |
47 | 65 | | |
48 | 66 | | |
49 | | - | |
| 67 | + | |
50 | 68 | | |
51 | 69 | | |
52 | 70 | | |
| |||
180 | 198 | | |
181 | 199 | | |
182 | 200 | | |
183 | | - | |
| 201 | + | |
184 | 202 | | |
185 | 203 | | |
186 | 204 | | |
| |||
735 | 753 | | |
736 | 754 | | |
737 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
738 | 761 | | |
739 | | - | |
740 | | - | |
741 | | - | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
742 | 765 | | |
743 | 766 | | |
744 | 767 | | |
| |||
837 | 860 | | |
838 | 861 | | |
839 | 862 | | |
840 | | - | |
| 863 | + | |
| 864 | + | |
841 | 865 | | |
842 | 866 | | |
843 | 867 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
99 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| |||
0 commit comments