bugxhunter 0.8.4 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -118,7 +118,9 @@ Two containers:
|
|
|
118
118
|
powershell -File docker/copy-out.ps1 my-repo C:\temp\my-repo-out
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
(Plain `docker compose cp` also copies in, but leaves files owned by root, so the agent
|
|
121
|
+
(Plain `docker compose cp` also copies in, but leaves files owned by root, so neither the agent nor uploads can
|
|
122
|
+
write there. To fix a folder copied that way: `docker run --rm -u root -v bugxhunter_workspace:/workspace
|
|
123
|
+
--entrypoint chown ghcr.io/cintelis/bugxhunter-agent -R node:node /workspace/<folder>`.)
|
|
122
124
|
- **Getting files out**: `/workspace` is a Docker volume, so there is no host folder to open. Any
|
|
123
125
|
file path the agent prints under the project (for example "Saved as
|
|
124
126
|
`/workspace/acme/app/analysis.md`") is a download link in the UI, served only for files inside
|
|
@@ -313,6 +315,8 @@ GHCR images by digest) and the signed `checksums.txt` that covers them all.
|
|
|
313
315
|
<!-- releases:start -->
|
|
314
316
|
| Release | Published | Checksums | Signature | Signature check | Build |
|
|
315
317
|
| --- | --- | --- | --- | --- | --- |
|
|
318
|
+
| [v0.8.5](https://github.com/cintelis/bugxhunter-runner/releases/tag/v0.8.5) | 2026-10-21 | [checksums.txt](https://github.com/cintelis/bugxhunter-runner/releases/download/v0.8.5/checksums.txt) | [checksums.txt.sig](https://github.com/cintelis/bugxhunter-runner/releases/download/v0.8.5/checksums.txt.sig) | ✅ release key | [workflow run](https://github.com/cintelis/bugxhunter-runner/actions/runs/39618294874) |
|
|
319
|
+
| [v0.8.4](https://github.com/cintelis/bugxhunter-runner/releases/tag/v0.8.4) | 2026-10-21 | [checksums.txt](https://github.com/cintelis/bugxhunter-runner/releases/download/v0.8.4/checksums.txt) | [checksums.txt.sig](https://github.com/cintelis/bugxhunter-runner/releases/download/v0.8.4/checksums.txt.sig) | ✅ release key | [workflow run](https://github.com/cintelis/bugxhunter-runner/actions/runs/39600671629) |
|
|
316
320
|
| [v0.8.3](https://github.com/cintelis/bugxhunter-runner/releases/tag/v0.8.3) | 2026-10-21 | [checksums.txt](https://github.com/cintelis/bugxhunter-runner/releases/download/v0.8.3/checksums.txt) | [checksums.txt.sig](https://github.com/cintelis/bugxhunter-runner/releases/download/v0.8.3/checksums.txt.sig) | ✅ release key | [workflow run](https://github.com/cintelis/bugxhunter-runner/actions/runs/39593447575) |
|
|
317
321
|
| [v0.8.2](https://github.com/cintelis/bugxhunter-runner/releases/tag/v0.8.2) | 2026-10-21 | [checksums.txt](https://github.com/cintelis/bugxhunter-runner/releases/download/v0.8.2/checksums.txt) | [checksums.txt.sig](https://github.com/cintelis/bugxhunter-runner/releases/download/v0.8.2/checksums.txt.sig) | ✅ release key | [workflow run](https://github.com/cintelis/bugxhunter-runner/actions/runs/39570620468) |
|
|
318
322
|
| [v0.8.1](https://github.com/cintelis/bugxhunter-runner/releases/tag/v0.8.1) | 2026-10-09 | [checksums.txt](https://github.com/cintelis/bugxhunter-runner/releases/download/v0.8.1/checksums.txt) | [checksums.txt.sig](https://github.com/cintelis/bugxhunter-runner/releases/download/v0.8.1/checksums.txt.sig) | ✅ release key | [workflow run](https://github.com/cintelis/bugxhunter-runner/actions/runs/37888271992) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bugxhunter",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "BugXHunter: an AI security-testing agent with a sandboxed runner, a passkey-sealed key vault and read-only GitHub access. `npx bugxhunter` runs it on your machine.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://bugxhunter.com",
|
package/server/dist/opencode.js
CHANGED
|
@@ -20,7 +20,7 @@ import { execFileSync } from "node:child_process";
|
|
|
20
20
|
import { fileURLToPath } from "node:url";
|
|
21
21
|
import { createOpencodeServer, createOpencodeClient } from "@opencode-ai/sdk";
|
|
22
22
|
import { httpError } from "./errors.js";
|
|
23
|
-
import { openrouterOpencodeProvider, OPENROUTER_MODELS, PORT } from "./providers.js";
|
|
23
|
+
import { openrouterOpencodeProvider, nvidiaOpencodeProvider, OPENROUTER_MODELS, PORT } from "./providers.js";
|
|
24
24
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
25
25
|
/** BugXHunter's own folder: the default project when none is chosen. */
|
|
26
26
|
export const REPO_ROOT = path.resolve(__dirname, "../..");
|
|
@@ -53,6 +53,8 @@ export const VISION_AGENT = {
|
|
|
53
53
|
*/
|
|
54
54
|
async function inlineConfig() {
|
|
55
55
|
const openrouter = await openrouterOpencodeProvider(`http://127.0.0.1:${PORT}/openrouter/v1`);
|
|
56
|
+
const nvidia = await nvidiaOpencodeProvider(`http://127.0.0.1:${PORT}/nvidia/v1`);
|
|
57
|
+
const provider = { ...(openrouter ? { openrouter } : {}), ...(nvidia ? { nvidia } : {}) };
|
|
56
58
|
return {
|
|
57
59
|
model: DEFAULT_MODEL,
|
|
58
60
|
agent: {
|
|
@@ -61,7 +63,7 @@ async function inlineConfig() {
|
|
|
61
63
|
vision: VISION_AGENT,
|
|
62
64
|
},
|
|
63
65
|
permission: { edit: "ask", bash: "ask" },
|
|
64
|
-
...(
|
|
66
|
+
...(Object.keys(provider).length ? { provider } : {}),
|
|
65
67
|
};
|
|
66
68
|
}
|
|
67
69
|
/** Fixed port, so a server orphaned by a hard restart can be found and stopped. */
|
package/server/dist/providers.js
CHANGED
|
@@ -35,9 +35,25 @@ export const PROVIDERS = {
|
|
|
35
35
|
// Attribution headers OpenRouter asks apps to send.
|
|
36
36
|
headers: { "HTTP-Referer": "https://bugxhunter.com", "X-Title": "BugXHunter" },
|
|
37
37
|
},
|
|
38
|
+
nvidia: {
|
|
39
|
+
id: "nvidia", name: "NVIDIA NIM", baseUrl: process.env.NVIDIA_BASE_URL ?? "https://integrate.api.nvidia.com/v1",
|
|
40
|
+
// `NVIDI_NGC_POC` is the name the NGC proof-of-concept key already uses in .env; `NVIDIA_API_KEY` is the tidy one.
|
|
41
|
+
vaultItem: "NVIDIA_API_KEY", envVars: ["NVIDIA_API_KEY", "NVIDI_NGC_POC"], fileVar: "NVIDIA_API_KEY_FILE", authId: "nvidia",
|
|
42
|
+
},
|
|
38
43
|
};
|
|
39
44
|
/** OpenRouter ids the agent may use (OPENROUTER_MODELS=anthropic/claude-sonnet-4.5,openai/gpt-6.1-sol). */
|
|
40
45
|
export const OPENROUTER_MODELS = (process.env.OPENROUTER_MODELS ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
46
|
+
const NVIDIA_CATALOGUE = {
|
|
47
|
+
"z-ai/glm-5.3": { name: "GLM-5.3 (NVIDIA)", context: 200_000, output: 32_000, features: ["tools", "reasoning", "json_mode"], description: "Z.ai GLM-5.3 served on NVIDIA NIM — the same family as the SCX default." },
|
|
48
|
+
"z-ai/glm-5.3-flash": { name: "GLM-5.3 Flash (NVIDIA)", context: 200_000, output: 32_000, features: ["tools", "json_mode"], description: "Faster GLM-5.3 variant on NVIDIA NIM." },
|
|
49
|
+
"nvidia/nemotron-3-ultra-550b-a55b": { name: "Nemotron 3 Ultra 550B", context: 128_000, output: 32_000, features: ["tools", "reasoning", "json_mode"], description: "NVIDIA's strongest open reasoning model; good for the agent when depth matters." },
|
|
50
|
+
"deepseek-ai/deepseek-v4.1-flash": { name: "DeepSeek V4.1 Flash", context: 128_000, output: 16_000, features: ["tools", "json_mode"], description: "Fast DeepSeek chat/agent model." },
|
|
51
|
+
"nvidia/nemotron-3.5-lightning-30b-a3b": { name: "Nemotron 3.5 Lightning 30B", context: 128_000, output: 16_000, features: ["tools", "json_mode"], description: "Fast Nemotron for quick turns." },
|
|
52
|
+
"nvidia/nemotron-3.5-super-vl-120b-a12b": { name: "Nemotron 3.5 Super VL 120B", context: 128_000, output: 16_000, image: true, features: ["tools", "json_mode"], description: "Vision-language Nemotron; reads images (good for the vision subagent)." },
|
|
53
|
+
};
|
|
54
|
+
/** Upstream NVIDIA ids the Playground and agent may use (default = the curated set above). */
|
|
55
|
+
export const NVIDIA_MODELS = (process.env.NVIDIA_MODELS ?? Object.keys(NVIDIA_CATALOGUE).join(","))
|
|
56
|
+
.split(",").map((s) => s.trim()).filter(Boolean);
|
|
41
57
|
export const PORT = Number(process.env.PORT ?? 8790);
|
|
42
58
|
/**
|
|
43
59
|
* The token the agent presents to the proxy. From .env in Docker (both
|
|
@@ -115,17 +131,20 @@ export function apiKey(id) {
|
|
|
115
131
|
default:
|
|
116
132
|
throw httpError(503, id === "scx"
|
|
117
133
|
? "No SCX API key. Set up the vault in the sidebar, or run `opencode auth login` (provider id: scx)."
|
|
118
|
-
:
|
|
134
|
+
: `No ${p.name} key. Add ${p.vaultItem} to the vault (keys dialog) to use ${p.name} models.`);
|
|
119
135
|
}
|
|
120
136
|
}
|
|
121
137
|
export const clients = {
|
|
122
138
|
scx: new SCXClient({ apiKey: () => apiKey("scx"), baseUrl: PROVIDERS.scx.baseUrl }),
|
|
123
139
|
openrouter: new SCXClient({ apiKey: () => apiKey("openrouter"), baseUrl: PROVIDERS.openrouter.baseUrl, headers: PROVIDERS.openrouter.headers }),
|
|
140
|
+
nvidia: new SCXClient({ apiKey: () => apiKey("nvidia"), baseUrl: PROVIDERS.nvidia.baseUrl }),
|
|
124
141
|
};
|
|
125
|
-
/** Playground model ids: SCX ids as-is, OpenRouter ids prefixed `openrouter/`. */
|
|
142
|
+
/** Playground model ids: SCX ids as-is, OpenRouter ids prefixed `openrouter/`, NVIDIA NIM ids `nim/`. */
|
|
126
143
|
export function clientFor(model) {
|
|
127
144
|
if (model.startsWith("openrouter/"))
|
|
128
145
|
return { client: clients.openrouter, model: model.slice("openrouter/".length), provider: "openrouter" };
|
|
146
|
+
if (model.startsWith("nim/"))
|
|
147
|
+
return { client: clients.nvidia, model: model.slice("nim/".length), provider: "nvidia" };
|
|
129
148
|
return { client: clients.scx, model, provider: "scx" };
|
|
130
149
|
}
|
|
131
150
|
const SAMPLING = new Set(["temperature", "top_p", "top_k", "max_tokens", "stop", "frequency_penalty", "presence_penalty", "repetition_penalty", "seed", "min_p", "top_a"]);
|
|
@@ -160,20 +179,44 @@ async function openRouterCatalogue() {
|
|
|
160
179
|
throw new Error(`OpenRouter /models replied ${r.status}`);
|
|
161
180
|
return (await r.json()).data ?? [];
|
|
162
181
|
}
|
|
163
|
-
/**
|
|
182
|
+
/** A curated NVIDIA NIM model as an SCXModel (Playground id `nim/<upstream id>`). */
|
|
183
|
+
export function nvidiaModel(id, meta) {
|
|
184
|
+
return {
|
|
185
|
+
id: `nim/${id}`,
|
|
186
|
+
name: meta.name,
|
|
187
|
+
created: 0,
|
|
188
|
+
input_modalities: meta.image ? ["text", "image"] : ["text"],
|
|
189
|
+
output_modalities: ["text"],
|
|
190
|
+
context_length: meta.context,
|
|
191
|
+
max_output_length: meta.output,
|
|
192
|
+
pricing: {}, // free trial tier — no per-token price
|
|
193
|
+
supported_sampling_parameters: ["temperature", "top_p", "max_tokens", "stop", "frequency_penalty", "presence_penalty", "seed"],
|
|
194
|
+
supported_features: meta.features,
|
|
195
|
+
description: meta.description,
|
|
196
|
+
provider: "nvidia",
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
/** The curated NVIDIA models that have catalogue metadata and are in the allowlist. */
|
|
200
|
+
function nvidiaModels() {
|
|
201
|
+
if (!configured("nvidia"))
|
|
202
|
+
return [];
|
|
203
|
+
return NVIDIA_MODELS.filter((id) => NVIDIA_CATALOGUE[id]).map((id) => nvidiaModel(id, NVIDIA_CATALOGUE[id]));
|
|
204
|
+
}
|
|
205
|
+
/** Every model the Playground can use: SCX's, plus OpenRouter's and NVIDIA's when their keys are configured. */
|
|
164
206
|
export async function listModels() {
|
|
165
207
|
const scx = (await clients.scx.listModels()).map((m) => ({ ...m, provider: "scx" }));
|
|
208
|
+
const nvidia = nvidiaModels();
|
|
166
209
|
if (!configured("openrouter"))
|
|
167
|
-
return scx;
|
|
210
|
+
return [...scx, ...nvidia];
|
|
168
211
|
try {
|
|
169
212
|
const all = (await openRouterCatalogue()).map(normaliseOpenRouter);
|
|
170
213
|
const allow = new Set(OPENROUTER_MODELS.map((id) => `openrouter/${id}`));
|
|
171
214
|
const picked = allow.size ? all.filter((m) => allow.has(m.id)) : all;
|
|
172
|
-
return [...scx, ...picked.sort((a, b) => a.name.localeCompare(b.name))];
|
|
215
|
+
return [...scx, ...nvidia, ...picked.sort((a, b) => a.name.localeCompare(b.name))];
|
|
173
216
|
}
|
|
174
217
|
catch (e) {
|
|
175
218
|
console.error("[openrouter] model list failed:", e.message);
|
|
176
|
-
return scx;
|
|
219
|
+
return [...scx, ...nvidia];
|
|
177
220
|
}
|
|
178
221
|
}
|
|
179
222
|
/**
|
|
@@ -213,4 +256,29 @@ export async function openrouterOpencodeProvider(proxyBaseUrl) {
|
|
|
213
256
|
models,
|
|
214
257
|
};
|
|
215
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* An OpenCode provider for the agent, calling back through the runner's proxy
|
|
261
|
+
* with the proxy token, for the curated NVIDIA models in NVIDIA_MODELS. Keyed
|
|
262
|
+
* only when an NVIDIA key is configured, so the agent never sees a provider it
|
|
263
|
+
* cannot authenticate. Limits come from the curated catalogue; defaults otherwise.
|
|
264
|
+
*/
|
|
265
|
+
export async function nvidiaOpencodeProvider(proxyBaseUrl) {
|
|
266
|
+
if (!NVIDIA_MODELS.length || !configured("nvidia"))
|
|
267
|
+
return null;
|
|
268
|
+
const models = {};
|
|
269
|
+
for (const id of NVIDIA_MODELS) {
|
|
270
|
+
const meta = NVIDIA_CATALOGUE[id];
|
|
271
|
+
models[id] = {
|
|
272
|
+
name: meta?.name ?? id,
|
|
273
|
+
limit: { context: meta?.context ?? 128_000, output: meta?.output ?? 16_000 },
|
|
274
|
+
...(meta?.image ? { attachment: true, modalities: { input: ["text", "image"], output: ["text"] } } : {}),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
return {
|
|
278
|
+
npm: "@ai-sdk/openai-compatible",
|
|
279
|
+
name: "NVIDIA NIM",
|
|
280
|
+
options: { baseURL: proxyBaseUrl, apiKey: PROXY_TOKEN },
|
|
281
|
+
models,
|
|
282
|
+
};
|
|
283
|
+
}
|
|
216
284
|
//# sourceMappingURL=providers.js.map
|
|
@@ -79,6 +79,18 @@ export async function createWorkspace(name) {
|
|
|
79
79
|
catch { /* no git: still a usable folder */ }
|
|
80
80
|
return { name: n, directory: dir, git: isGit(dir), modified: modified(dir) };
|
|
81
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* A permission error, explained. The usual cause is a folder copied in with
|
|
84
|
+
* plain `docker cp`, which leaves it owned by root while the runner and agent
|
|
85
|
+
* run as node.
|
|
86
|
+
*/
|
|
87
|
+
function notWritable(e, dir) {
|
|
88
|
+
const code = e.code;
|
|
89
|
+
if (code !== "EACCES" && code !== "EPERM")
|
|
90
|
+
return e;
|
|
91
|
+
return httpError(403, `No permission to write in ${dir}. It is probably owned by root because it was copied in with docker cp. ` +
|
|
92
|
+
`Give it back to BugXHunter with: docker run --rm -u root -v bugxhunter_workspace:/workspace --entrypoint chown ghcr.io/cintelis/bugxhunter-agent -R node:node ${dir}`);
|
|
93
|
+
}
|
|
82
94
|
/** Delete a workspace and everything in it. Only a listed workspace qualifies. */
|
|
83
95
|
export function deleteWorkspace(directory) {
|
|
84
96
|
const want = typeof directory === "string" ? P.resolve(directory.trim()) : "";
|
|
@@ -90,7 +102,12 @@ export function deleteWorkspace(directory) {
|
|
|
90
102
|
const real = fs.realpathSync(ws.directory);
|
|
91
103
|
if (!isInside(real, fs.realpathSync(WORKSPACES_ROOT)) || real === fs.realpathSync(WORKSPACES_ROOT))
|
|
92
104
|
throw httpError(400, "Not a workspace.");
|
|
93
|
-
|
|
105
|
+
try {
|
|
106
|
+
fs.rmSync(real, { recursive: true, force: true, maxRetries: 3 });
|
|
107
|
+
}
|
|
108
|
+
catch (e) {
|
|
109
|
+
throw notWritable(e, ws.directory);
|
|
110
|
+
}
|
|
94
111
|
return ws;
|
|
95
112
|
}
|
|
96
113
|
/** One folder of the project: sub-folders first, then files, by name. */
|
|
@@ -133,7 +150,7 @@ export function saveUpload(directory, sub, name, bytes) {
|
|
|
133
150
|
}
|
|
134
151
|
catch (e) {
|
|
135
152
|
if (e.code !== "EEXIST")
|
|
136
|
-
throw e;
|
|
153
|
+
throw notWritable(e, dir);
|
|
137
154
|
}
|
|
138
155
|
}
|
|
139
156
|
throw httpError(409, `Too many files called ${base}.`);
|