Skip to content

tools/fs: Add mkdir and rmdir#1781

Merged
dgageot merged 2 commits intodocker:mainfrom
vvoland:fs-mkrmdir
Feb 24, 2026
Merged

tools/fs: Add mkdir and rmdir#1781
dgageot merged 2 commits intodocker:mainfrom
vvoland:fs-mkrmdir

Conversation

@vvoland
Copy link
Contributor

@vvoland vvoland commented Feb 18, 2026

Add native tools to create and remove directories so agents do not need to use shell for that.

@vvoland vvoland requested a review from a team as a code owner February 18, 2026 17:13
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

Found one TOCTOU (Time-of-Check-Time-of-Use) race condition in the new handleRemoveDirectory function. While the implementation is well-tested, there's a security issue where the filesystem state could change between the directory validation and removal steps.

The mkdir implementation looks solid with no issues found.

Add native tools to create and remove directories so agents do not need
to use shell for that.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
@dgageot dgageot merged commit 6927879 into docker:main Feb 24, 2026
5 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.

3 participants