@vzn/vx 0.0.586 → 0.0.587

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vzn/vx",
3
- "version": "0.0.586",
3
+ "version": "0.0.587",
4
4
  "description": "The fastest task runner and build cache for JavaScript monorepos.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -21,10 +21,10 @@
21
21
  "node": ">=18"
22
22
  },
23
23
  "optionalDependencies": {
24
- "@vzn/vx-linux-x64": "0.0.586",
25
- "@vzn/vx-linux-arm64": "0.0.586",
26
- "@vzn/vx-darwin-x64": "0.0.586",
27
- "@vzn/vx-darwin-arm64": "0.0.586"
24
+ "@vzn/vx-linux-x64": "0.0.587",
25
+ "@vzn/vx-linux-arm64": "0.0.587",
26
+ "@vzn/vx-darwin-x64": "0.0.587",
27
+ "@vzn/vx-darwin-arm64": "0.0.587"
28
28
  },
29
29
  "dependencies": {
30
30
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
@@ -7,7 +7,7 @@
7
7
  import { statSync } from 'node:fs'
8
8
  import path from 'node:path'
9
9
  import { absolutize, atOrUnder, isUnderAny, localBindingOn, toRealPath } from './sandbox-paths.js'
10
- import { bindableReads } from './sandbox-binds.js'
10
+ import { bindableReads, bindableWrites } from './sandbox-binds.js'
11
11
  import type {
12
12
  ResolvedSandboxConfig,
13
13
  SandboxedRunArgs,
@@ -321,17 +321,22 @@ export async function parseStraceViolations(
321
321
  const text = await Bun.file(logPath).text()
322
322
  if (text.length === 0) return []
323
323
 
324
- // Treat every baseAllow + sandbox.allowRead path as "this was
325
- // explicitly permitted; any -ENOENT here is the user's own missing
326
- // file, not a sandbox-induced denial". Same for absolute denyRead
327
- // checks below. Canonical on BOTH sides — the policy is expressed in
328
- // real paths (see `canonicalBaselines`), so comparing a link-path here
329
- // would report an explicitly-allowed read as a violation.
324
+ // Treat every baseAllow + sandbox.allowRead + allowWrite path as "this
325
+ // was explicitly permitted; any -ENOENT here is the user's own missing
326
+ // file, not a sandbox-induced denial". A write grant counts: GNU cp
327
+ // opens its destination before creating it, and tsc probes its
328
+ // buildinfo. Same for absolute denyRead checks below. Canonical on BOTH
329
+ // sides — the policy is expressed in real paths (see
330
+ // `canonicalBaselines`), so comparing a link-path here would report an
331
+ // explicitly-allowed read as a violation.
330
332
  const allowAbs = new Set<string>(
331
- // A grant SRT could not mount (`bindableReads`) permits nothing.
332
- [...baselines.allowRead, ...bindableReads(args.config.allowRead)].map((p) =>
333
- toRealPath(absolutize(p)),
334
- ),
333
+ // A grant SRT could not mount (`bindableReads`, `bindableWrites`)
334
+ // permits nothing.
335
+ [
336
+ ...baselines.allowRead,
337
+ ...bindableReads(args.config.allowRead),
338
+ ...args.config.allowWrite.filter((w) => bindableWrites([w]).length > 0),
339
+ ].map((p) => toRealPath(absolutize(p))),
335
340
  )
336
341
  const denyAnchors = baselines.denyRead.map((p) => toRealPath(absolutize(p)))
337
342
  // A read under a widened write grant's directory is never refused, so it