Adjust dangerous command detection for docker exec #6
No reviewers
Labels
No labels
bug
codex
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quentinreytinas/borgmatic-api-nextcloud-aio!6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/remove-sh-from-dangerous_commands"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
shinterpreter from the dangerous command list so.shscripts stay allowedTesting
https://chatgpt.com/codex/tasks/task_e_69013228a6008332a17492cc7c2cab43
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@ -78,1 +78,4 @@for dangerous in settings.dangerous_commandsif any(dangerous == part.lower() for part in command)]if blocked:Changing the dangerous command check to
dangerous == part.lower()means only arguments that exactly match the name are rejected. Together with theno_shellloop above that also checks only for exact matches, a command like/bin/bash -c …or/bin/shnow passes validation even whenExecWhitelistEntry.no_shellisTrueandbash/share listed as dangerous. Before this change the substring check blocked absolute paths; after the change the restriction can be bypassed simply by providing the full path to the shell binary. This lets a caller spawn an interactive shell in containers that were meant to forbid shells.Useful? React with 👍 / 👎.