-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpackage.json
More file actions
242 lines (242 loc) · 11.6 KB
/
Copy pathpackage.json
File metadata and controls
242 lines (242 loc) · 11.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
{
"name": "vscode-codeql-development-mcp-server",
"displayName": "CodeQL Development MCP Server",
"description": "LLM-assisted development of CodeQL queries, libraries, and tests via #ql-mcp prompts, resources, and tools.",
"version": "2.26.2",
"publisher": "advanced-security",
"license": "LicenseRef-CodeQL-Terms",
"icon": "media/codeql-icon.png",
"repository": {
"type": "git",
"url": "git+https://github.com/advanced-security/codeql-development-mcp-server.git"
},
"type": "module",
"homepage": "https://github.com/advanced-security/codeql-development-mcp-server#readme",
"bugs": {
"url": "https://github.com/advanced-security/codeql-development-mcp-server/issues"
},
"engines": {
"vscode": "^1.115.0",
"node": "^24.15.0 || >=26.0.0"
},
"categories": [
"AI",
"Programming Languages",
"Other"
],
"keywords": [
"codeql",
"mcp",
"model-context-protocol",
"static-analysis",
"security"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./dist/extension.cjs",
"extensionDependencies": [
"GitHub.vscode-codeql"
],
"contributes": {
"mcpServerDefinitionProviders": [
{
"id": "ql-mcp",
"label": "CodeQL Development MCP Server"
}
],
"configuration": {
"title": "CodeQL MCP Server",
"properties": {
"codeql-mcp.additionalDatabaseDirs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Additional directories to search for CodeQL databases. Appended to CODEQL_DATABASES_BASE_DIRS. When copyDatabases is enabled (default), they are appended alongside the managed databases directory; when copyDatabases is disabled, they are appended alongside the original vscode-codeql database storage directories."
},
"codeql-mcp.additionalEnv": {
"type": "object",
"default": {},
"description": "Additional environment variables to pass to the MCP server process.",
"additionalProperties": {
"type": "string"
}
},
"codeql-mcp.additionalMrvaRunResultsDirs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Additional directories containing MRVA run result subdirectories. Appended to CODEQL_MRVA_RUN_RESULTS_DIRS alongside the vscode-codeql variant analysis storage path."
},
"codeql-mcp.additionalQueryRunResultsDirs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Additional directories containing query run result subdirectories. Appended to CODEQL_QUERY_RUN_RESULTS_DIRS alongside the vscode-codeql query storage path."
},
"codeql-mcp.autoDownloadPacks": {
"type": "boolean",
"default": true,
"markdownDescription": "Automatically download pre-compiled tool query packs from GHCR that match the detected CodeQL CLI version. When disabled, the extension uses only the VSIX-bundled packs via `codeql pack install` (which requires compilation against the local CLI). Disable this if you want strict use of the bundled packs for the same overall version of both CodeQL CLI and ql-mcp server."
},
"codeql-mcp.autoInstall": {
"type": "boolean",
"default": true,
"description": "Automatically install and update the CodeQL Development MCP Server on activation."
},
"codeql-mcp.copyDatabases": {
"type": "boolean",
"default": true,
"markdownDescription": "Copy CodeQL databases from the `GitHub.vscode-codeql` extension storage into a managed directory, removing query-server lock files so the MCP server CLI can operate without contention. Disable to use databases in-place (may fail when the CodeQL query server is running)."
},
"codeql-mcp.queryPackIncludeDirs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "Extra directories to resolve CodeQL query and pack paths against, **in addition** to the folders selected by `codeql-mcp.requireCodeqlWorkspace`. This is the explicit opt-in for CodeQL development outside the default `codeql-workspace.yml` pattern: entries here are **always** included as resolution roots, even when they do not contain a top-level `codeql-workspace.yml`. Use it to target a query repository that is **not** opened as the first workspace folder (or is not opened as a folder at all). Absolute paths are used as-is; relative paths are resolved against **every** workspace folder (so `queries` expands to one candidate per root). Folded into `CODEQL_MCP_WORKSPACE_FOLDERS` and `CODEQL_ADDITIONAL_PACKS`."
},
"codeql-mcp.queryPackExcludeDirs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "Directories to exclude when resolving CodeQL query and pack paths. Any workspace folder or `queryPackIncludeDirs` entry that matches (or is nested inside) one of these directories is dropped from `CODEQL_MCP_WORKSPACE_FOLDERS` and `CODEQL_ADDITIONAL_PACKS`. Absolute paths are used as-is; relative paths are resolved against every workspace folder. This excludes whole resolution **roots**; to exclude specific sub-paths or globs *within* a CodeQL workspace, prefer the `ignore:` block of that folder's `codeql-workspace.yml` (the CodeQL-native mechanism), or use `scanExcludeDirs` to skip nested directory names (e.g. `node_modules`) during scans."
},
"codeql-mcp.requireCodeqlWorkspace": {
"type": "boolean",
"default": true,
"markdownDescription": "By default, only workspace folders that contain a top-level `codeql-workspace.yml` file are used as CodeQL query/pack **resolution roots**. This matches the CodeQL CLI's own [CodeQL workspaces](https://docs.github.com/en/code-security/concepts/code-scanning/codeql/codeql-workspaces) model and avoids scanning unrelated repositories opened as workspace folders. Folders listed in `codeql-mcp.queryPackIncludeDirs` are **always** included regardless of this setting. Set this to `false` to fall back to the legacy behavior of treating **every** open workspace folder as a resolution root. When this is `true` but no open folder has a `codeql-workspace.yml` and no `queryPackIncludeDirs` are configured, the extension falls back to using every folder and logs a warning, so existing setups keep working."
},
"codeql-mcp.serverArgs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Custom arguments for the MCP server command. When empty, the bundled server entry point is used automatically. Set to e.g. ['/path/to/server/dist/codeql-development-mcp-server.js'] for local development."
},
"codeql-mcp.serverCommand": {
"type": "string",
"default": "node",
"description": "Command to launch the MCP server. The default 'node' runs the bundled server. Override to 'npx' to download from npm, or provide a custom path."
},
"codeql-mcp.serverVersion": {
"type": "string",
"default": "latest",
"description": "The npm version of codeql-development-mcp-server to install. Use 'latest' for the most recent release."
},
"codeql-mcp.scratchDir": {
"type": "string",
"default": ".codeql/ql-mcp",
"markdownDescription": "Workspace-relative path for the ql-mcp scratch directory used for temporary files (query logs, external predicates, etc). The `.codeql/` parent is shared with other CodeQL CLI commands like `codeql pack bundle`. Set to an absolute path to override workspace-relative resolution."
},
"codeql-mcp.scanExcludeDirs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "Additional directory names to exclude from workspace scanning (prompt completions, QL code search). Entries are merged with the built-in defaults (`.git`, `node_modules`, `dist`, etc.). Prefix an entry with `!` to remove a default (e.g., `!build` re-includes the `build` directory). Passed to the server as `CODEQL_MCP_SCAN_EXCLUDE_DIRS`."
},
"codeql-mcp.watchCodeqlExtension": {
"type": "boolean",
"default": true,
"description": "Watch for CodeQL databases and query results created by the CodeQL extension."
}
}
},
"chatAgents": [
{
"path": "./agents/ql-mcp-ext-query-developer.agent.md"
},
{
"path": "./agents/ql-mcp-ext-workshop-author.agent.md"
}
],
"chatSkills": [
{
"name": "ql-mcp-ext-create-workshop",
"path": "./skills/ql-mcp-ext-create-workshop/SKILL.md"
},
{
"name": "ql-mcp-ext-validate-tools-queries",
"path": "./skills/ql-mcp-ext-validate-tools-queries/SKILL.md"
}
],
"commands": [
{
"command": "codeql-mcp.reinstallServer",
"title": "Reinstall MCP Server",
"category": "CodeQL MCP"
},
{
"command": "codeql-mcp.reinstallPacks",
"title": "Reinstall CodeQL Tool Query Packs",
"category": "CodeQL MCP"
},
{
"command": "codeql-mcp.showAgentsStatus",
"title": "Show Built-in Custom Agents Status",
"category": "CodeQL MCP"
},
{
"command": "codeql-mcp.showStatus",
"title": "Show Status",
"category": "CodeQL MCP"
},
{
"command": "codeql-mcp.showLogs",
"title": "Show Logs",
"category": "CodeQL MCP"
}
]
},
"scripts": {
"build": "npm run clean && npm run lint && npm run bundle",
"bundle": "npm run rebuild:esbuild && node esbuild.config.js",
"bundle:customizations": "node scripts/bundle-customizations.js",
"bundle:server": "node scripts/bundle-server.js",
"clean": "rm -rf dist server agents prompts skills .vscode-test/* *.vsix dist-customizations-manifest.json",
"download:vscode": "node scripts/download-vscode.js",
"lint": "eslint src/ test/",
"lint:fix": "eslint src/ test/ --fix",
"package": "vsce package --no-dependencies --out codeql-development-mcp-server-v$(node -e 'process.stdout.write(require(`./package.json`).version)').vsix",
"rebuild:esbuild": "npm rebuild esbuild --ignore-scripts=false",
"test": "npm run test:coverage && npm run test:integration",
"test:coverage": "vitest --run --coverage",
"test:integration": "npm run download:vscode && npm run bundle:customizations && npm run bundle && vscode-test",
"test:integration:label": "vscode-test --label",
"test:watch": "vitest --watch",
"vscode:prepublish": "npm run clean && npm run lint && npm run bundle && npm run bundle:server && npm run bundle:customizations",
"watch": "npm run rebuild:esbuild && node esbuild.config.js --watch"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/mocha": "^10.0.10",
"@types/node": "^26.1.1",
"@types/vscode": "^1.115.0",
"@vitest/coverage-v8": "^4.1.10",
"@vscode/test-cli": "^0.0.15",
"@vscode/test-electron": "^3.0.0",
"@vscode/vsce": "^3.9.2",
"esbuild": "^0.28.1",
"eslint": "^10.7.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.6",
"glob": "^13.0.6",
"mocha": "^11.7.6",
"prettier": "^3.9.6",
"typescript": "^7.0.2",
"typescript-eslint": "^8.65.0",
"vitest": "^4.1.10"
}
}