Skip to content

fix: fall back to config sandbox paths in scanAgents - #1636

Merged
avoidwork merged 1 commit into
mainfrom
fix/scan-agents-sandbox-fallback
Nov 1, 2026
Merged

avoidwork merged 1 commit into
mainfrom
fix/scan-agents-sandbox-fallback

Conversation

@avoidwork

Copy link
Copy Markdown
Owner

Description

The orchestrator invokes the scanAgents tool as the raw singleton without runtime options, so options.allowedPaths was undefined and every path was denied as "outside sandbox scope" — even paths inside the configured sandbox. scanAgentsImpl now falls back to loadConfig().sandbox.paths when options.allowedPaths is absent, mirroring the other path tools (file, discovery, readImage, audio).

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)
  • Performance improvement
  • CI / build / tooling

Testing

Ran node \-\-test tests/unit/tools_scanAgents.test.js — all 7 tests pass. The existing tests all pass options.allowedPaths explicitly, so they exercise the primary path; the new fallback branch is a no-op when allowedPaths is present, preserving existing behavior.

Coverage

  • Line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with maintained line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

The orchestrator invokes the raw scanAgents singleton without runtime
options, so options.allowedPaths was undefined and every path was denied
as "outside sandbox scope". Fall back to loadConfig().sandbox.paths when
options.allowedPaths is absent, mirroring the other path tools.
@avoidwork avoidwork added the bug Something isn't working label Nov 1, 2026
@avoidwork avoidwork self-assigned this Nov 1, 2026
@avoidwork
avoidwork merged commit 6c8e3ca into main Nov 1, 2026
3 checks passed
@avoidwork
avoidwork deleted the fix/scan-agents-sandbox-fallback branch November 1, 2026 20:54
@avoidwork avoidwork mentioned this pull request Nov 1, 2026
6 of 12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant