Skip to content

Prevent source credentials leaking to output - #615

Open
alecthomas wants to merge 3 commits into
masterfrom
dx26-logging-output
Open

Prevent source credentials leaking to output#615
alecthomas wants to merge 3 commits into
masterfrom
dx26-logging-output

Conversation

@alecthomas

@alecthomas alecthomas commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Address the logging/output portion of DX-26 with a SourceURI wrapper whose String() representation redacts credentials and whose explicit Get() method returns the raw URI.
  • Preserve the existing sources.Source interface while wrapping manifest and package source URIs at ingress, then carry SourceURI through URL rewriting, cache selectors, Git and HTTP source implementations, validation, status output, and command execution.
  • Restrict raw access to boundaries that require it: parsing, cache-key and path derivation, HTTP request creation, and process execution.
  • Redact through the final userinfo delimiter for accepted URLs containing an unescaped @.

Testing

  • Added GitHubTokenIsRedactedFromOutput integration coverage for status, debug, validation, command output, and error paths.
  • Added unit coverage for source URI formatting, URL validation, Git URL parsing, cache errors, Git arguments, and typed command execution/output redaction.

Linear: DX-26

alecthomas and others added 3 commits August 14, 2026 13:41
Keep source URIs wrapped until raw access is explicitly required so logging, status, validation errors, and failed git commands cannot accidentally expose embedded credentials.

Co-authored-by: Codex <noreply@openai.com>
Wrap source URIs at ingress and retain the Source type until parsing, network, filesystem, or process execution requires raw access. This makes credential-safe formatting the default and prevents intermediate strings from bypassing redaction.

Co-authored-by: Codex <noreply@openai.com>
Name the credential-safe URI wrapper SourceURI so the established sources.Source interface does not need an unrelated public rename.

Co-authored-by: Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant