Repository navigation
Commit 7fa7f8d
committed
Replace execSync calls with execFileSync to avoid shell interpolation issues
- Shell Command String Interpolation (execSync) in Git Utilities • Locations: • replace_commit_symbol • handle_commit_item • select_files_of_commit_command • check_command_exists • Description: • These functions invoke execSync(\git show ${commit_hash}`)(using a shell) rather thanexecFileSync('git', ['show', commit_hash]). Currently commit_hashis constrained to hex characters by regex orgit logoutput, andcmdincheck_command_existscomes from the staticCLI_AGENTS` array, so it is not directly exploitable today, but shell interpolation is fragile if upstream callers change. • Remediation: • Standardize on execFileSync('git', [...]) without a shell across all Git helpers.
└── apps
└── editor
└── src
├── commands
│ └── select-files-of-commit-command.ts
├── extension.ts
├── features
│ └── agentic-search
│ └── agentic-search.ts
├── utils
│ └── agentic-cli-invocation
│ ├── agents
│ │ ├── antigravity.ts
│ │ ├── claude.ts
│ │ ├── codex.ts
│ │ ├── cursor.ts
│ │ ├── grok.ts
│ │ ├── index.ts
│ │ └── opencode.ts
│ ├── invoke-agentic-cli.ts
│ └── utils
│ └── check-command-exists.ts
└── views
├── prompt
│ └── backend
│ ├── message-handlers
│ │ ├── handle-preview-commit-symbol.ts
│ │ └── utils
│ │ ├── build-cli-prompt.ts
│ │ └── build-prompt-payload.ts
│ ├── prompt-view-provider.ts
│ └── utils
│ └── symbols
│ ├── git
│ │ └── replace-git-symbols.ts
│ └── replace-symbols.ts
└── shared
└── utils
└── hash-sign-quick-pick
├── hash-sign-quick-pick.ts
└── symbols
├── commit-symbol.ts
└── index.ts1 parent 7f16cbb commit 7fa7f8d
4 files changed
Lines changed: 76 additions & 36 deletions
File tree
- apps/editor/src
- commands
- utils/agentic-cli-invocation/utils
- views
- prompt/backend/utils/symbols/git
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
150 | 155 | | |
151 | 156 | | |
152 | 157 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
157 | 166 | | |
158 | 167 | | |
159 | 168 | | |
| |||
264 | 273 | | |
265 | 274 | | |
266 | 275 | | |
267 | | - | |
268 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
269 | 284 | | |
270 | 285 | | |
271 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
212 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| |||
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
234 | | - | |
235 | | - | |
236 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
237 | 243 | | |
238 | 244 | | |
239 | 245 | | |
| |||
349 | 355 | | |
350 | 356 | | |
351 | 357 | | |
352 | | - | |
353 | | - | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
354 | 361 | | |
355 | 362 | | |
356 | 363 | | |
| |||
372 | 379 | | |
373 | 380 | | |
374 | 381 | | |
375 | | - | |
376 | | - | |
377 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
378 | 390 | | |
379 | 391 | | |
380 | 392 | | |
| |||
602 | 614 | | |
603 | 615 | | |
604 | 616 | | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
609 | 625 | | |
610 | 626 | | |
611 | 627 | | |
| |||
626 | 642 | | |
627 | 643 | | |
628 | 644 | | |
629 | | - | |
| 645 | + | |
630 | 646 | | |
631 | 647 | | |
632 | 648 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
| |||
208 | 213 | | |
209 | 214 | | |
210 | 215 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
215 | 224 | | |
216 | 225 | | |
217 | 226 | | |
| |||
220 | 229 | | |
221 | 230 | | |
222 | 231 | | |
223 | | - | |
| 232 | + | |
224 | 233 | | |
225 | 234 | | |
226 | 235 | | |
| |||
0 commit comments