sensitive

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 3 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 sensitive names the files whose contents Prism does not hand to an agent unless asked: credentials, keys, environment files (SEC-03). A search still reports a match in them (path and line), so a text search keeps ripgrep's semantics; only the line text is withheld.

Index

Constants

View Source
const Withheld = "[withheld: sensitive file; --include-sensitive (MCP include_sensitive=true) shows it]"

Withheld is the text that replaces a sensitive line or file.

Variables

View Source
var Defaults = []string{
	".env", ".env.*", "*.env", "*.pem", "*.key", "id_rsa*", "id_dsa*", "id_ecdsa*", "id_ed25519*",
	"*.p12", "*.pfx", "*.jks", "*.keystore", ".npmrc", ".pypirc", ".netrc", "_netrc",
	"credentials", "credentials.*", "secrets.*", "*.secret", ".htpasswd", "*.kdbx",
}

Defaults are matched against the base name, case-insensitively.

Functions

func Add

func Add(patterns ...string)

Add appends patterns from prism.yaml (sensitive_paths:). Additive only: a repository cannot remove a default.

func Match

func Match(rel string) bool

Match reports whether a repository path is sensitive. Patterns without a slash match the base name; patterns with one match the whole path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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