Skip to content

Daily fixes#1832

Merged
dgageot merged 3 commits intodocker:mainfrom
dgageot:fixes
Feb 24, 2026
Merged

Daily fixes#1832
dgageot merged 3 commits intodocker:mainfrom
dgageot:fixes

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Feb 24, 2026

No description provided.

@dgageot dgageot requested a review from a team as a code owner February 24, 2026 08:56
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

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

Review Summary

This PR adds security improvements for path traversal protection in the filesystem toolset and improves error logging. However, there is one issue that should be addressed: the path validation logic doesn't account for case-insensitive filesystems (Windows and macOS), which could potentially allow path traversal attacks on those platforms.

Add path validation to handleReadFile, handleWriteFile, and handleEditFile
in the ACP filesystem toolset. User-supplied paths are now resolved and
validated to ensure they do not escape the configured working directory.

Previously, paths like '../../etc/passwd' could be used to access files
outside the working directory. The new resolvePath method converts paths
to absolute form and checks they remain within the working directory
boundary.

Fixes docker#1823

Assisted-By: cagent
The persistSessionTitle function silently discarded errors from
UpdateSessionTitle (other than ErrTitleGenerating). Add slog.Warn
so failures are visible in debug logs.

Fixes docker#1821

Assisted-By: cagent
Signed-off-by: David Gageot <david.gageot@docker.com>
@krissetto
Copy link
Contributor

/describe

@dgageot dgageot merged commit 7c86867 into docker:main Feb 24, 2026
5 checks passed
@dgageot dgageot deleted the fixes branch February 27, 2026 19:37
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