Commit 1f75bdc
Fix bqrs_interpret: defensive coercion for file parameter array/bracket handling
Some MCP clients send the file parameter as a JSON-encoded array string
like '["/path/to/file.bqrs"]' or as an actual array instead of a plain
string. The handler now defensively detects both cases and extracts the
clean file path.
TDD: Added 2 regression tests for JSON-encoded array strings and actual
array values passed as the file parameter.
Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/6ff74bab-c637-4e18-a5dc-92e3065583f4
Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>1 parent 7a590b4 commit 1f75bdc
4 files changed
Lines changed: 91 additions & 4 deletions
File tree
- server
- dist
- src/lib
- test/src/lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187355 | 187355 | | |
187356 | 187356 | | |
187357 | 187357 | | |
187358 | | - | |
| 187358 | + | |
| 187359 | + | |
| 187360 | + | |
| 187361 | + | |
| 187362 | + | |
| 187363 | + | |
| 187364 | + | |
| 187365 | + | |
| 187366 | + | |
| 187367 | + | |
| 187368 | + | |
187359 | 187369 | | |
187360 | 187370 | | |
187361 | 187371 | | |
| |||
0 commit comments