SafetyCard Request a review

Aider

AI pair programming in your terminal

github.com/Aider-AI/aider · 2026-10-03 · 5dc9490

Defense-in-depth score

3.6 / 10

Aider asks for an explicit yes before running any shell command and auto-commits every edit so it can be undone, but it has no sandbox and passes your full environment to everything it runs. The dominant risk is the repository itself: aider silently loads .aider.conf.yml and .env from the project folder, and those files can configure commands that run with no prompt, auto-approve other prompts, or redirect your API key. Only run it in repositories you trust, or check those files first.

Safest setup

Aider asks for an explicit yes before it runs any shell command and commits every edit to git so it can be undone. It has no sandbox, passes your full environment to every command it runs, and applies settings from the repository you open, so the safest setup narrows what your shell holds, starts only in repositories you have checked and moves aider into a container.

SetupHowWhat it gives you
A dedicated, low-limit keyStart aider from a shell that holds only a dedicated model key with a spending limit set at the provider, and no cloud or Git credentials the task doesn't needEvery command aider runs reaches only that key and the spend you allowed, not everything your account can C1
Repositories you have checkedOpen aider in repositories you trust, after reading any .aider.conf.yml and .env they containCommands, approval settings and the model endpoint come only from settings you chose C6
Per-call approvalKeep the default with --yes-always off, and answer each prompt yourselfYou see each suggested shell command, URL fetch and new file before it happens C2
Read-only ask mode--chat-mode ask while you explore code, and suggest-shell-commands: false in your own config when the task needs no commandsThe model answers questions without editing files or proposing commands C3
Auto-commits with undoKeep the default --auto-commits on and use /undo to revert an unwanted editEvery AI edit is its own git commit you can inspect and reverse C2
The Docker imageRun the paulgauthier/aider image with only the project folder mounted and network limited to your model providerCommands aider runs stay inside a non-root container that sees only that folder C4
A transcript outside the repo--chat-history-file <path> pointing outside the repositoryThe session record sits apart from the files the agent edits C9

Approving with confidence

  • Read each prompt and approve shell commands one at a time; the prompt shows the exact commands that will run.
  • Prompts for new files or files outside the chat show only the path, so review the resulting commit before moving on.
  • Files you add to the chat are edited without a further prompt, so add only the files you want changed.

Handling data

  • The chat transcript keeps every message and command output unredacted; store it like other sensitive logs.
  • An OpenRouter key from the sign-in flow is saved in plain text to ~/.aider/oauth-keys.env; restrict that file to your user.

Key gaps (4)

  1. Repository-controlled .aider.conf.yml/.env are auto-loaded and can configure commands (test-cmd+auto-test, lint-cmd, load) that run without any approval prompt, bypassing the shell gate. C2 · Approval gates
  2. All commands, including the automatic lint and any configured test command, run on the host as the user with the full environment and network; there is no sandbox by default. C4 · Code-execution isolation
  3. Worst case in the default configuration: an attacker-controlled repository gets unattended code execution with the user's credentials and network via auto-loaded config (test-cmd+auto-test, load); a further default path is not confined either. C5 · Untrusted input blast radius
  4. Repository-level .aider.conf.yml, .env (override=True) and model-settings files are auto-loaded with no trust prompt and can configure commands, auto-approval and the API endpoint. C6 · Memory, context & configuration integrity

Criteria

C1 Identity & least privilege

0.05 / 1.00

Aider runs as the user who launched it and makes no attempt to narrow that authority. The LLM API keys it is given are written into its own process environment, and every command it runs (approved shell commands, lint and test commands) inherits that full environment, including any cloud or Git credentials the user has. There is no authorization layer in code; the only boundary is the human approval prompt for shell commands, which is scored under approval gates. The credentials aider itself holds are LLM provider keys, so a hijack mostly risks spend and whatever the user's shell can reach.

C2 Approval gates

0.25 / 1.00

Shell commands proposed by the model are shown verbatim and need an explicit yes for each batch; even the --yes-always flag cannot approve them. File edits work differently: once a user adds a file to the chat, the model's edits to it are applied with no further prompt (then auto-committed to git so they can be undone), and new or out-of-chat files only show the path, not the change. The big gap is that configuration files in the repository being worked on (.aider.conf.yml, .env) are loaded automatically and can set a test command with auto-test, a lint command, a --load command file, or yes-always, which run commands or approve prompts with no human in the loop.

C3 Tool & action scoping

0.30 / 1.00

Aider's actions are text edits to files and model-suggested shell commands. Edit targets are resolved against the repo root and files ignored by git are skipped, but there is no containment check that keeps paths inside the repo (paths outside only trigger a confirmation). Shell commands are passed to the user's shell unchanged with no validation. Read-only 'ask' mode exists, but the default mode includes both file writes and shell suggestions.

C4 Code-execution isolation

0.42 / 1.00

Every command aider runs (approved shell commands, the automatic flake8 lint, configured test and lint commands) runs directly on the host as the user, with no sandbox and with the full environment. The project ships a Docker image that runs aider as a non-root user, which contains these commands to the mounted project folder, but it is an opt-in installation method with full network access and the API key passed in. One default execution path is not confined.

C5 Untrusted input blast radius

0.25 / 1.00

Aider reads untrusted text from the repository (files, repo map), web pages the user adds, and command and lint output, and inserts it into the conversation as user-role messages, with file contents explicitly labelled as trusted. Nothing distinguishes these sources. A hijacked model cannot fetch URLs or run shell commands without the user's explicit yes, but it can silently rewrite any file already in the chat. The decisive gap is the repository itself: an attacker who controls a repo the user opens can configure commands that run automatically (auto-test, --load, and a further default path), giving unattended code execution with the user's credentials and network.

C6 Memory, context & configuration integrity

0.17 / 1.00

Aider has no long-term memory and does not reload past chats unless asked, but it automatically loads configuration from the repository being edited: .aider.conf.yml, .env (overriding existing environment variables), and model settings files, with no trust prompt. These files can set commands that run automatically, auto-approve prompts, redirect the API endpoint (sending the user's API key to an attacker), or disable TLS verification. The model cannot easily write these files itself because new files and files outside the chat need confirmation and .aider* is gitignored after first run, but a cloned repository can ship them.

C7 Third-party extensions

N/A · full credit 1.00 / 1.00

Aider has no plugin, skill or MCP system and never loads tools or code chosen by the model or by the repository. The only runtime installs are aider's own optional extras (help, browser, Playwright, provider SDKs), pinned in its requirements files, installed only after a 'Run pip install?' prompt showing the exact command. These are the project's own dependencies and are out of scope here, so this criterion's surface is treated as absent.

C8 Secrets & sensitive-data protection

0.30 / 1.00

API keys come from environment variables, .env files or command-line flags, and are placed into the process environment where every command aider runs can read them. Only the OpenAI and Anthropic keys are masked, and only in the echoed command line and settings dump. The OpenRouter key obtained via OAuth is appended in plain text to ~/.aider/oauth-keys.env without restricting file permissions. Analytics are off unless the user accepts a prompt, but a full unredacted transcript is written to the repository folder by default.

C9 Audit & traceability

0.38 / 1.00

By default aider appends a Markdown transcript of each session (user input, model replies, commands run, confirmation answers) to .aider.chat.history.md in the repository, and every AI edit becomes a git commit tagged with a 'Co-authored-by: aider' trailer. This gives a usable record, but it is unstructured, lives inside the workspace where it can be edited, and if writing fails aider prints a warning and continues without logging.

C10 Limits & kill switch

0.42 / 1.00

Each user message triggers at most one model reply plus three automatic retries for lint, edit or file-add follow-ups, and each model request has a 10-minute timeout, so aider is human-paced by design. There is no spend limit (cost is only displayed), no session time limit, and commands run with no timeout. Ctrl-C interrupts the model reply and a second Ctrl-C exits; a running command receives the interrupt through the terminal.