Skip to content

fix: copy fullsend binary to sandbox for pre-agent security scan - #372

Merged
ralphbean merged 2 commits into
mainfrom
fix/copy-fullsend-binary-to-sandbox
Apr 23, 2026
Merged

fix: copy fullsend binary to sandbox for pre-agent security scan#372
ralphbean merged 2 commits into
mainfrom
fix/copy-fullsend-binary-to-sandbox

Conversation

@ralphbean

Copy link
Copy Markdown
Member

Summary

Fixes the pre-agent security scan failure where fullsend scan context couldn't be found inside the sandbox.

Problem

The triage workflow failed with:

find: 'fullsend': No such file or directory
Error: pre-agent security scan blocked: critical findings detected

The pre-agent security scan runs inside the sandbox and executes:

find /tmp/workspace/target-repo -maxdepth 3 -type f \( ... \) -exec fullsend scan context {} +

However, the fullsend binary was only installed on the GitHub Actions runner host, not in the sandbox image.

Solution

1. Copy fullsend binary into sandbox (bootstrapSandbox)

  • Uses os.Executable() to find the current fullsend binary
  • Copies it to /tmp/workspace/bin/fullsend in the sandbox
  • Makes it executable with chmod +x

2. Source .env before scanning (buildScanContextCommand)

  • Added source /tmp/workspace/.env && before the find command
  • Ensures PATH includes /tmp/workspace/bin where fullsend is installed

This approach:

  • ✅ Works for both development (vendored binary) and production (released binary)
  • ✅ Ensures version match between host CLI and sandbox CLI
  • ✅ Follows the same pattern as buildClaudeCommand which also sources .env

Test Plan

Manual verification:

  • Run fullsend run triage locally with openshell available
  • Verify pre-agent scan step completes without "No such file or directory" error

E2E verification:

  • Trigger triage workflow on a test issue
  • Verify workflow completes successfully

Related

Fixes: https://github.com/fullsend-ai/.fullsend/actions/runs/24842943162/job/72721816328

The pre-agent security scan runs `fullsend scan context` inside the
sandbox, but the fullsend binary was only installed on the GitHub
Actions runner host, not in the sandbox. This caused the scan to fail
with "find: 'fullsend': No such file or directory".

Changes:
- bootstrapSandbox() now copies the fullsend binary from the host into
  /tmp/workspace/bin/fullsend in the sandbox
- buildScanContextCommand() now sources .env to ensure PATH includes
  /tmp/workspace/bin where fullsend is installed

This ensures the sandbox uses the same version of fullsend that's
running the workflow, whether vendored (development) or released
(production).

Fixes: https://github.com/fullsend-ai/.fullsend/actions/runs/24842943162/job/72721816328

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown

Site preview

Preview: https://db670abd-site.fullsend-ai.workers.dev

Commit: b3d267a5c8f88f1b68d12d914cf08ba0e58da9bb

@ralphbean

Copy link
Copy Markdown
Member Author

Original Failure

This fix addresses the failure observed in:
https://github.com/fullsend-ai/.fullsend/actions/runs/24842943162/job/72721816328#step:10:215

The error at step 10, line 509 was:

find: 'fullsend': No such file or directory
Error: pre-agent security scan blocked: critical findings detected

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed across 4 agents (Claude, Gemini, Cursor, security-focused). All approve. One suggestion: add a unit test for buildScanContextCommand (see inline comment).

Comment thread internal/cli/run.go
Covers the source .env prefix, trace ID interpolation, and
exec fullsend scan context suffix — matching the existing
TestBuildClaudeCommand pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ralphbean
ralphbean added this pull request to the merge queue Apr 23, 2026
Merged via the queue into main with commit e96cb3f Apr 23, 2026
9 checks passed
@ralphbean
ralphbean deleted the fix/copy-fullsend-binary-to-sandbox branch April 23, 2026 16:36
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