mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
test(webui): anonymised admin API fixtures with leak scan
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
export type LeakTerm = string | RegExp
|
||||
|
||||
// Site-specific names come from LEAK_SCAN_EXTRA_TERMS so this list never publishes them.
|
||||
const LITERALS: string[] = ['raczylo', 'aliyuncs', 'cluster.local']
|
||||
|
||||
const PATTERNS: RegExp[] = [
|
||||
/\bsk-[A-Za-z0-9]/,
|
||||
/\b10\.\d+\.\d+\.\d+\b/,
|
||||
/\b172\.(1[6-9]|2\d|3[01])\./,
|
||||
/\b192\.168\./,
|
||||
/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/,
|
||||
]
|
||||
|
||||
export function leakTerms(extra?: string): LeakTerm[] {
|
||||
const names = (extra ?? '')
|
||||
.split(',')
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean)
|
||||
return [...LITERALS, ...PATTERNS, ...names]
|
||||
}
|
||||
Reference in New Issue
Block a user