redact

package
v0.54.4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package redact hides personal data in command output, on the machine, before any of it is sent.

The reason it exists: a fix reports the real output of the real commands it ran, and those commands print a customer's SSH configuration and everything their server believes. That output carries account names, public keys and addresses. Sending it raw would mean the honesty of the report is paid for with somebody's data.

Masking happens here rather than in the cloud, so the data never leaves the machine at all. There is nothing to delete afterwards and nothing to leak: we were never sent it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Accounts

func Accounts() ([]string, error)

Accounts are the names of the people who have an account on this machine.

func Name

func Name(name string) string

Name hides one account name, keeping its length.

The length stays because a report is read by somebody who knows their own server: seeing that two different accounts appear, and that one is longer, is the difference between a readable report and a wall of stars. A name is not a secret in the way a key is; it is personal data, and covering it is enough.

func Text

func Text(names []string, s string) string

Text hides every account name in names, every SSH key, and every address.

It takes the names rather than reading them, so the reading happens once per job instead of once per command, and so a test can say exactly who lives on the machine.

Types

This section is empty.

Jump to

Keyboard shortcuts

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