Skip to content

Grant Claude default /tmp read/write permissions in sandboxed workflows#31357

Merged
pelikhan merged 6 commits intomainfrom
copilot/ensure-claude-read-write-access
May 10, 2026
Merged

Grant Claude default /tmp read/write permissions in sandboxed workflows#31357
pelikhan merged 6 commits intomainfrom
copilot/ensure-claude-read-write-access

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 10, 2026

  • Inspect workflow compile/lock tooling and identify affected lock files
  • Run baseline lint/build/tests before changes
  • Recompile affected lock file(s) to include Claude /tmp default permissions
  • Run targeted tests/lint to verify no regressions
  • Reply to PR comment with commit hash
  • Run final validation (code review + CodeQL)

Copilot AI and others added 2 commits May 10, 2026 16:14
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Ensure Claude can read/write under /tmp in smoke workflow Grant Claude explicit /tmp read/write permissions in smoke workflow May 10, 2026
Copilot AI requested a review from pelikhan May 10, 2026 16:19
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot enable write to /tmp/ by default for all workflows using Claude

Copilot AI and others added 3 commits May 10, 2026 16:28
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 10, 2026

@copilot enable write to /tmp/ by default for all workflows using Claude

Implemented in 65450d4: Claude now grants /tmp path-scoped file permissions by default for sandboxed Claude workflows, while still honoring additional sandbox.agent.config.filesystem.allowWrite entries.

Copilot AI changed the title Grant Claude explicit /tmp read/write permissions in smoke workflow Grant Claude default /tmp read/write permissions in sandboxed workflows May 10, 2026
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot recompile, ensure lock files have the fix

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 10, 2026

@copilot recompile, ensure lock files have the fix

Recompiled with current HEAD and verified lock files are up to date—no lock-file diffs were produced. The /tmp default Claude permission fix is present in 65450d4.

@pelikhan pelikhan marked this pull request as ready for review May 10, 2026 17:13
Copilot AI review requested due to automatic review settings May 10, 2026 17:13
@pelikhan pelikhan merged commit a70dd40 into main May 10, 2026
@pelikhan pelikhan deleted the copilot/ensure-claude-read-write-access branch May 10, 2026 17:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Claude’s computed --allowed-tools allowlist to include path-scoped file tool permissions for sandbox writable paths (including /tmp by default), and regenerates affected workflow lockfiles accordingly.

Changes:

  • Extend computeAllowedClaudeToolsString to accept SandboxConfig and append path-scoped Read/Write/Edit/MultiEdit tool patterns for sandbox filesystem.allowWrite (always including /tmp).
  • Wire the new parameter through Claude engine call sites and update unit/integration tests.
  • Regenerate compiled workflow lockfiles to reflect the updated Claude --allowed-tools output (including proper shell quoting where * patterns are present).
Show a summary per file
File Description
pkg/workflow/claude_tools.go Add sandbox-aware path-scoped allowed-tools generation (default /tmp) and extend function signature.
pkg/workflow/claude_engine.go Pass workflowData.SandboxConfig into allowed-tools computation.
pkg/workflow/claude_engine_tools_test.go Add coverage for /tmp being included by default / via filesystem.allowWrite.
pkg/workflow/git_commands_test.go Update helper calls for new allowed-tools function signature.
pkg/workflow/git_commands_integration_test.go Update helper calls for new allowed-tools function signature.
pkg/workflow/neutral_tools_simple_test.go Update helper calls for new allowed-tools function signature.
pkg/workflow/bash_defaults_consistency_test.go Update helper calls for new allowed-tools function signature.
.github/workflows/smoke-claude.md Add sandbox filesystem allowWrite configuration (includes /tmp).
.github/workflows/test-create-pr-error-handling.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/smoke-agent-scoped-approved.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/smoke-agent-public-none.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/smoke-agent-public-approved.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/smoke-agent-all-none.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/smoke-agent-all-merged.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/lockfile-stats.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/hourly-ci-cleaner.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/go-pattern-detector.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/github-mcp-tools-report.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/example-workflow-analyzer.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/daily-team-evolution-insights.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/daily-safe-outputs-conformance.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/daily-otel-instrumentation-advisor.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/daily-grafana-otel-instrumentation-advisor.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/daily-choice-test.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/daily-astrostylelite-markdown-spellcheck.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/copilot-agent-analysis.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/commit-changes-analyzer.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.
.github/workflows/aw-failure-investigator.lock.yml Regenerate lockfile to include /tmp path-scoped file tool patterns in Claude allowlist.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 68/68 changed files
  • Comments generated: 2

Comment on lines +442 to +446
// Grant path-scoped file tool access for sandbox writable paths.
// Claude workflows should always be able to use /tmp even when not explicitly
// listed in sandbox.agent.config.filesystem.allowWrite.
if sandboxConfig != nil {
writablePaths := []string{defaultClaudeTmpWritePath}
Comment on lines +456 to +459
// Claude path-scoped tool permissions must be absolute.
if !strings.HasPrefix(path, "/") {
continue
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants