feedback: proxy credentials (user:pass@) in HTTP(S)_PROXY are copied verbatim into the feedback diagnostics attachment

Open Beginner friendly
#63,908 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
security

Research direction

Read codex-rs/feedback/src/feedback_diagnostics.rs, especially collect_from_pairs, and the test collect_from_pairs_reports_raw_values_and_attachment. Check how proxy values flow into feedback_diagnostics_attachment_text in codex-rs/feedback/src/lib.rs. Redact proxy URL credentials while preserving useful connectivity details, then update the test to verify credentials are absent from the attachment.

Written by the indexing model from the issue text.

Description

bug CLI connectivity
What version of Codex CLI is running?

rust-v0.172.0 (latest release). Code checked by reading source; the same lines are on main as of 2026-11-25.

What subscription do you have?

Not applicable: found by reading the source, not from a runtime session.

What issue are you seeing?

This is a hardening suggestion, not a vulnerability report.

codex-rs/feedback/src/feedback_diagnostics.rs (collect_from_pairs) copies the proxy environment variables into the feedback diagnostics verbatim:

let value = env.get(*key)?;
Some(format!("{key} = {value}"))

The existing test collect_from_pairs_reports_raw_values_and_attachment asserts this, with HTTPS_PROXY = https://user:[email protected]:443?secret=1 appearing unchanged in the attachment. So a proxy URL with credentials (http://user:pass@host:port) is attached to the feedback upload when the user chooses to include logs (feedback_diagnostics_attachment_text(include_logs) in codex-rs/feedback/src/lib.rs).

What the user sees before sending, from codex-rs/tui/src/bottom_pane/feedback_view.rs:

  • The consent screen lists the diagnostics attachment filename, and for every category except "good result" it also prints each proxy value (should_show_feedback_connectivity_details).
  • For the "good result" category the values are not printed, while feedback_diagnostics_attachment_text does not check the category. I did not trace the call site to confirm the attachment is sent in that case.
What steps can reproduce the bug?

On the unmodified feedback_diagnostics.rs from the tag, setting HTTPS_PROXY=http://alice:[email protected]:3128 and calling FeedbackDiagnostics::collect_from_env() yields a diagnostic whose details contain alice:s3cr3t-pass. I ran this as a unit test against the file only, not through the TUI or an upload.

What is the expected behavior?

Redact the userinfo part of a proxy URL (user:pass@) in the diagnostics, for example http://***@proxy.example:3128, so the connectivity information stays useful and the credential is not copied.

Additional information

Found by static analysis of the Rust workspace.

Dominant language
Rust
Stars
136k
Forks
21.6k
Avg merge
1m
Merged PRs (30d)
997

Getting set up

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.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.