Skip to content

Fix Daytona bridge command quoting#394

Merged
marccampbell merged 2 commits into
mainfrom
fix/security-critical-review
Jun 10, 2026
Merged

Fix Daytona bridge command quoting#394
marccampbell merged 2 commits into
mainfrom
fix/security-critical-review

Conversation

@marccampbell

Copy link
Copy Markdown
Contributor

Summary

Fixes the critical command-injection finding from SECURITY-REVIEW.md.

daytonaAsyncBridgeCommand used Go %q formatting for shell environment assignments. Go double-quoted literals are not shell-safe: command substitutions such as $(...) still execute inside shell double quotes. The Daytona bridge launch path now uses the existing single-quote shellQuote helper for hub URL, claw ID, claw token, and claw name, matching the safer replicated bootstrap path.

Test coverage

  • Adds a regression test with a command-substitution payload in the claw name.
  • Verifies the generated Daytona bridge command emits the claw name through shellQuote and does not place it in a shell double-quoted assignment.

Validation

  • env GOCACHE=/private/tmp/elasticclaw-go-build go test ./pkg/hub -run 'TestDaytonaBridgeCommands_AreAsyncAndIdempotent|TestDaytonaAsyncBridgeCommandShellQuotesClawName'
  • env GOCACHE=/private/tmp/elasticclaw-go-build go test ./pkg/hub
  • env GOCACHE=/private/tmp/elasticclaw-go-build go test ./...

@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "Fix Daytona bridge command quoting" | Re-trigger Greptile

Comment thread pkg/hub/bootstrap_test.go Outdated
@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "Address Daytona bridge review feedback" | Re-trigger Greptile

@marccampbell marccampbell merged commit 1ae809c into main Jun 10, 2026
11 checks passed
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