token-guardian
Version:
A comprehensive solution for protecting and managing API tokens and secrets
18 lines (17 loc) • 528 B
TypeScript
/**
* Interface for token pattern definitions
*/
export interface TokenPattern {
/** Name of the token pattern */
name: string;
/** Regular expression to match the token */
regex: RegExp;
/** Description of what this pattern detects */
description: string;
/** Minimum entropy threshold for this pattern */
entropyThreshold: number;
/** Severity of the pattern */
severity: 'low' | 'medium' | 'high';
/** Optional validation function */
validate?: (token: string) => boolean;
}