redact

package
v0.3.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package redact masks sensitive material in git diagnostics so credentials never leak into error messages or logs. It is the single owner of URL credential redaction shared by both the embedded and CLI backends.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func URLCredentials

func URLCredentials(message string) string

URLCredentials masks credential material in the userinfo component of every "scheme://userinfo@host" occurrence in message, for any URL scheme. When the userinfo carries a "user:password" pair, the (non-secret) username is kept and the password is masked ("user:***@host"). A bare userinfo with no password ("token@host") is masked in full ("***@host"), because git commonly places the secret in the username position (e.g. "https://<token>@host").

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL