Documentation
¶
Overview ¶
Package redaction sanitizes application-layer observations before any persistence boundary. It never returns a hash of a detected secret.
Index ¶
- Constants
- type Finding
- type Redactor
- func (redactor *Redactor) AssertNoCanary(raw []byte) error
- func (redactor *Redactor) RedactHeaders(headers http.Header) (http.Header, Report)
- func (redactor *Redactor) RedactJSON(raw []byte) ([]byte, Report, error)
- func (redactor *Redactor) RedactText(raw []byte) ([]byte, Report)
- func (redactor *Redactor) RedactURL(input *url.URL) (*url.URL, Report, error)
- func (redactor *Redactor) SanitizeJSON(raw []byte) (SanitizedPayload, error)
- func (redactor *Redactor) SanitizeText(raw []byte) (SanitizedPayload, error)
- type Report
- type SanitizedPayload
Constants ¶
View Source
const Replacement = "[REDACTED]"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
func (*Redactor) AssertNoCanary ¶
func (*Redactor) RedactHeaders ¶
func (*Redactor) RedactJSON ¶
func (*Redactor) SanitizeJSON ¶
func (redactor *Redactor) SanitizeJSON(raw []byte) (SanitizedPayload, error)
func (*Redactor) SanitizeText ¶
func (redactor *Redactor) SanitizeText(raw []byte) (SanitizedPayload, error)
type SanitizedPayload ¶
type SanitizedPayload struct {
// contains filtered or unexported fields
}
SanitizedPayload is the only payload type accepted by the evidence CAS. Its bytes are unexported so callers must pass through a Redactor constructor.
func (SanitizedPayload) Bytes ¶
func (payload SanitizedPayload) Bytes() []byte
func (SanitizedPayload) Class ¶
func (payload SanitizedPayload) Class() string
func (SanitizedPayload) Report ¶
func (payload SanitizedPayload) Report() Report
func (SanitizedPayload) Size ¶
func (payload SanitizedPayload) Size() int
Click to show internal directories.
Click to hide internal directories.