pii

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: AGPL-3.0 Imports: 3 Imported by: 1

README

pii

PII Searching

Description

pii is a small library and command line utility that aims to make detecting PII a little easier for security analysts by doing the following:

  • Attempts to standardize well-known PII regular expressions to avoid discrepencies
  • Allows the creation of combinatorial logic around multiple regular expressions for more granularity
  • Proccesses files in parallel, giving performance enhancements over Python / Ruby / etc.
  • Is written as a library allowing for easy integration into existing Go tools

The tool is very much evolving as people contribute. This is one of those tools that should get better over time as improvements are made and the patterns are tuned even further.

Installation

go get github.com/gen0cide/pii/cmd/pii

Usage

pii search foo.txt
Options
  • pii -j/--json will output the data in JSON format.
  • pii search --find-matches will attempt to extract the findings from the files (expirimental)
Contact

Twitter: @alexlevinson

Slack: LOTR Slack (gandalf, #pii)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

type Matcher func(string) bool

Matcher is an evaluation type

func Address

func Address() Matcher

Address returns a matcher for identifying street address, po boxes, and zip codes

func All

func All(funcs ...Matcher) Matcher

All returns a meta-matcher that requires all supplied matchers evaluate to true

func And

func And(a, b Matcher) Matcher

And creates a meta matcher for requiring a logical AND between supplied matchers

func Any

func Any(funcs ...Matcher) Matcher

Any creates a meta matcher for any possible hits against a set of matchers

func AtLeastN

func AtLeastN(n int, funcs ...Matcher) Matcher

AtLeastN creates an at least n rule against a set of matchers

func BankInfo

func BankInfo() Matcher

BankInfo returns a matcher for identifying either IBANs or US Routing #s

func CreditCard

func CreditCard() Matcher

CreditCard returns a matcher for identifying major credit card numbers

func Email

func Email() Matcher

Email returns a matcher for identifying email addresses

func HaltLangDetect

func HaltLangDetect() Matcher

HaltLangDetect is a special matcher for preventing language detection from running

func IP

func IP() Matcher

IP returns a matcher for identifying IP addresses

func Link() Matcher

Link returns a matcher for identifying URLs and links that are not emails

func Not

func Not(f Matcher) Matcher

Not is the logical negation of a Matcher

func Or

func Or(a, b Matcher) Matcher

Or creates a meta matcher for performing a logical OR on two matchers

func Phone

func Phone() Matcher

Phone returns a matcher for identifying international phone numbers

func SSN

func SSN() Matcher

SSN returns a matcher for identifying US social security numbers

func UUID

func UUID() Matcher

UUID returns a matcher for identifying GUIDs, UUIDs, v3, v4, and v5

func VIN

func VIN() Matcher

VIN generates a matcher for identifying vehicle identification numbers

Jump to

Keyboard shortcuts

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