Skip to content

Python: Improves the robustness of filename handling - #13643

Merged
Tao Chen (TaoChenOSU) merged 6 commits into
mainfrom
taochen/python-icm-108593
Mar 12, 2026
Merged

Tao Chen (TaoChenOSU) merged 6 commits into
mainfrom
taochen/python-icm-108593

Conversation

@TaoChenOSU

@TaoChenOSU Tao Chen (TaoChenOSU) commented Mar 9, 2026 •

Copy link
Copy Markdown
Contributor

Motivation and Context

Improves the robustness of filename handling in the Bedrock agent integration. Ensures that filenames sourced from external responses are properly sanitized before use in file operations, and adds safer defaults for file write behavior.

Description

  1. Sanitize filenames received from Bedrock agent responses.
  2. Add overwrite parameter to BinaryContent.write_to_file (defaults to False).
  3. Add tests.
  4. Update samples.

Contribution Checklist

@TaoChenOSU Tao Chen (TaoChenOSU) self-assigned this Mar 9, 2026
@TaoChenOSU
Tao Chen (TaoChenOSU) requested a review from a team as a code owner March 9, 2026 21:50
@TaoChenOSU Tao Chen (TaoChenOSU) added python Pull requests for the Python Semantic Kernel agents labels Mar 9, 2026
@github-actions github-actions Bot changed the title Prevent LLM-controlled filename path traversal attack Python: Prevent LLM-controlled filename path traversal attack Mar 9, 2026
@moonbox3
Evan Mattson (moonbox3) added this pull request to the merge queue Mar 11, 2026
@moonbox3
Evan Mattson (moonbox3) removed this pull request from the merge queue due to a manual request Mar 11, 2026
@moonbox3
Evan Mattson (moonbox3) added this pull request to the merge queue Mar 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 11, 2026
@TaoChenOSU
Tao Chen (TaoChenOSU) added this pull request to the merge queue Mar 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 11, 2026
@TaoChenOSU
Tao Chen (TaoChenOSU) added this pull request to the merge queue Mar 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 11, 2026
@TaoChenOSU
Tao Chen (TaoChenOSU) added this pull request to the merge queue Mar 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 11, 2026
@moonbox3 Evan Mattson (moonbox3) changed the title Python: Prevent LLM-controlled filename path traversal attack Python: Improves the robustness of filename handling Mar 12, 2026
@moonbox3
Evan Mattson (moonbox3) added this pull request to the merge queue Mar 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 12, 2026
@TaoChenOSU
Tao Chen (TaoChenOSU) added this pull request to the merge queue Mar 12, 2026
Merged via the queue into main with commit d5c2b9d Mar 12, 2026
49 of 57 checks passed
@TaoChenOSU
Tao Chen (TaoChenOSU) deleted the taochen/python-icm-108593 branch March 12, 2026 17:10
@github-project-automation github-project-automation Bot moved this to Sprint: Done in Semantic Kernel Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents python Pull requests for the Python Semantic Kernel

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants