Skip to content
Terminal > Code

Red Team

Models from different companies review your code for security bugs, check each other, and write one report. Run it from the app or the terminal.


What is Red Team in Mel? Red Team asks models from different companies to review your project's code for security and safety bugs. They work alone, then check each other's points. Mel ranks the findings and writes one report. Mel can also run your project's own checks, and the command each finding suggests, in a sealed sandbox with no network: on Linux directly, and on macOS and Windows inside a Linux container through Docker Desktop or Podman.

It reads your last commit. Your working copy is never changed, and uncommitted work is not part of the review.

Run it from the app

  1. Open the command palette and run Red Team: review this project.
  2. Check the Project folder. It starts as the folder of your active pane. Use Choose... to pick another one. It must be a git repository.
  3. Pick a Panel: Cheap, Premium, or Your own models (see below).
  4. Set a Credit limit, and tick Review only if you do not want anything run.
  5. Press Start.

While it runs, the screen shows which model is reviewing, how many findings the models have reported so far, and the last lines of progress. Stop ends the review at once. The screen then says Stopped.

You can close the screen while a review runs. It keeps going, and the palette command brings the screen back. When it ends, the report appears on the screen. Open folder shows the report files. Earlier reviews are listed under Past reviews.

Mel runs the same code as the terminal command, so the two give the same report.

Run it from the terminal

mel redteam [PATH] [OPTIONS]

PATH is a git repository. It defaults to the folder you are in. On a Mac, the program is /Applications/Mel.app/Contents/MacOS/mel.

OptionWhat it does
--base REFReview only the change since REF, instead of the whole snapshot.
--preset NAMEcheap (the default: 3 low-cost models), premium (4 top models), or custom.
--models a,b,cChoose the panel by hand, by catalog id or label. One model per company. Implies custom.
--max-credits NStop starting new steps once N credits are spent. The default is 300. 0 means no limit.
--out DIRWhere report.md and report.json go. The default is ./mel-redteam/<timestamp>/ in the folder you run it from.
--timeout-secs NThe time limit of one model's step, from 30 to 14400. The default is 900.
--review-onlyRun nothing. A suggested command is shown as text.

Run mel redteam --help for the full text. The review runs on your Mel account, so sign in to the Mel app first. Reports from the app are kept in Mel's data folder, under redteam/runs.

How a review works

  1. Mel copies the committed code into a snapshot. It has no git history, no links and no submodules.
  2. On Linux, Mel runs your project's tests and linter in the sandbox and gives the results to the panel.
  3. Each model reviews the snapshot alone, with reading tools only. No model sees another model's words. A model that forgets its list of findings is asked once more.
  4. Mel merges findings that match, keeping every model that found them.
  5. On Linux, Mel runs each finding's suggested command in the sandbox and labels the result.
  6. Each model sees the findings it did not make, with no author named, and answers confirm, reject or unsure with a line of evidence. This step has no tools.
  7. Mel writes the report.

The panel

A panel has 2 to 6 models, and never two from the same company. Two models from one company tend to miss the same things.

ChoiceModels
CheapThree low-cost models, from Anthropic, OpenAI and Google.
PremiumFour top models, from Anthropic, OpenAI, Google and xAI.
Your own modelsYou type the models, separated by commas. Mel refuses a model it does not offer, and two from one company.

In a Business workspace, a model the workspace's data policy withholds is listed as not available, and the review goes on without it.

What the labels mean

Severity is low, medium, high or critical. The first page of the report is about high and critical findings that two or more models stand behind, and about anything that was reproduced.

Found by lists every model that raised the point. Disputed by lists the models that rejected it on the cross-check. A point only one model saw is listed apart, under "Only one model saw this".

Proof says what happened to the finding's suggested command:

LabelMeaning
ReproducedThe command printed the failure text the finding named. An exit code alone never counts.
Not reproducedThe command ran and did not print that text.
Not countedThe command ran, but what it showed does not count. For example, it only printed text, or the finding named no failure text. The label says why.
Unable to runThe command did not run, or could not answer. The label says why: refused for safety, no proven sandbox, a missing tool, a time limit, or it needed the network.
OpinionThe finding had no command. It is a judgement, not a demonstration.
Not run (review only)You used --review-only. The command is shown as text.

A model that answered with no findings block is not a model that found nothing. The report says so, and says what was done about it.

Costs

The review runs on your Mel credits, or on your own model keys at 0 Mel credits. One credit is one cent. Mel counts what each step actually cost, as the relay measured it. It does not estimate the cost before the run.

The Credit limit (--max-credits, default 300) is checked before every step. When the measured spend reaches it, no new step starts, and the report says so. A step already running is finished, so a run can spend a little more than the limit. If a step has no measured cost, Mel cannot check the limit, so it stops starting steps and says why.

Platforms

SystemReview and reportChecks and proof commands
LinuxYesYes, in a sandbox. Needs bubblewrap 0.8 or newer.
macOSYesYes, inside a Linux container, when Docker Desktop or Podman is installed and running. Without one, nothing runs, and the report says what to install.
WindowsYesYes, inside a Linux container, when Docker Desktop or Podman is installed and running. Without one, nothing runs, and the report says what to install.

Where Mel cannot prove a sandbox, nothing runs. Before the first command, Mel tests the sandbox itself. Inside it, your files are not visible, the copy of your code is held in memory, and there is no network.

On macOS and Windows the container gets a copy of your code, never your folder. It has no network, a read-only system, no added privileges, and caps on memory, processes, disk and time. Mel pulls one small, pinned Linux image the first time; after that nothing is downloaded. If you have pointed Docker at a remote machine, the copy of your code goes there.

Only proved findings count

A finding counts only when it names a file and line that exist in the snapshot and its command was reproduced in the sandbox. Everything else is listed apart, under "Not proved (not counted)", with the reason. A review-only run proves nothing, so all its findings are listed there.

More commands

CommandWhat it does
mel redteam --changed A..BReview only the files that commits A..B changed, grouped by area: safety and approvals first, then secrets, connectors, billing, and updates and releases. --areas FILE gives your own list of areas.
mel redteam summary [--since 24h]A short summary of recent reviews, worst proved finding first.
mel redteam import FILEAdd findings from another scanner's SARIF file to the same list. They are not counted until Mel proves them.
mel redteam fix IDDraft a fix and a test for one finding in a separate branch. Mel first reproduces the finding, then checks the fix makes it stop, and only then opens a DRAFT pull request for you to review. Mel never merges. The finding comes from your newest mel redteam run on this repository (or the report you name with --report). The reproduce and re-check steps run in the sandbox; the fix itself is drafted by Mel's agent on your computer, with --yes, so it may run the project's tests and scripts without asking. Use it only on code you trust.

Mel's GitHub Action can also run Red Team on every push, on a schedule, or by hand, with a Mel API key. See its README for the three example workflows.

Privacy

  • The models read the snapshot of your code. That text is sent to the model companies on the panel, through Mel's servers, as in any agent turn. Choose your panel with that in mind.
  • The review is not filed in your conversation list and is not uploaded to your account. Its temporary files are removed when the run ends.
  • Commands run in the sandbox have no network. Nothing they print leaves your computer except as part of the report text the models read for the cross-check.
  • The report stays on your computer. Mel also keeps a small score line per model, with the time, a commit prefix and counts. It holds no code and no model text.
  • Mel's erase-everything action removes the saved reports and the score lines along with your other local data.