bugxhunter 0.8.4 → 0.8.5

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 can't edit them.)
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,7 @@ 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.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
319
  | [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
320
  | [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
321
  | [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.4",
3
+ "version": "0.8.5",
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",
@@ -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
- fs.rmSync(real, { recursive: true, force: true, maxRetries: 3 });
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}.`);