Skip to content

Security: fix critical confirmation bypass, dangerous defaults, and shell injection#5088

Open
johnpippett wants to merge 1 commit intoAider-AI:mainfrom
johnpippett:security/critical-fixes-2026-04-28
Open

Security: fix critical confirmation bypass, dangerous defaults, and shell injection#5088
johnpippett wants to merge 1 commit intoAider-AI:mainfrom
johnpippett:security/critical-fixes-2026-04-28

Conversation

@johnpippett
Copy link
Copy Markdown

This PR addresses multiple critical security findings identified in an independent security audit:

  1. Confirmation bypass (--yes-always): Added explicit_yes_required=True to file creation/edit confirmations and the /run command gate.
  2. Dangerous defaults: Changed defaults for --auto-accept-architect, --auto-commits, --dirty-commits, --auto-lint, and --suggest-shell-commands from True to False.
  3. Shell injection: Replaced shell=True with shell=False + shlex.split() in cmd_git, pipe_editor, and cmd_run.

All existing tests pass (475 passed).

…hell injection

- --yes-always bypass: Add explicit_yes_required=True to file creation and
  edit confirmations in base_coder.py so --yes cannot auto-approve them.
- Dangerous defaults: Change defaults to False for --auto-accept-architect,
  --auto-commits, --dirty-commits, --auto-lint, and --suggest-shell-commands.
- Shell injection:
  - commands.py/cmd_git: Use shlex.split + shell=False instead of shell=True.
  - editor.py/pipe_editor: Use shlex.split + shell=False.
  - commands.py/cmd_run: Add explicit_yes_required confirmation gate before
    executing arbitrary shell commands (preserves backward compat for run_cmd).
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Jack Pippett seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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