Skip to content

fix(sandbox): exclude home-dir dotfiles from capture_to artifacts#19

Merged
joeysbase merged 6 commits into
mainfrom
fix/artifact-capture-ignore-home-dotfiles
Jul 13, 2026
Merged

fix(sandbox): exclude home-dir dotfiles from capture_to artifacts#19
joeysbase merged 6 commits into
mainfrom
fix/artifact-capture-ignore-home-dotfiles

Conversation

@joeysbase

@joeysbase joeysbase commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • _WORKSPACE_CAPTURE_IGNORE was missing common Linux home-directory entries (.cache, .config, .npm, .local, shell dotfiles)
  • When working_dir: /root (or any HOME-overlapping path), tools like uv/pip/npm write these into the WORKDIR — and capture_to was copying all of them verbatim into the artifacts directory
  • Extends the ignore list so only actual task deliverables land in artifacts

Reproduction

Observed with the skillsbench-court-form-filling task (uses working_dir: /root): artifacts contained .cache/uv/, .config/uv/, .config/coder-eval/, .npm/, .bashrc, .profile, .wget-hsts alongside the intended sc100-filled.pdf.

Test plan

  • Run a task with sandbox.docker.working_dir: /root and confirm artifacts only contain task deliverables
  • Confirm existing tasks with non-HOME workdirs are unaffected

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

Claude finished @joeysbase's task in 1m 57s —— View job


Code Review in Progress

Todo List:

  • Read review guidelines from .github/code_review.md
  • Read CLAUDE.md for project conventions
  • View the full PR diff (git diff origin/main...HEAD)
  • Read the complete sandbox.py file for context
  • Analyze the changes for correctness and completeness
  • Check for cross-file consistency
  • Perform "what's missing" analysis
  • Post final review

joeysbase and others added 2 commits July 13, 2026 11:54
Extends test_capture_to_copies_and_tolerates_dangling_symlink to assert
that .cache, .config, .npm, .local, .bashrc, .bash_history, .bash_logout,
.profile, and .wget-hsts are excluded from captured artifacts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
click 8.3.1 has a command injection vulnerability in click.edit()
(PYSEC-2026-2132, fixed in 8.3.3). Pin click>=8.3.3 explicitly so uv
resolves to 8.4.2.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@bai-uipath bai-uipath left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fix what you agree with, otherwise lgtm. Correct, focused fix with a narrow blast radius (docker WORKDIR mode only, and the capture runs post-grading so no verdict can change). Denylist is the right shape here — the noise-vs-deliverable distinction isn't mechanically derivable and isn't task-specific, so a curated constant is exactly what should encode it. One real ask before merge (expand it), the rest optional.

  • Expand the denylist to the credential family — before merge. The reason .claude is excluded is credential-leak prevention, and these captured artifacts get uploaded — but .aws, .ssh, .azure, .netrc, .gitconfig, .docker aren't covered. If any eval image ships those under /root, they leak into artifacts the same way .credentials.json would have. This PR is the natural place to close that class. Fix: add them to the same tuple in sandbox.py:30 (worth a quick check of what the images actually put under /root first), and note in the comment that this is a security denylist, not just noise suppression.

joeysbase and others added 3 commits July 13, 2026 14:15
Adds .aws, .ssh, .gnupg, .docker, .azure, .netrc, .gitconfig to
_WORKSPACE_CAPTURE_IGNORE as a security denylist (defense-in-depth: eval
images don't bake credentials, but any image that does must not leak them
into uploaded artifacts).

Also restructures the comment to distinguish the two exclusion classes:
security denylist vs. home-dir noise suppression.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@joeysbase joeysbase merged commit a240d4e into main Jul 13, 2026
12 checks passed
@joeysbase joeysbase deleted the fix/artifact-capture-ignore-home-dotfiles branch July 13, 2026 21:58
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.

2 participants