taint

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: GPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package taint finds the values in a text that look like secrets, so that a session that read them can be stopped from sending them anywhere.

A canary catches a planted credential. Taint catches the real ones: when a tool result is private — it came from reading a .env file, a vault, a database of customers — the values in it that look like secrets are remembered for the session, and a later call that carries one of them out, plain or encoded, is noticed. Nothing here knows what a secret is; it knows what secrets look like: the value of a KEY=VALUE line whose key says so, and long strings with the randomness of a token.

Index

Constants

View Source
const MinLength = 12

MinLength is the shortest value worth remembering by default. Shorter ones match too much ordinary text.

Variables

This section is empty.

Functions

func Extract

func Extract(text string, minLength int) []string

Extract returns the values in text that look like secrets, longest first, each at least minLength characters long.

Types

This section is empty.

Jump to

Keyboard shortcuts

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