src/sanitizers
Module summary
Module src/sanitizers
Exports
| Name | Kind | Default |
|---|---|---|
BODY_LOC_THRESHOLD | variable | no |
ENTROPY_MIN_SCORE | variable | no |
ENTROPY_WINDOW_RE | variable | no |
EXIT_SECRET_DETECTED | variable | no |
HOST_REGEXES | variable | no |
INPUT_BYTE_CAP | variable | no |
MAX_MATCHES | variable | no |
PII_ALLOWLIST | variable | no |
PROVIDER_REGEXES | variable | no |
PUBLIC_HOST_ALLOWLIST | variable | no |
STAGE_ORDER | variable | no |
composeAll | function | no |
isPathBlocked | function | no |
logSecretHit | function | no |
sanitizeImplementations | function | no |
sanitizeIssueLog | function | no |
sanitizePII | function | no |
scan | function | no |
shannonEntropy | function | no |
Detail
BODY_LOC_THRESHOLD
BODY_LOC_THRESHOLDParams
None.
Returns
None.
Examples
None.
ENTROPY_MIN_SCORE
ENTROPY_MIN_SCOREParams
None.
Returns
None.
Examples
None.
ENTROPY_WINDOW_RE
ENTROPY_WINDOW_REParams
None.
Returns
None.
Examples
None.
EXIT_SECRET_DETECTED
EXIT_SECRET_DETECTEDParams
None.
Returns
None.
Examples
None.
HOST_REGEXES
HOST_REGEXESParams
None.
Returns
None.
Examples
None.
INPUT_BYTE_CAP
INPUT_BYTE_CAPParams
None.
Returns
None.
Examples
None.
MAX_MATCHES
MAX_MATCHESParams
None.
Returns
None.
Examples
None.
PII_ALLOWLIST
PII_ALLOWLISTParams
None.
Returns
None.
Examples
None.
PROVIDER_REGEXES
PROVIDER_REGEXESParams
None.
Returns
None.
Examples
None.
PUBLIC_HOST_ALLOWLIST
PUBLIC_HOST_ALLOWLISTParams
None.
Returns
None.
Examples
None.
STAGE_ORDER
STAGE_ORDERParams
None.
Returns
None.
Examples
None.
composeAll
composeAll(content, opts): objectRun all sanitizers in canonical order on content.
Params
contentopts
Returns
object
Examples
None.
isPathBlocked
isPathBlocked(absPath)Stateless predicate: does the given absolute path point at content that the
wiki-generator must refuse to read? Fail-closed: ambiguous filesystem errors
(EACCES, ELOOP, etc.) resolve to true. ENOENT is the one safe miss because
the on-disk pattern check already ran against the resolved input.
Params
absPath
Returns
None.
Examples
None.
logSecretHit
logSecretHit(opts): voidEmit a structured secret_hit record to stderr.
Params
opts
Returns
void
Examples
None.
sanitizeImplementations
sanitizeImplementations(content)Params
content
Returns
None.
Examples
None.
sanitizeIssueLog
sanitizeIssueLog(content)Params
content
Returns
None.
Examples
None.
sanitizePII
sanitizePII(content)Params
content
Returns
None.
Examples
None.
scan
scan(content, opts): objectScan content for secret-shaped substrings.
Params
contentopts
Returns
object
Examples
None.
shannonEntropy
shannonEntropy(s)Shannon entropy of a string in bits per character.
Returns 0 for inputs shorter than the length floor (20 characters) so the
caller can short-circuit candidate windows without a math call. Above the
floor the value is -Σ p(c) * log2(p(c)) over the multiset of characters.
Pure, allocation-bounded (one Map keyed by unique characters), no I/O.
Params
s
Returns
None.
Examples
None.