openai / openai/codex

Windows: codex doctor always warns about unverified exclusions when Defender is detected

Open
#45,103 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of Codex CLI is running?

Official npm codex-cli 0.154.0, checked September 12, 2026.

What platform is your computer?

Windows x64. The installed Desktop package is 26.908.4834.0; this report concerns the standalone stable CLI's doctor command.

Summary

codex doctor reports an actionable security.endpoint warning whenever Microsoft Defender is detected, even though this check does not inspect Codex exclusions or establish that Defender has blocked Codex.

The report's advice asks the user to verify or add exclusions, but the implementation has no path that can recognize that this advice has been completed. This makes the warning effectively permanent for a detected Defender installation and can encourage unnecessary changes to security settings.

Observed diagnostic result

A minimized excerpt from codex doctor --json:

{
  "id": "security.endpoint",
  "status": "warning",
  "summary": "endpoint protection detected; Codex exclusions are unverified",
  "details": {
    "endpoint products": "Microsoft Defender",
    "Codex exclusions": "not verified"
  }
}

On the inspected machine:

  • Defender antivirus and real-time protection are enabled.
  • Controlled Folder Access is disabled.
  • The separate desktop.security.enforcement check reports no locally visible recent Codex security enforcement.
  • The diagnostic exits 0; database checks and the Desktop app-server handshake pass.

These observations do not prove that every possible security policy permits every future operation. They distinguish product detection from an observed block.

Reproduction
  1. Use the official Codex CLI on Windows with Microsoft Defender running.
  2. Run codex doctor --json.
  3. Inspect security.endpoint: it reports warning / exclusions not verified.
  4. Inspect the implementation below: exclusion and allowance settings are never read.

No exclusions were added or security controls disabled for this report. Persistence after adding an exclusion is a conclusion from the control flow, not a claimed before/after experiment.

Source-level cause

In security.rs at rust-v0.154.0, endpoint_check returns an OK result for an empty detected-product list, but constructs a warning for a nonempty list. It always records exclusions as not verified and adds product-specific exclusion advice.

The file is byte-identical at the inspected main revision b04a2c264516. No custom binary was built or tested.

Expected behavior

Distinguish these states explicitly:

  • Endpoint product detected, with exclusions not inspected.
  • A supported policy check completed and its result is known.
  • Actual locally observable Codex/helper blocking, or incomplete visibility.

Product presence alone should not imply that exclusions are required. Keep genuinely unknown values labeled unknown; do not report them as verified. If exclusions are recommended as a remedy, provide a supported way to verify them or clearly state that changing them cannot clear this particular check.

Suggested regression cases: Defender present with no observed block, explicitly verified allowances, an actual Codex/helper block, and unavailable inspection. These are proposed cases, not tests claimed to have run.

No transcripts, credentials, complete diagnostic files, private task IDs, or local paths are attached.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with codex-rs/cli/src/doctor/security.rs, especially endpoint_check, and inspect the existing doctor security diagnostic flow. Define how detected products, verified allowances, observed blocking, and unavailable inspection should be represented, then add regression coverage for the four cases proposed in the issue and confirm the diagnostic no longer treats product presence alone as an actionable warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.