Skip to content

Redact sensitive parts of remote config URLs in errors and improve fetch error messages#623

Merged
winhowes merged 5 commits intomainfrom
codex/assess-information-disclosure-risk
Apr 14, 2026
Merged

Redact sensitive parts of remote config URLs in errors and improve fetch error messages#623
winhowes merged 5 commits intomainfrom
codex/assess-information-disclosure-risk

Conversation

@winhowes
Copy link
Copy Markdown
Owner

Motivation

  • Prevent leaking credentials, query parameters, or fragments from config URLs into error messages when fetching remote configs.
  • Make remote fetch error messages clearer and more descriptive for debugging.

Description

  • Use redactConfigSource to produce a redacted src and reference it in openSource error messages instead of the raw path and enhance messages to say invalid URL, request failed, or remote fetch ... failed where appropriate.
  • Introduce redactSourceInError to replace occurrences of the raw source in underlying error text with the redacted source.
  • Change redactConfigSource parsing behavior to return the original input when URL parsing fails and keep a separate check for empty Scheme and Host.
  • Update and add unit tests to reflect the new messages and redaction behavior, including TestOpenSourceHTTPDialErrorRedactsSecrets and an additional TestRedactConfigSource case for invalid URLs.

Testing

  • Ran package unit tests with go test ./... covering openSource and redactConfigSource behavior.
  • All modified and added tests (including TestOpenSourceHTTPStatus, TestOpenSourceHTTPRequestError, TestOpenSourceHTTPDialErrorRedactsSecrets, and TestRedactConfigSource) passed successfully.

Codex Task

@winhowes
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9590121db2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/main.go Outdated
@winhowes
Copy link
Copy Markdown
Owner Author

@codex review

@winhowes
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5740e322a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/main.go
@winhowes
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@winhowes winhowes merged commit d557351 into main Apr 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant