Skip to content

fix: reject traversal in agent file delivery - #828

Merged
yaojin3616 merged 1 commit into
mainfrom
agent/debugger/547ba809
Aug 7, 2026
Merged

fix: reject traversal in agent file delivery#828
yaojin3616 merged 1 commit into
mainfrom
agent/debugger/547ba809

Conversation

@yaojin3616

Copy link
Copy Markdown
Collaborator

Summary

  • Reject parent-directory segments in send_file_to_agent file paths before storage access.
  • Add regression coverage for Unix and Windows traversal forms.

Root cause

The A2A file-delivery path was normalized only after prefixing it with the source Agent ID. .. segments could therefore remove that prefix and resolve to another Agent's stored file.

Impact

File delivery now fails closed with workspace_path_invalid when file_path contains ..; valid relative paths retain their existing behavior.

Validation

  • uv run --extra dev python -m pytest tests/test_agent_tools_remaining_typed_outcomes.py (26 passed)
  • git diff --check

Multica issue: AND-154

@yaojin3616
yaojin3616 marked this pull request as ready for review August 7, 2026 07:49
@yaojin3616
yaojin3616 merged commit bd48e85 into main Aug 7, 2026
1 check 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.

1 participant