From 40f904a2bece602129918599cfbd732c42804b05 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:14:22 +0100 Subject: [PATCH 01/30] fix(redaction): MCP gap rules, part 1 (DRO-4114) --- CHANGELOG.md | 8 ++++++++ README.md | 10 ++++++---- THIRD_PARTY_NOTICES.md | 30 ++++++++++++++++++++++++++++++ go/NOTICE | 30 ++++++++++++++++++++++++++++++ go/README.md | 14 ++++++++------ 5 files changed, 82 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0bb694..769e285 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Unreleased + +- Opt-in `pii` adds Luhn-checked cards and mod-97 IBANs. Overlapping valid IBANs are masked together; IBAN-shaped ranges no longer produce partial phone or card hits. +- Opt-in `phone` covers `00`-prefixed international numbers and German national formats. `ip` covers IPv6 zone IDs such as `fe80::1%en0`. +- Opt-in `otp` recognizes codes before or after their context, including multilingual labels, and excludes date-shaped values. The bare-code rule leaves `Invoice code: 482913`, `Order code: 482913`, and `HTTP error: Code: 482913` visible. The addressed-code rule still masks `HTTP error: Your code: 482913`. +- Localized password keys use NFC and case mapping. The standard-tier `mnemonic` rule covers keyed values, BIP39 runs, and checksum-valid windows; it also applies in `compat` without `pii`. +- The BIP39 wordlist is noted in `THIRD_PARTY_NOTICES.md`. Limits are documented in the README and SPEC §15. + ## 0.4.1 (2026-11-26) - Strict text redaction covers scheme-prefixed assignments and session IDs. diff --git a/README.md b/README.md index f90ff0b..7f9e7af 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,9 @@ Secrets are replaced with a placeholder of the form `[REDACTED:]`, for exa - Tokens and API keys of common providers (the full tier): AWS, GitHub, GitLab, Slack, Stripe, OpenAI, Anthropic, npm, 1Password and more. The list is in [`spec/INVENTORY.md`](spec/INVENTORY.md). - Private keys (PEM blocks), credential URIs and database connection strings. - JWTs and `Authorization`, `Bearer`, `Basic` and `Token` header values. -- `password=`-style pairs in text, and the values of secret-named JSON keys (`password`, `api_key`, `x-auth-token`, `clientSecret`, …). Counts such as `max_tokens` stay. -- With the opt-in `pii` option: email addresses, phone numbers, IP addresses and OTP codes. +- `password=`-style pairs in text, including localized keys such as `passwort`, `kennwort` and `contraseña`, and the values of secret-named JSON keys (`password`, `api_key`, `x-auth-token`, `clientSecret`, …). Counts such as `max_tokens` stay. +- Seed phrases: keyed `mnemonic` and `seed phrase` values, `seed` only when followed by leading BIP39 words, and BIP39 runs or checksum-valid windows. +- With the opt-in `pii` option: email addresses, card numbers (Luhn), IBANs (mod-97), phone numbers including `00`-prefixed and German national forms, IP addresses including IPv6 zone IDs, and OTP codes before or after their code label. ## Install @@ -132,11 +133,11 @@ out, _, err := redaction.RedactJSON([]byte(`{"user":"ann","api_key":"k-123","max | Option | What it does | Spec | |---|---|---| -| `compat` mode | Output of release 0.2.0. Default in TypeScript. The full tier falls back to the standard rules if it fails. | [§9](spec/SPEC.md#9-tiers-and-modes) | +| `compat` mode | Keeps legacy failure and limit behavior; this release also masks seed phrases. Default in TypeScript. The full tier falls back to the standard rules if it fails. | [§9](spec/SPEC.md#9-tiers-and-modes) | | `strict` mode | Never returns text that was not scanned; anything it cannot scan becomes a placeholder. Default in Python and Go, an option in TypeScript. | [§9](spec/SPEC.md#9-tiers-and-modes) | | Standard tier (sync) | The core rules, for logs, spans and hot paths. | [§4](spec/SPEC.md#4-detection) | | Full tier (async in TypeScript) | The standard rules plus the ported secretlint preset: provider tokens, private keys, connection strings. | [§4.11–4.17](spec/SPEC.md#411-token-full-tier) | -| `pii` | Off by default. Also redacts emails, phone numbers, IP addresses and OTP codes. | [§9.5](spec/SPEC.md#95-the-pii-option) | +| `pii` | Off by default. This release also redacts cards, IBANs, 00-prefixed and German national phones, IPv6 zone IDs, and OTP codes on either side of code labels, alongside emails, phones and IP addresses. | [§9.5](spec/SPEC.md#95-the-pii-option) | | Size limits | Text, node and depth limits. Input over a limit becomes `[REDACTED:size-limit]`; the full-tier rules scan the first 2,000,000 characters. | [§9.1](spec/SPEC.md#91-text-standard-tier) | ## Limits @@ -144,6 +145,7 @@ out, _, err := redaction.RedactJSON([]byte(`{"user":"ann","api_key":"k-123","max - Detection is based on patterns and key names. It is best effort and not a data-loss-prevention guarantee: a secret in a format no rule knows, or in prose, can be missed. - Not a PII class today: IMEI, GPS coordinates, postal addresses, dates of birth and national IDs. Names are not detected either. - Input over a size limit is redacted with `[REDACTED:size-limit]` instead of being passed on unscanned. The limits and their defaults are in each package README. +- Known misses are listed in [TypeScript limits](ts/README.md#limits) and [SPEC §15](spec/SPEC.md#15-known-portability-risks). - Report a miss privately, as described in [`SECURITY.md`](SECURITY.md). ## How it works diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 90abba1..83aadf5 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -88,3 +88,33 @@ not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. ``` + +## BIP39 English wordlist (MIT) + +`mnemonic.words` in `spec/algorithms.json` reproduces the English BIP39 wordlist from +[python-mnemonic v0.21](https://github.com/trezor/python-mnemonic/blob/v0.21/src/mnemonic/wordlist/english.txt). +The [upstream MIT license](https://github.com/trezor/python-mnemonic/blob/v0.21/LICENSE) follows. + +``` +The MIT License (MIT) + +Copyright (c) 2013-2016 Pavol Rusnak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` diff --git a/go/NOTICE b/go/NOTICE index 90abba1..83aadf5 100644 --- a/go/NOTICE +++ b/go/NOTICE @@ -88,3 +88,33 @@ not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. ``` + +## BIP39 English wordlist (MIT) + +`mnemonic.words` in `spec/algorithms.json` reproduces the English BIP39 wordlist from +[python-mnemonic v0.21](https://github.com/trezor/python-mnemonic/blob/v0.21/src/mnemonic/wordlist/english.txt). +The [upstream MIT license](https://github.com/trezor/python-mnemonic/blob/v0.21/LICENSE) follows. + +``` +The MIT License (MIT) + +Copyright (c) 2013-2016 Pavol Rusnak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` diff --git a/go/README.md b/go/README.md index bd18ea8..6fe726f 100644 --- a/go/README.md +++ b/go/README.md @@ -114,8 +114,8 @@ replaced; `example_test.go` runs this. - `Compat` reproduces the TypeScript package's default mode (a skip-key value is kept as it is, an over-long key is left as it is). In the full tier it has **no length, depth or node limit** (SPEC 9.4, as in the TypeScript package: `MaxChars`, `MaxDepth` and `MaxNodes` are not used), and a - failing scanner falls back to the standard rules, then to `[REDACTED:error]`. Use Compat only to - match old output. + failing scanner falls back to the standard rules, then to `[REDACTED:error]`. Compat preserves + legacy failure and limit behavior, not identical output: for example, mnemonic detection now runs without `PII`. In `Strict` the same key names that decide JSON keys also decide **text pairs** (`key: value`, `key=value`, `key => "value"`, `key := "value"`, also inside escaped JSON): a value under a key with @@ -138,11 +138,13 @@ strings and keys: | `email` | `person@example.com`, `A.B+tag@Example.CO.uk` | `react@18.2.0`, `icon@2x.png`, `user@localhost` | | `phone` | `+44 20 7946 0958`, `(415) 555-0123`, `415-555-0123`, `020 7946 0958`, `01 99 00 12 34` | `Request ID 1234567890`, `2026-11-19 10:00:59`, `v0.3.0` | | `ip` | IPv4 `192.0.2.123`, IPv6 `2001:db8::1`, `[fdab::cafe]:8080` (the address only, a port stays) | `version 1.2.3.4`, `android 14.0.0.1`, `999.1.1.1`, `std::vector` | -| `otp` | the digits after a code noun (`Your verification code is 482913`, `OTP code: 482913`) | `error code 5000`, `exit code 1370`, `response code 200000`, `port 8080` | +| `otp` | codes before or after a recognized label (`482913 is your verification code`, `OTP code: 482913`) | `error code 5000`, `Invoice code: 482913`, `HTTP error: Code: 482913` | +| `card` | `4111 1111 1111 1111` (13–19 digits, Luhn-valid) | Luhn-invalid numbers | +| `iban` | `DE89 3704 0044 0532 0130 00` (known country length and valid checksum) | Same shape with a bad checksum | -The placeholders are `[REDACTED:email]`, `[REDACTED:phone]`, `[REDACTED:ip]` and `[REDACTED:otp]`; a text -of any length is scanned. Names, postal addresses, IDN emails, URL-encoded values and prose secrets such -as `password hunter2` are not detected; the rules are in SPEC sections 4.19 to 4.22 and 15. +Each placeholder uses the rule ID, for example `[REDACTED:iban]`. With the option a text of any length is scanned. +See [SPEC](../spec/SPEC.md) §§4.19–4.24 and §15 for rules and limits. Mnemonic detection is part of the standard tier +in both modes, including `Compat` without `PII`. ## Limits From 57ce067e2ca25d6389bc8240e7c3c982d244247b Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:14:36 +0100 Subject: [PATCH 02/30] fix(redaction): MCP gap rules, part 2 (DRO-4114) --- go/field.go | 23 +++-- go/field_test.go | 46 ++++++++- go/fulltier.go | 2 +- go/fulltier_test.go | 1 - go/golden_test.go | 32 +++++- go/integrity_test.go | 46 ++++++++- go/keynames.go | 78 +++++++++++++- go/prefilter_test.go | 11 +- go/redaction.go | 3 +- go/rules.go | 151 +++++++++++++++++++++------ go/rules_keypairs.go | 62 +++++++++-- go/rules_pairs.go | 29 ------ go/rules_regex.go | 59 ++++++++++- go/spec.go | 7 ++ go/spec/algorithms.json | 224 ++++++++++++++++++++++++++++++++++++++++ 15 files changed, 686 insertions(+), 88 deletions(-) diff --git a/go/field.go b/go/field.go index eed9cde..0bc1711 100644 --- a/go/field.go +++ b/go/field.go @@ -3,8 +3,11 @@ package redaction import ( "encoding/json" "reflect" + "strings" ) +const fieldSeedPrefixBytes = 256 + // KeyVerdict says what the key name makes of the values below it: VerdictNone, VerdictString // (a string is replaced, a number is kept: `tokens`, `max_tokens`) or VerdictAny (a string and a // number are replaced: `password`, `pin`). It is the verdict RedactJSON uses for an object key. @@ -14,28 +17,28 @@ func KeyVerdict(key string) Verdict { // RedactField redacts the value of one attribute (a log field, a span attribute) by its key, the // way RedactJSON treats an object member: a string under a secret-named key is replaced by -// `[REDACTED:key-context]`, any other string is scanned like RedactText with the default +// `[REDACTED:key-context]` (including seed strings that start with three BIP39 words). +// Any other string is scanned like RedactText with the default // options, and a number is replaced only under a key whose verdict is VerdictAny, so counts such // as `max_tokens` stay. Every other type (bool, nil, a struct, an error) is returned as it is: // turn it into a string first, or marshal it and use RedactJSON. The returned value has the type // of the input, except that a replaced number is the placeholder string. func RedactField(key string, value any) any { - verdict := KeyVerdict(key) switch typed := value.(type) { case nil: return nil case string: - return redactFieldText(verdict, typed) + return redactFieldText(key, typed) case json.Number: - return redactFieldNumber(verdict, value) + return redactFieldNumber(KeyVerdict(key), value) } switch reflect.ValueOf(value).Kind() { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, reflect.Float32, reflect.Float64: - return redactFieldNumber(verdict, value) + return redactFieldNumber(KeyVerdict(key), value) case reflect.String: - return redactFieldText(verdict, reflect.ValueOf(value).String()) + return redactFieldText(key, reflect.ValueOf(value).String()) } return value } @@ -47,12 +50,14 @@ func redactFieldNumber(verdict Verdict, value any) any { return theEngine.placeholders.read(theEngine.spec.algorithms.RuleIDs.KeyContext) } -func redactFieldText(verdict Verdict, text string) string { - if verdict == VerdictNone { +func redactFieldText(key, text string) string { + if exceedsChars(text, theEngine.limits(Options{}).maxChars) || + theEngine.stringKeyVerdict(decodeUTF8(key), len(text), fieldSeedPrefixBytes, func(at int) uint16 { return uint16(text[at]) }) == VerdictNone { out, _ := RedactText(text, Options{}) return out } - if text == "" || theEngine.placeholders.isWhole(decodeUTF8(text)) { + p := theEngine.placeholders + if text == "" || (strings.HasPrefix(text, strings.TrimSuffix(p.open, ":")) && p.isWhole(decodeUTF8(text))) { return text } return theEngine.placeholders.read(theEngine.spec.algorithms.RuleIDs.KeyContext) diff --git a/go/field_test.go b/go/field_test.go index 86cf659..c2e8807 100644 --- a/go/field_test.go +++ b/go/field_test.go @@ -2,6 +2,8 @@ package redaction import ( "encoding/json" + "runtime" + "strings" "testing" ) @@ -59,6 +61,11 @@ func TestRedactField(t *testing.T) { {"json.Number elsewhere", "latency_ms", json.Number("42"), json.Number("42")}, {"number elsewhere", "latency_ms", 42, 42}, {"named string type", "password", nameString("hunter2xx"), "[REDACTED:key-context]"}, + {"named seed string", "SEED", nameString("abandon ability able about"), "[REDACTED:key-context]"}, + {"seed with whitespace", "seed", "\tAbandon ability\table.", "[REDACTED:key-context]"}, + {"seed with partial third word", "seed", "abandon ability able_suffix", "abandon ability able_suffix"}, + {"ordinary seed stays", "seed", "abandon ability not-a-word", "abandon ability not-a-word"}, + {"numeric seed stays", "seed", 42, 42}, {"bool stays", "password", true, true}, {"nil stays", "password", nil, nil}, {"struct stays", "password", attribute{"x"}, attribute{"x"}}, @@ -72,13 +79,50 @@ func TestRedactField(t *testing.T) { } } +func TestRedactFieldRejectsOversizedNoteBeforeAllocatingUnits(t *testing.T) { + maxChars := theEngine.limits(Options{}).maxChars + text := strings.Repeat("a", 3*maxChars+1) + var before, after runtime.MemStats + runtime.ReadMemStats(&before) + got := RedactField("note", text) + runtime.ReadMemStats(&after) + if got != "[REDACTED:size-limit]" { + t.Fatal("oversized field did not return the size-limit marker") + } + if allocated := after.TotalAlloc - before.TotalAlloc; allocated >= uint64(len(text)) { + t.Fatalf("oversized field allocated %d bytes; want less than the %d-byte input", allocated, len(text)) + } +} + +func TestRedactFieldRejectsOversizedSeed(t *testing.T) { + spaces := strings.Repeat(" ", 3*theEngine.limits(Options{}).maxChars+1) + for _, tc := range []struct{ name, value string }{ + {"whitespace only", spaces}, + {"valid prefix", "abandon ability able " + spaces}, + } { + t.Run(tc.name, func(t *testing.T) { + if got := RedactField("seed", tc.value); got != "[REDACTED:size-limit]" { + t.Fatal("oversized seed did not return the size-limit marker") + } + }) + } +} + +func TestRedactFieldBoundsSeedPrefixProbe(t *testing.T) { + value := strings.Repeat(" ", 4096) + "abandon ability able" + if got := RedactField("seed", value); got != value { + t.Fatal("seed was classified using words beyond the prefix probe") + } +} + func TestRedactFieldAgreesWithRedactJSON(t *testing.T) { members := map[string]string{ "password": `"hunter2xx"`, "max_tokens": `100`, "pin": `1234`, - "note": `"password=` + secretValue + `"`, + "note": `"password=` + secretValue + `"`, "seed": `"abandon ability able about"`, } values := map[string]any{ "password": "hunter2xx", "max_tokens": 100, "pin": 1234, "note": "password=" + secretValue, + "seed": "abandon ability able about", } for key, literal := range members { out, _, err := RedactJSON([]byte(`{"`+key+`":`+literal+`}`), Options{}) diff --git a/go/fulltier.go b/go/fulltier.go index a978bbe..22d389c 100644 --- a/go/fulltier.go +++ b/go/fulltier.go @@ -48,7 +48,7 @@ func (e *engine) detectFull(t *text, opts detectOpts) []hit { if t.length() < e.scanFloor(opts) { return nil } - return mergeHits(append(e.detectFullWindows(t), e.detect(t, opts)...)) + return e.detect(t, opts, e.detectFullWindows(t)...) } // tryDetect runs a detector and reports whether it finished; a panic is a failure. diff --git a/go/fulltier_test.go b/go/fulltier_test.go index 90939ae..faf5231 100644 --- a/go/fulltier_test.go +++ b/go/fulltier_test.go @@ -409,7 +409,6 @@ func brokenEngine(standardFails bool) *engine { if standardFails { failing := []pipelineEntry{{id: "broken", scanner: panicScanner{}}} broken.pipeline, broken.strict = failing, failing - broken.compatPII, broken.strictPII = failing, failing } return &broken } diff --git a/go/golden_test.go b/go/golden_test.go index 34dedcd..7b044df 100644 --- a/go/golden_test.go +++ b/go/golden_test.go @@ -174,6 +174,26 @@ func withoutNumberedKeys(n *node) *node { // no value is lost (decided 2026-11-18); the recorded output kept the later value only. const collisionCases = 120 +var mnemonicWindowCases = []string{"large-window-0", "large-window-1", "large-window-2", "large-window-3", "large-window-4", "large-window-5", "large-window-6"} + +// Repeated "tail" contains checksum-valid BIP39 windows; only the padding changes (SPEC 4.25). +func isMnemonicWindowOnly(t *testing.T, c goldenCase, got []byte, result Result, full bool) bool { + t.Helper() + parts := c.Gen.Parts + var spaces int + var token string + if json.Unmarshal(parts[0][1], &spaces) != nil || json.Unmarshal(parts[1][0], &token) != nil { + t.Fatal("bad mnemonic golden fixture") + } + prefix := strings.Repeat(" ", spaces) + counts := map[string]int{"mnemonic": 1} + if full { + token = "[REDACTED:npm]" + counts["npm"] = 1 + } + return bytes.Equal(got, jsonString(decodeUTF8(prefix+token+" [REDACTED:mnemonic] "))) && sameCounts(countsOf(result), counts) +} + // isNumberingOnly: the output is the recorded one plus members with numbered keys, and the hits are // the recorded ones (the number costs no hit). func isNumberingOnly(t *testing.T, got []byte, result Result, recorded goldenOutcome) bool { @@ -195,13 +215,16 @@ func TestGoldenReplay(t *testing.T) { continue } differing = append(differing, c.ID) + if slices.Contains(mnemonicWindowCases, c.ID) && isMnemonicWindowOnly(t, c, got, result, false) { + continue + } if c.Family != "key-collision" || !isNumberingOnly(t, got, result, c.Sync) { t.Errorf("%s differs in more than the numbering of colliding keys: %s", c.ID, got) } } - t.Logf("standard side: replayed %d cases, %d differ (colliding keys)", len(golden.Cases), len(differing)) - if len(differing) != collisionCases { - t.Fatalf("expected %d key-collision cases to differ, got %d", collisionCases, len(differing)) + t.Logf("standard side: replayed %d cases, %d differ (colliding keys and mnemonic windows)", len(golden.Cases), len(differing)) + if len(differing) != collisionCases+len(mnemonicWindowCases) { + t.Fatalf("expected %d key-collision and %d mnemonic cases to differ, got %d", collisionCases, len(mnemonicWindowCases), len(differing)) } } @@ -334,6 +357,7 @@ func TestGoldenReplayFullTier(t *testing.T) { } case isKeyCase: checkKeyCase(t, c.ID, got, result, c.Async) + case slices.Contains(mnemonicWindowCases, c.ID) && isMnemonicWindowOnly(t, c, got, result, true): case c.Family == "key-collision" && isNumberingOnly(t, got, result, c.Async): collisions++ default: @@ -342,7 +366,7 @@ func TestGoldenReplayFullTier(t *testing.T) { } t.Logf("full side: replayed %d cases, %d differ: the AWS case, %d key cases, %d colliding-key cases", len(golden.Cases), len(differing), len(keyCases), collisions) - if len(differing) != 1+len(keyCases)+collisionCases || collisions != collisionCases { + if len(differing) != 1+len(keyCases)+collisionCases+len(mnemonicWindowCases) || collisions != collisionCases { t.Fatalf("expected the AWS case, %d key cases and %d collision cases; got %d differing, %d colliding", len(keyCases), collisionCases, len(differing), collisions) } diff --git a/go/integrity_test.go b/go/integrity_test.go index 0c52b3d..0d40c34 100644 --- a/go/integrity_test.go +++ b/go/integrity_test.go @@ -89,11 +89,55 @@ func TestSpecFailuresNameTheFailureNotTheData(t *testing.T) { } func TestEngineIsBuiltFromTheEmbeddedSpec(t *testing.T) { - if theEngine == nil || len(theEngine.pipeline) != 18 || len(theEngine.full) != 36 { + if theEngine == nil || theEngine.mnemonic == nil || len(theEngine.pipeline) != 18 || len(theEngine.full) != 36 { t.Fatal("the engine does not hold the rules of the spec") } } +func TestEngineRequiresOneMnemonicRule(t *testing.T) { + for _, count := range []int{0, 1, 2} { + spec, err := decodeSpec(embeddedFiles(t)) + if err != nil { + t.Fatal(err) + } + var mnemonic json.RawMessage + var standard []json.RawMessage + for _, raw := range spec.rules.Pipeline { + var head ruleHead + if err := json.Unmarshal(raw, &head); err != nil { + t.Fatal(err) + } + if head.Kind == "mnemonic" { + mnemonic = raw + } else { + standard = append(standard, raw) + } + } + // A mnemonic need not be the last entry in the source pipeline. + spec.rules.Pipeline = nil + for i := 0; i < count; i++ { + spec.rules.Pipeline = append(spec.rules.Pipeline, mnemonic) + } + spec.rules.Pipeline = append(spec.rules.Pipeline, standard...) + e, err := newEngine(spec) + if count != 1 { + if err == nil { + t.Errorf("accepted %d mnemonic rules", count) + } + continue + } + if err != nil { + t.Fatal(err) + } + for _, strict := range []bool{false, true} { + hits := e.detect(textFromString("seed: abandon ability able about"), detectOpts{strict: strict}) + if len(hits) != 1 || hits[0].id != "mnemonic" { + t.Errorf("strict=%v: got %+v, want one mnemonic hit", strict, hits) + } + } + } +} + // classPatterns collects every class of the pipeline: the guard classes and every field whose // name ends in Class, Char, Stop or End (SPEC 2). func classPatterns(t *testing.T) []string { diff --git a/go/keynames.go b/go/keynames.go index ac442cc..c14a145 100644 --- a/go/keynames.go +++ b/go/keynames.go @@ -24,6 +24,10 @@ type keyNames struct { prefixWords []string passLastWord string countWords map[string]bool + localized map[string]bool + aliasesTails map[string]bool + mnemonic map[string]bool + exactMax int placeholders *placeholders } @@ -38,6 +42,21 @@ func newKeyNames(keys *keysFile, found *placeholders) *keyNames { for _, word := range keys.JoinedExtra { joined[word] = true } + tails := make(map[string]bool) + for _, key := range keys.LocalizedPasswords { + end := strings.LastIndexAny(key, " '’") + if end >= 0 { + // LastIndexAny returns the byte offset at the start of the separator. + key = strings.TrimLeft(key[end:], " '’") + } + tails[key] = true + } + exactMax := 0 + for _, names := range [][]string{keys.LocalizedPasswords, keys.MnemonicKeys} { + for _, key := range names { + exactMax = max(exactMax, 2*len(decodeUTF8(key))) + } + } return &keyNames{ sequences: sequences, exact: toSet(keys.ExactKeys), @@ -46,10 +65,54 @@ func newKeyNames(keys *keysFile, found *placeholders) *keyNames { prefixWords: keys.PrefixWords, passLastWord: keys.PassLastWord, countWords: toSet(keys.CountWords), + localized: toSet(keys.LocalizedPasswords), + aliasesTails: tails, + mnemonic: toSet(keys.MnemonicKeys), + exactMax: exactMax, placeholders: found, } } +// exactKeyForm recognizes the NFC-equivalent forms that can match the pinned aliases (SPEC 6). +// Their only canonical compositions are N + tilde, O + diaeresis, S + cedilla and I + dot above, +// and the only relevant singleton is the Kelvin sign (canonically K). This is not a general NFC +// normalizer; all other marks and letters that cannot occur in a matching name remain distinct. +func (k *keyNames) exactKeyForm(key []uint16) string { + if len(key) > k.exactMax { + return "" + } + var form strings.Builder + form.Grow(len(key)) + for i := 0; i < len(key); i++ { + unit := key[i] + if i+1 < len(key) { + mark := key[i+1] + switch { + case (unit == 'N' || unit == 'n') && mark == '\u0303': + unit, i = 'ñ', i+1 + case (unit == 'O' || unit == 'o') && mark == '\u0308': + unit, i = 'ö', i+1 + case (unit == 'S' || unit == 's') && mark == '\u0327': + unit, i = 'ş', i+1 + case unit == 'I' && mark == '\u0307': + unit, i = 'i', i+1 + } + } + switch { + case unit == 'İ': + unit = 'i' + case unit == 'K': + unit = 'k' + case unit == 'Ł' || unit == 'Ş': + unit++ + case upperSet.has(unit) || ('А' <= unit && unit <= 'Я') || unit == 'Ñ' || unit == 'Ö': + unit += 32 + } + form.WriteRune(rune(unit)) + } + return form.String() +} + func toSet(words []string) map[string]bool { set := make(map[string]bool, len(words)) for _, word := range words { @@ -191,7 +254,8 @@ func (k *keyNames) matchKey(key []uint16, plural bool) bool { } func (k *keyNames) isSecretKeyName(key []uint16) bool { - return k.matchKey(key, true) + form := k.exactKeyForm(key) + return k.localized[form] || k.mnemonic[form] || k.matchKey(key, true) } // redactedOpen is the text every placeholder starts with, the spec's `placeholder.open` without its @@ -205,6 +269,10 @@ func (k *keyNames) keyVerdict(raw []uint16) Verdict { if containsUnits(raw, redactedOpen) { key = joinSegments(k.placeholders.literalSegments(newText(raw))) } + form := k.exactKeyForm(key) + if k.localized[form] || k.mnemonic[form] { + return VerdictAny + } if !k.matchKey(key, true) { return VerdictNone } @@ -219,6 +287,14 @@ func (k *keyNames) keyVerdict(raw []uint16) Verdict { return VerdictAny } +// stringKeyVerdict applies the same value-aware seed rule to fields and JSON members. +func (e *engine) stringKeyVerdict(key []uint16, length, maxPrefix int, unitAt func(int) uint16) Verdict { + if len(key) == 4 && foldString(key) == "seed" && e.mnemonic.beginsWithWords(length, maxPrefix, unitAt) { + return VerdictString + } + return e.keys.keyVerdict(key) +} + func joinSegments(segments [][]uint16) []uint16 { var joined []uint16 for i, segment := range segments { diff --git a/go/prefilter_test.go b/go/prefilter_test.go index 4431e58..3078281 100644 --- a/go/prefilter_test.go +++ b/go/prefilter_test.go @@ -42,7 +42,16 @@ func searchersOf(t *testing.T) map[string][]*searcher { } } collect("", theEngine.pipeline) - collect("strict:", theEngine.strictPII) + collect("strict:", theEngine.strict) + found[theEngine.mnemonic.id] = []*searcher{theEngine.mnemonic.label} + for _, entry := range theEngine.pii { + if entry.iban != nil { + id := "pii:" + entry.id + found[id] = append(found[id], entry.iban.lead) + } else { + collect("pii:", []pipelineEntry{entry.pipelineEntry}) + } + } collect("full:", theEngine.full) return found } diff --git a/go/redaction.go b/go/redaction.go index 55aa605..907c46c 100644 --- a/go/redaction.go +++ b/go/redaction.go @@ -18,7 +18,8 @@ const ( // Strict never returns text that was not scanned: a cap, a limit or an internal failure gives // a placeholder. It is the zero value. Strict Mode = iota - // Compat reproduces the TypeScript package v0.2.0 for the standard tier. + // Compat keeps prior standard-tier formats, with the shared placeholder guard and the + // added mnemonic and localized key rules (SPEC 9). Compat ) diff --git a/go/rules.go b/go/rules.go index 062fc85..741307a 100644 --- a/go/rules.go +++ b/go/rules.go @@ -16,18 +16,22 @@ type pipelineEntry struct { scanner scanner } +type piiEntry struct { + pipelineEntry + iban *ibanRule +} + // engine is the interpreter: the loaded spec, compiled once at start-up. type engine struct { spec *loadedSpec placeholders *placeholders evidence *evidence keys *keyNames - // pipeline is the rule list of compat, strict that of strict (SPEC 4.10); the two PII lists are those - // followed by the rules of `pii`. + mnemonic *mnemonicRule + // pipeline is the rule list of compat and strict that of strict (SPEC 4.10). PII hits are collected separately. pipeline []pipelineEntry strict []pipelineEntry - compatPII []pipelineEntry - strictPII []pipelineEntry + pii []piiEntry full []pipelineEntry letters *letterTable whitespace *unitSet @@ -122,9 +126,6 @@ func newEngine(spec *loadedSpec) (*engine, error) { if e.letters, err = parseLetters(spec.algorithms.Letters.Ranges); err != nil { return nil, err } - if e.pipeline, err = e.buildRules(b, spec.rules.Pipeline, e.standardKinds()); err != nil { - return nil, err - } if err = e.buildModeRules(b); err != nil { return nil, err } @@ -210,22 +211,61 @@ func (e *engine) fullKinds() map[string]ruleBuilder { } } -// buildModeRules builds the lists of the other modes and of `pii` (the list of compat is built). +// buildModeRules builds the two standard modes, their shared mnemonic rule, and PII. func (e *engine) buildModeRules(b *builder) error { rules := &e.spec.rules - raws, err := strictRules(rules.Pipeline, rules.Strict) - if err != nil { - return err + var standard []json.RawMessage + for _, raw := range rules.Pipeline { + var head ruleHead + if err := decodeRule(raw, &head); err != nil { + return err + } + if head.Kind != "mnemonic" { + standard = append(standard, raw) + continue + } + if e.mnemonic != nil { + return errSpecRejected + } + var err error + if e.mnemonic, err = e.newMnemonic(b, raw); err != nil { + return err + } + } + if e.mnemonic == nil { + return errSpecRejected } - if e.strict, err = e.buildRules(b, raws, e.standardKinds()); err != nil { + kinds := e.standardKinds() + var err error + if e.pipeline, err = e.buildRules(b, standard, kinds); err != nil { return err } - piiRules, err := e.buildRules(b, rules.PII, e.standardKinds()) + raws, err := strictRules(standard, rules.Strict) if err != nil { return err } - e.compatPII = append(append([]pipelineEntry(nil), e.pipeline...), piiRules...) - e.strictPII = append(append([]pipelineEntry(nil), e.strict...), piiRules...) + if e.strict, err = e.buildRules(b, raws, kinds); err != nil { + return err + } + for _, raw := range rules.PII { + var head ruleHead + if err := decodeRule(raw, &head); err != nil { + return err + } + entry := piiEntry{pipelineEntry: pipelineEntry{id: head.ID}} + switch head.Kind { + case "iban": + entry.iban, err = e.newIBAN(b, raw) + case "regex": + entry.scanner, err = e.newRegexRule(b, raw) + default: + return errSpecRejected + } + if err != nil { + return err + } + e.pii = append(e.pii, entry) + } return nil } @@ -257,19 +297,6 @@ type detectOpts struct { pii bool } -// rules is the rule list of the options: the list of the mode, then the rules of `pii` when asked for. -func (e *engine) rules(opts detectOpts) []pipelineEntry { - switch { - case opts.strict && opts.pii: - return e.strictPII - case opts.strict: - return e.strict - case opts.pii: - return e.compatPII - } - return e.pipeline -} - // scanFloor is the shortest text (or object key) a scan looks at: none in strict or with `pii`, else // `text.minScanLength` (SPEC 4, 9.1). func (e *engine) scanFloor(opts detectOpts) int { @@ -280,11 +307,75 @@ func (e *engine) scanFloor(opts detectOpts) int { } // detect is the standard tier on a whole text: every rule of the list in order, hits merged. -func (e *engine) detect(t *text, opts detectOpts) []hit { +func (e *engine) detect(t *text, opts detectOpts, full ...hit) []hit { if t.length() < e.scanFloor(opts) { return nil } - return mergeHits(collectHits(e.rules(opts), t)) + entries := e.pipeline + if opts.strict { + entries = e.strict + } + hits := append(full, collectHits(entries, t)...) + piiStart := len(hits) + if opts.pii { + var shapes []ibanShape + whole := []span{{0, t.length()}} + segments := whole + for _, entry := range e.pii { + if entry.iban != nil { + shapes = entry.iban.scan(t) + var cursor int + segments = nil + for _, shape := range shapes { + if !shape.valid { + continue + } + if cursor < shape.start { + segments = append(segments, span{cursor, shape.start}) + } + hits = append(hits, hit{id: entry.id, start: shape.start, end: shape.end}) + cursor = max(cursor, shape.end) + } + if cursor < t.length() { + segments = append(segments, span{cursor, t.length()}) + } + continue + } + numeric := entry.id == "phone" || entry.id == "card" + parts := whole + if numeric { + parts = segments + } + shape := 0 + for _, part := range parts { + view := t + if part != whole[0] { + view = newText(t.units[part.start:part.end]) + } + for _, found := range entry.scanner.scan(view) { + found.start += part.start + found.end += part.start + if numeric { + for shape < len(shapes) && shapes[shape].end <= found.start { + shape++ + } + if shape < len(shapes) && shapes[shape].start < found.end { + continue + } + } + hits = append(hits, hit{id: entry.id, start: found.start, end: found.end}) + } + } + } + } + if spans := e.mnemonic.scan(t, mergeHits(hits)); len(spans) != 0 { + mnemonicHits := make([]hit, 0, len(spans)+len(hits)-piiStart) + for _, s := range spans { + mnemonicHits = append(mnemonicHits, hit{id: e.mnemonic.id, start: s.start, end: s.end}) + } + hits = append(hits[:piiStart], append(mnemonicHits, hits[piiStart:]...)...) + } + return mergeHits(hits) } // collectHits runs every rule of the list over the text, in order, and tags each span with its rule. diff --git a/go/rules_keypairs.go b/go/rules_keypairs.go index af95f68..bdc7826 100644 --- a/go/rules_keypairs.go +++ b/go/rules_keypairs.go @@ -68,15 +68,65 @@ func (e *engine) newKeyPairs(b *builder, raw json.RawMessage) (scanner, error) { var backslashes = rangeSet(backslash, backslash) -// keyBefore is the key that stands before the separator at `at`: spaces, an optional (escaped) quote, then up -// to `keyMax` units of `keyChar`; ok is false when no key stands there. -func (k *keyPairs) keyBefore(units []uint16, at int) (key span, ok bool) { +// keyBefore finds the key before a separator, extending it only for an exact localized alias. +// An empty span means there is no key or that it is owned by the mnemonic rule. +func (k *keyPairs) keyBefore(units []uint16, at int) span { end := labelStart(units, at, k.gap, unbounded) + var quote uint16 + escaped := false if end > 0 && k.quote.has(units[end-1]) { + quote = units[end-1] + quoteAt := end - 1 end = labelStart(units, end-1, backslashes, unbounded) + escaped = end != quoteAt } start := labelStart(units, end, k.keyChar, k.keyMax) - return span{start, end}, start != end + keys := k.e.keys + form := keys.exactKeyForm(units[start:end]) + if keys.mnemonic[form] { + return span{} + } + if !escaped && keys.aliasesTails[form] { + if alias := k.localizedStart(units, span{start, end}, quote); alias >= 0 { + return span{alias, end} + } + } + if keys.localized[form] { + return span{} + } + return span{start, end} +} + +func (k *keyPairs) localizedStart(units []uint16, token span, quote uint16) int { + floor := max(0, token.end-k.keyMax) + keys := k.e.keys + if quote != 0 { + for i := token.end - 1; i >= max(0, floor-1); i-- { + switch units[i] { + case quote: + if keys.localized[keys.exactKeyForm(units[i+1:token.end])] { + return i + 1 + } + return -1 + case '\r', '\n', '\u2028', '\u2029': + return -1 + } + } + return -1 + } + start := -1 + for i := token.start; i >= floor; i-- { + if i > 0 { + before := units[i-1] + if k.keyChar.has(before) || before == '\'' || before == '’' { + continue + } + } + if keys.localized[keys.exactKeyForm(units[i:token.end])] { + start = i + } + } + return start } // isAuthorizationKey is true when the key, lower-cased without `-` and `_`, is a scheme key. @@ -143,8 +193,8 @@ func (k *keyPairs) scan(t *text) []span { } matchStart, valueStart := loc[0], loc[1] from = valueStart - key, hasKey := k.keyBefore(t.units, matchStart) - if !hasKey { + key := k.keyBefore(t.units, matchStart) + if key.start == key.end { continue } verdict := k.e.keys.keyVerdict(t.units[key.start:key.end]) diff --git a/go/rules_pairs.go b/go/rules_pairs.go index 110b097..ee84ac4 100644 --- a/go/rules_pairs.go +++ b/go/rules_pairs.go @@ -113,35 +113,6 @@ func (e *engine) newQuotedPairs(b *builder, raw json.RawMessage) (scanner, error return "edPairs{e: e, search: b.searcher(spec.Label), valueLimit: spec.ValueLimit}, b.err } -func backslashesBefore(units []uint16, at int, floor int) int { - run := 0 - for at-run-1 >= floor && units[at-run-1] == backslash { - run++ - } - return run -} - -func closesValue(layers int, run int) bool { - if layers == 0 { - return run%2 == 0 - } - return run == layers -} - -// closingQuote is the end of a value that opened at `from`, or -1 when no quote closes it. -func closingQuote(units []uint16, from int, quote uint16, layers int, limit int) int { - for i := from; i < limit; i++ { - if units[i] != quote { - continue - } - run := backslashesBefore(units, i, from) - if closesValue(layers, run) { - return i - run - } - } - return -1 -} - func (q *quotedPairs) scan(t *text) []span { var found []span for from := 0; ; { diff --git a/go/rules_regex.go b/go/rules_regex.go index bf0e73f..ce3a8e3 100644 --- a/go/rules_regex.go +++ b/go/rules_regex.go @@ -13,9 +13,12 @@ type filters struct { statusWords map[string]bool ignoreSuffixes [][]uint16 ignoreWords map[string]bool + ignoreLabels []string wordGap *unitSet ignoreBefore *unitSet ignoreAfter *unitSet + numericEdges string + ignoreDate bool check func(value []uint16) bool placeholders *placeholders } @@ -29,11 +32,14 @@ type filterSpec struct { IgnoreStatusWords bool `json:"ignoreStatusWords"` IgnoreSuffixes []string `json:"ignoreSuffixes"` IgnoreAfterWords []string `json:"ignoreAfterWords"` + IgnoreAfterLabels []string `json:"ignoreAfterLabels"` AfterGapClass string `json:"afterGapClass"` IgnoreBeforeClass string `json:"ignoreBeforeClass"` IgnoreAfterClass string `json:"ignoreAfterClass"` Check string `json:"check"` MinColons int `json:"minColons"` + NumericEdges string `json:"numericEdges"` + IgnoreDate bool `json:"ignoreDate"` } // optionalClass is the class of a field that may be absent: nil when it is. @@ -44,28 +50,47 @@ func (b *builder) optionalClass(template string) *unitSet { return b.class(template) } -// namedCheck is the check of a `regex` rule (SPEC 5.8); an unknown name stops the package at load time. +// namedCheck is the check of a `regex` rule (SPEC 5.8–5.9); unknown names stop the package at load time. func (b *builder) namedCheck(spec filterSpec) func(value []uint16) bool { switch spec.Check { case "": return nil case "ipv6": return func(value []uint16) bool { return isIpv6(unitsToString(value), spec.MinColons) } + case "ipv6-zone": + return func(value []uint16) bool { + for i, unit := range value { + if unit == '%' { + return isIpv6(unitsToString(value[:i]), spec.MinColons) + } + } + return false + } + case "otp-alphanumeric": + return digitSet.hasAnyIn + case "luhn": + return luhn } b.fail(errSpecRejected) return nil } func (e *engine) newFilters(b *builder, spec filterSpec) filters { + if spec.NumericEdges != "" && spec.NumericEdges != "run" && spec.NumericEdges != "code" { + b.fail(errSpecRejected) + } found := filters{ requireLiteral: decodeUTF8(spec.RequireLiteral), dropPlaceholder: spec.DropPlaceholder, ignoreEquals: asUnitLists(spec.IgnoreEquals), ignoreSuffixes: asUnitLists(spec.IgnoreSuffixes), ignoreWords: toSet(spec.IgnoreAfterWords), + ignoreLabels: spec.IgnoreAfterLabels, wordGap: b.optionalClass(spec.AfterGapClass), ignoreBefore: b.optionalClass(spec.IgnoreBeforeClass), ignoreAfter: b.optionalClass(spec.IgnoreAfterClass), + numericEdges: spec.NumericEdges, + ignoreDate: spec.IgnoreDate, check: b.namedCheck(spec), placeholders: e.placeholders, } @@ -89,10 +114,28 @@ func (f *filters) endsWithSuffix(value []uint16) bool { // isAfterIgnoredWord is true when the word before the whole match is one of the listed words (SPEC 4.1). func (f *filters) isAfterIgnoredWord(units []uint16, match span) bool { - if len(f.ignoreWords) == 0 { + if len(f.ignoreWords) > 0 && f.ignoreWords[wordBefore(units, match.start, f.wordGap)] { + return true + } + if len(f.ignoreLabels) == 0 { return false } - return f.ignoreWords[wordBefore(units, match.start, f.wordGap)] + end := match.start + for end > 0 && match.start-end < 64 { + switch units[end-1] { + case ' ', '\t', ':', '=', '#': + end-- + continue + } + break + } + for _, label := range f.ignoreLabels { + start := end - len(label) + if start >= 0 && (start == 0 || units[start-1] > 127 || !isWordByte(byte(units[start-1]))) && foldString(units[start:end]) == label { + return true + } + } + return false } // isPieceOfMore is true when the unit before the whole match is in `ignoreBeforeClass` or the unit after @@ -127,6 +170,12 @@ func (f *filters) passes(t *text, candidate span, match span) bool { if f.isAfterIgnoredWord(t.units, match) || f.isPieceOfMore(t.units, match) { return false } + if f.numericEdges != "" && numericFragment(t.units, candidate, f.numericEdges) { + return false + } + if f.ignoreDate && calendarDate(value, t.units[candidate.end:]) { + return false + } if f.check != nil && !f.check(value) { return false } @@ -160,6 +209,10 @@ func (e *engine) newRegexRule(b *builder, raw json.RawMessage) (scanner, error) group: spec.Group, filters: e.newFilters(b, spec.filterSpec), } + if b.err == nil && spec.Check == "ipv6-zone" { + // The check itself requires %. Skip colon-heavy inputs that have no zone delimiter. + rule.search.needs = []string{"%"} + } if spec.NotBefore != "" { rule.notBefore = b.class(spec.NotBefore) } diff --git a/go/spec.go b/go/spec.go index e50fe6a..f28d6bd 100644 --- a/go/spec.go +++ b/go/spec.go @@ -45,6 +45,8 @@ type rulesFile struct { type keysFile struct { SpecVersion int `json:"specVersion"` + LocalizedPasswords []string `json:"localizedPasswords"` + MnemonicKeys []string `json:"mnemonicKeys"` StructuralSkipKeys []string `json:"structuralSkipKeys"` SecretWords [][]string `json:"secretWords"` ExtraSequences [][]string `json:"extraSequences"` @@ -112,6 +114,11 @@ type algorithmsFile struct { UnicodeVersion string `json:"unicodeVersion"` Ranges string `json:"ranges"` } `json:"letters"` + IBANLengths map[string]int `json:"ibanLengths"` + Mnemonic struct { + Counts []int `json:"counts"` + Words []string `json:"words"` + } `json:"mnemonic"` } type specFileSet struct { diff --git a/go/spec/algorithms.json b/go/spec/algorithms.json index b1613ba..0e278a5 100644 --- a/go/spec/algorithms.json +++ b/go/spec/algorithms.json @@ -91,6 +91,230 @@ "maxDepth": 64, "maxNodes": 500000 }, + "ibanLengths": { + "AD": 24, "AE": 23, "AL": 28, "AT": 20, "AZ": 28, "BA": 20, "BE": 16, "BG": 22, + "BH": 22, "BI": 27, "BR": 29, "BY": 28, "CH": 21, "CR": 22, "CY": 28, "CZ": 24, + "DE": 22, "DJ": 27, "DK": 18, "DO": 28, "EE": 20, "EG": 29, "ES": 24, "FI": 18, + "FK": 18, "FO": 18, "FR": 27, "GB": 22, "GE": 22, "GI": 23, "GL": 18, "GR": 27, + "GT": 28, "HN": 28, "HR": 21, "HU": 28, "IE": 22, "IL": 23, "IQ": 23, "IS": 26, + "IT": 27, "JO": 30, "KW": 30, "KZ": 20, "LB": 28, "LC": 32, "LI": 21, "LT": 20, + "LU": 20, "LV": 21, "LY": 25, "MC": 27, "MD": 24, "ME": 22, "MK": 19, "MN": 20, + "MR": 27, "MT": 31, "MU": 30, "NI": 28, "NL": 18, "NO": 15, "OM": 23, "PK": 24, + "PL": 28, "PS": 29, "PT": 25, "QA": 29, "RO": 24, "RS": 22, "RU": 33, "SA": 24, + "SC": 31, "SD": 18, "SE": 24, "SI": 19, "SK": 24, "SM": 27, "SO": 23, "ST": 25, + "SV": 28, "TL": 23, "TN": 24, "TR": 26, "UA": 29, "VA": 22, "VG": 24, "XK": 20, + "YE": 30 + }, + "mnemonic": { + "counts": [12, 15, 18, 21, 24], + "words": [ + "abandon", "ability", "able", "about", "above", "absent", "absorb", "abstract", "absurd", "abuse", + "access", "accident", "account", "accuse", "achieve", "acid", "acoustic", "acquire", "across", "act", + "action", "actor", "actress", "actual", "adapt", "add", "addict", "address", "adjust", "admit", + "adult", "advance", "advice", "aerobic", "affair", "afford", "afraid", "again", "age", "agent", + "agree", "ahead", "aim", "air", "airport", "aisle", "alarm", "album", "alcohol", "alert", + "alien", "all", "alley", "allow", "almost", "alone", "alpha", "already", "also", "alter", + "always", "amateur", "amazing", "among", "amount", "amused", "analyst", "anchor", "ancient", "anger", + "angle", "angry", "animal", "ankle", "announce", "annual", "another", "answer", "antenna", "antique", + "anxiety", "any", "apart", "apology", "appear", "apple", "approve", "april", "arch", "arctic", + "area", "arena", "argue", "arm", "armed", "armor", "army", "around", "arrange", "arrest", + "arrive", "arrow", "art", "artefact", "artist", "artwork", "ask", "aspect", "assault", "asset", + "assist", "assume", "asthma", "athlete", "atom", "attack", "attend", "attitude", "attract", "auction", + "audit", "august", "aunt", "author", "auto", "autumn", "average", "avocado", "avoid", "awake", + "aware", "away", "awesome", "awful", "awkward", "axis", "baby", "bachelor", "bacon", "badge", + "bag", "balance", "balcony", "ball", "bamboo", "banana", "banner", "bar", "barely", "bargain", + "barrel", "base", "basic", "basket", "battle", "beach", "bean", "beauty", "because", "become", + "beef", "before", "begin", "behave", "behind", "believe", "below", "belt", "bench", "benefit", + "best", "betray", "better", "between", "beyond", "bicycle", "bid", "bike", "bind", "biology", + "bird", "birth", "bitter", "black", "blade", "blame", "blanket", "blast", "bleak", "bless", + "blind", "blood", "blossom", "blouse", "blue", "blur", "blush", "board", "boat", "body", + "boil", "bomb", "bone", "bonus", "book", "boost", "border", "boring", "borrow", "boss", + "bottom", "bounce", "box", "boy", "bracket", "brain", "brand", "brass", "brave", "bread", + "breeze", "brick", "bridge", "brief", "bright", "bring", "brisk", "broccoli", "broken", "bronze", + "broom", "brother", "brown", "brush", "bubble", "buddy", "budget", "buffalo", "build", "bulb", + "bulk", "bullet", "bundle", "bunker", "burden", "burger", "burst", "bus", "business", "busy", + "butter", "buyer", "buzz", "cabbage", "cabin", "cable", "cactus", "cage", "cake", "call", + "calm", "camera", "camp", "can", "canal", "cancel", "candy", "cannon", "canoe", "canvas", + "canyon", "capable", "capital", "captain", "car", "carbon", "card", "cargo", "carpet", "carry", + "cart", "case", "cash", "casino", "castle", "casual", "cat", "catalog", "catch", "category", + "cattle", "caught", "cause", "caution", "cave", "ceiling", "celery", "cement", "census", "century", + "cereal", "certain", "chair", "chalk", "champion", "change", "chaos", "chapter", "charge", "chase", + "chat", "cheap", "check", "cheese", "chef", "cherry", "chest", "chicken", "chief", "child", + "chimney", "choice", "choose", "chronic", "chuckle", "chunk", "churn", "cigar", "cinnamon", "circle", + "citizen", "city", "civil", "claim", "clap", "clarify", "claw", "clay", "clean", "clerk", + "clever", "click", "client", "cliff", "climb", "clinic", "clip", "clock", "clog", "close", + "cloth", "cloud", "clown", "club", "clump", "cluster", "clutch", "coach", "coast", "coconut", + "code", "coffee", "coil", "coin", "collect", "color", "column", "combine", "come", "comfort", + "comic", "common", "company", "concert", "conduct", "confirm", "congress", "connect", "consider", "control", + "convince", "cook", "cool", "copper", "copy", "coral", "core", "corn", "correct", "cost", + "cotton", "couch", "country", "couple", "course", "cousin", "cover", "coyote", "crack", "cradle", + "craft", "cram", "crane", "crash", "crater", "crawl", "crazy", "cream", "credit", "creek", + "crew", "cricket", "crime", "crisp", "critic", "crop", "cross", "crouch", "crowd", "crucial", + "cruel", "cruise", "crumble", "crunch", "crush", "cry", "crystal", "cube", "culture", "cup", + "cupboard", "curious", "current", "curtain", "curve", "cushion", "custom", "cute", "cycle", "dad", + "damage", "damp", "dance", "danger", "daring", "dash", "daughter", "dawn", "day", "deal", + "debate", "debris", "decade", "december", "decide", "decline", "decorate", "decrease", "deer", "defense", + "define", "defy", "degree", "delay", "deliver", "demand", "demise", "denial", "dentist", "deny", + "depart", "depend", "deposit", "depth", "deputy", "derive", "describe", "desert", "design", "desk", + "despair", "destroy", "detail", "detect", "develop", "device", "devote", "diagram", "dial", "diamond", + "diary", "dice", "diesel", "diet", "differ", "digital", "dignity", "dilemma", "dinner", "dinosaur", + "direct", "dirt", "disagree", "discover", "disease", "dish", "dismiss", "disorder", "display", "distance", + "divert", "divide", "divorce", "dizzy", "doctor", "document", "dog", "doll", "dolphin", "domain", + "donate", "donkey", "donor", "door", "dose", "double", "dove", "draft", "dragon", "drama", + "drastic", "draw", "dream", "dress", "drift", "drill", "drink", "drip", "drive", "drop", + "drum", "dry", "duck", "dumb", "dune", "during", "dust", "dutch", "duty", "dwarf", + "dynamic", "eager", "eagle", "early", "earn", "earth", "easily", "east", "easy", "echo", + "ecology", "economy", "edge", "edit", "educate", "effort", "egg", "eight", "either", "elbow", + "elder", "electric", "elegant", "element", "elephant", "elevator", "elite", "else", "embark", "embody", + "embrace", "emerge", "emotion", "employ", "empower", "empty", "enable", "enact", "end", "endless", + "endorse", "enemy", "energy", "enforce", "engage", "engine", "enhance", "enjoy", "enlist", "enough", + "enrich", "enroll", "ensure", "enter", "entire", "entry", "envelope", "episode", "equal", "equip", + "era", "erase", "erode", "erosion", "error", "erupt", "escape", "essay", "essence", "estate", + "eternal", "ethics", "evidence", "evil", "evoke", "evolve", "exact", "example", "excess", "exchange", + "excite", "exclude", "excuse", "execute", "exercise", "exhaust", "exhibit", "exile", "exist", "exit", + "exotic", "expand", "expect", "expire", "explain", "expose", "express", "extend", "extra", "eye", + "eyebrow", "fabric", "face", "faculty", "fade", "faint", "faith", "fall", "false", "fame", + "family", "famous", "fan", "fancy", "fantasy", "farm", "fashion", "fat", "fatal", "father", + "fatigue", "fault", "favorite", "feature", "february", "federal", "fee", "feed", "feel", "female", + "fence", "festival", "fetch", "fever", "few", "fiber", "fiction", "field", "figure", "file", + "film", "filter", "final", "find", "fine", "finger", "finish", "fire", "firm", "first", + "fiscal", "fish", "fit", "fitness", "fix", "flag", "flame", "flash", "flat", "flavor", + "flee", "flight", "flip", "float", "flock", "floor", "flower", "fluid", "flush", "fly", + "foam", "focus", "fog", "foil", "fold", "follow", "food", "foot", "force", "forest", + "forget", "fork", "fortune", "forum", "forward", "fossil", "foster", "found", "fox", "fragile", + "frame", "frequent", "fresh", "friend", "fringe", "frog", "front", "frost", "frown", "frozen", + "fruit", "fuel", "fun", "funny", "furnace", "fury", "future", "gadget", "gain", "galaxy", + "gallery", "game", "gap", "garage", "garbage", "garden", "garlic", "garment", "gas", "gasp", + "gate", "gather", "gauge", "gaze", "general", "genius", "genre", "gentle", "genuine", "gesture", + "ghost", "giant", "gift", "giggle", "ginger", "giraffe", "girl", "give", "glad", "glance", + "glare", "glass", "glide", "glimpse", "globe", "gloom", "glory", "glove", "glow", "glue", + "goat", "goddess", "gold", "good", "goose", "gorilla", "gospel", "gossip", "govern", "gown", + "grab", "grace", "grain", "grant", "grape", "grass", "gravity", "great", "green", "grid", + "grief", "grit", "grocery", "group", "grow", "grunt", "guard", "guess", "guide", "guilt", + "guitar", "gun", "gym", "habit", "hair", "half", "hammer", "hamster", "hand", "happy", + "harbor", "hard", "harsh", "harvest", "hat", "have", "hawk", "hazard", "head", "health", + "heart", "heavy", "hedgehog", "height", "hello", "helmet", "help", "hen", "hero", "hidden", + "high", "hill", "hint", "hip", "hire", "history", "hobby", "hockey", "hold", "hole", + "holiday", "hollow", "home", "honey", "hood", "hope", "horn", "horror", "horse", "hospital", + "host", "hotel", "hour", "hover", "hub", "huge", "human", "humble", "humor", "hundred", + "hungry", "hunt", "hurdle", "hurry", "hurt", "husband", "hybrid", "ice", "icon", "idea", + "identify", "idle", "ignore", "ill", "illegal", "illness", "image", "imitate", "immense", "immune", + "impact", "impose", "improve", "impulse", "inch", "include", "income", "increase", "index", "indicate", + "indoor", "industry", "infant", "inflict", "inform", "inhale", "inherit", "initial", "inject", "injury", + "inmate", "inner", "innocent", "input", "inquiry", "insane", "insect", "inside", "inspire", "install", + "intact", "interest", "into", "invest", "invite", "involve", "iron", "island", "isolate", "issue", + "item", "ivory", "jacket", "jaguar", "jar", "jazz", "jealous", "jeans", "jelly", "jewel", + "job", "join", "joke", "journey", "joy", "judge", "juice", "jump", "jungle", "junior", + "junk", "just", "kangaroo", "keen", "keep", "ketchup", "key", "kick", "kid", "kidney", + "kind", "kingdom", "kiss", "kit", "kitchen", "kite", "kitten", "kiwi", "knee", "knife", + "knock", "know", "lab", "label", "labor", "ladder", "lady", "lake", "lamp", "language", + "laptop", "large", "later", "latin", "laugh", "laundry", "lava", "law", "lawn", "lawsuit", + "layer", "lazy", "leader", "leaf", "learn", "leave", "lecture", "left", "leg", "legal", + "legend", "leisure", "lemon", "lend", "length", "lens", "leopard", "lesson", "letter", "level", + "liar", "liberty", "library", "license", "life", "lift", "light", "like", "limb", "limit", + "link", "lion", "liquid", "list", "little", "live", "lizard", "load", "loan", "lobster", + "local", "lock", "logic", "lonely", "long", "loop", "lottery", "loud", "lounge", "love", + "loyal", "lucky", "luggage", "lumber", "lunar", "lunch", "luxury", "lyrics", "machine", "mad", + "magic", "magnet", "maid", "mail", "main", "major", "make", "mammal", "man", "manage", + "mandate", "mango", "mansion", "manual", "maple", "marble", "march", "margin", "marine", "market", + "marriage", "mask", "mass", "master", "match", "material", "math", "matrix", "matter", "maximum", + "maze", "meadow", "mean", "measure", "meat", "mechanic", "medal", "media", "melody", "melt", + "member", "memory", "mention", "menu", "mercy", "merge", "merit", "merry", "mesh", "message", + "metal", "method", "middle", "midnight", "milk", "million", "mimic", "mind", "minimum", "minor", + "minute", "miracle", "mirror", "misery", "miss", "mistake", "mix", "mixed", "mixture", "mobile", + "model", "modify", "mom", "moment", "monitor", "monkey", "monster", "month", "moon", "moral", + "more", "morning", "mosquito", "mother", "motion", "motor", "mountain", "mouse", "move", "movie", + "much", "muffin", "mule", "multiply", "muscle", "museum", "mushroom", "music", "must", "mutual", + "myself", "mystery", "myth", "naive", "name", "napkin", "narrow", "nasty", "nation", "nature", + "near", "neck", "need", "negative", "neglect", "neither", "nephew", "nerve", "nest", "net", + "network", "neutral", "never", "news", "next", "nice", "night", "noble", "noise", "nominee", + "noodle", "normal", "north", "nose", "notable", "note", "nothing", "notice", "novel", "now", + "nuclear", "number", "nurse", "nut", "oak", "obey", "object", "oblige", "obscure", "observe", + "obtain", "obvious", "occur", "ocean", "october", "odor", "off", "offer", "office", "often", + "oil", "okay", "old", "olive", "olympic", "omit", "once", "one", "onion", "online", + "only", "open", "opera", "opinion", "oppose", "option", "orange", "orbit", "orchard", "order", + "ordinary", "organ", "orient", "original", "orphan", "ostrich", "other", "outdoor", "outer", "output", + "outside", "oval", "oven", "over", "own", "owner", "oxygen", "oyster", "ozone", "pact", + "paddle", "page", "pair", "palace", "palm", "panda", "panel", "panic", "panther", "paper", + "parade", "parent", "park", "parrot", "party", "pass", "patch", "path", "patient", "patrol", + "pattern", "pause", "pave", "payment", "peace", "peanut", "pear", "peasant", "pelican", "pen", + "penalty", "pencil", "people", "pepper", "perfect", "permit", "person", "pet", "phone", "photo", + "phrase", "physical", "piano", "picnic", "picture", "piece", "pig", "pigeon", "pill", "pilot", + "pink", "pioneer", "pipe", "pistol", "pitch", "pizza", "place", "planet", "plastic", "plate", + "play", "please", "pledge", "pluck", "plug", "plunge", "poem", "poet", "point", "polar", + "pole", "police", "pond", "pony", "pool", "popular", "portion", "position", "possible", "post", + "potato", "pottery", "poverty", "powder", "power", "practice", "praise", "predict", "prefer", "prepare", + "present", "pretty", "prevent", "price", "pride", "primary", "print", "priority", "prison", "private", + "prize", "problem", "process", "produce", "profit", "program", "project", "promote", "proof", "property", + "prosper", "protect", "proud", "provide", "public", "pudding", "pull", "pulp", "pulse", "pumpkin", + "punch", "pupil", "puppy", "purchase", "purity", "purpose", "purse", "push", "put", "puzzle", + "pyramid", "quality", "quantum", "quarter", "question", "quick", "quit", "quiz", "quote", "rabbit", + "raccoon", "race", "rack", "radar", "radio", "rail", "rain", "raise", "rally", "ramp", + "ranch", "random", "range", "rapid", "rare", "rate", "rather", "raven", "raw", "razor", + "ready", "real", "reason", "rebel", "rebuild", "recall", "receive", "recipe", "record", "recycle", + "reduce", "reflect", "reform", "refuse", "region", "regret", "regular", "reject", "relax", "release", + "relief", "rely", "remain", "remember", "remind", "remove", "render", "renew", "rent", "reopen", + "repair", "repeat", "replace", "report", "require", "rescue", "resemble", "resist", "resource", "response", + "result", "retire", "retreat", "return", "reunion", "reveal", "review", "reward", "rhythm", "rib", + "ribbon", "rice", "rich", "ride", "ridge", "rifle", "right", "rigid", "ring", "riot", + "ripple", "risk", "ritual", "rival", "river", "road", "roast", "robot", "robust", "rocket", + "romance", "roof", "rookie", "room", "rose", "rotate", "rough", "round", "route", "royal", + "rubber", "rude", "rug", "rule", "run", "runway", "rural", "sad", "saddle", "sadness", + "safe", "sail", "salad", "salmon", "salon", "salt", "salute", "same", "sample", "sand", + "satisfy", "satoshi", "sauce", "sausage", "save", "say", "scale", "scan", "scare", "scatter", + "scene", "scheme", "school", "science", "scissors", "scorpion", "scout", "scrap", "screen", "script", + "scrub", "sea", "search", "season", "seat", "second", "secret", "section", "security", "seed", + "seek", "segment", "select", "sell", "seminar", "senior", "sense", "sentence", "series", "service", + "session", "settle", "setup", "seven", "shadow", "shaft", "shallow", "share", "shed", "shell", + "sheriff", "shield", "shift", "shine", "ship", "shiver", "shock", "shoe", "shoot", "shop", + "short", "shoulder", "shove", "shrimp", "shrug", "shuffle", "shy", "sibling", "sick", "side", + "siege", "sight", "sign", "silent", "silk", "silly", "silver", "similar", "simple", "since", + "sing", "siren", "sister", "situate", "six", "size", "skate", "sketch", "ski", "skill", + "skin", "skirt", "skull", "slab", "slam", "sleep", "slender", "slice", "slide", "slight", + "slim", "slogan", "slot", "slow", "slush", "small", "smart", "smile", "smoke", "smooth", + "snack", "snake", "snap", "sniff", "snow", "soap", "soccer", "social", "sock", "soda", + "soft", "solar", "soldier", "solid", "solution", "solve", "someone", "song", "soon", "sorry", + "sort", "soul", "sound", "soup", "source", "south", "space", "spare", "spatial", "spawn", + "speak", "special", "speed", "spell", "spend", "sphere", "spice", "spider", "spike", "spin", + "spirit", "split", "spoil", "sponsor", "spoon", "sport", "spot", "spray", "spread", "spring", + "spy", "square", "squeeze", "squirrel", "stable", "stadium", "staff", "stage", "stairs", "stamp", + "stand", "start", "state", "stay", "steak", "steel", "stem", "step", "stereo", "stick", + "still", "sting", "stock", "stomach", "stone", "stool", "story", "stove", "strategy", "street", + "strike", "strong", "struggle", "student", "stuff", "stumble", "style", "subject", "submit", "subway", + "success", "such", "sudden", "suffer", "sugar", "suggest", "suit", "summer", "sun", "sunny", + "sunset", "super", "supply", "supreme", "sure", "surface", "surge", "surprise", "surround", "survey", + "suspect", "sustain", "swallow", "swamp", "swap", "swarm", "swear", "sweet", "swift", "swim", + "swing", "switch", "sword", "symbol", "symptom", "syrup", "system", "table", "tackle", "tag", + "tail", "talent", "talk", "tank", "tape", "target", "task", "taste", "tattoo", "taxi", + "teach", "team", "tell", "ten", "tenant", "tennis", "tent", "term", "test", "text", + "thank", "that", "theme", "then", "theory", "there", "they", "thing", "this", "thought", + "three", "thrive", "throw", "thumb", "thunder", "ticket", "tide", "tiger", "tilt", "timber", + "time", "tiny", "tip", "tired", "tissue", "title", "toast", "tobacco", "today", "toddler", + "toe", "together", "toilet", "token", "tomato", "tomorrow", "tone", "tongue", "tonight", "tool", + "tooth", "top", "topic", "topple", "torch", "tornado", "tortoise", "toss", "total", "tourist", + "toward", "tower", "town", "toy", "track", "trade", "traffic", "tragic", "train", "transfer", + "trap", "trash", "travel", "tray", "treat", "tree", "trend", "trial", "tribe", "trick", + "trigger", "trim", "trip", "trophy", "trouble", "truck", "true", "truly", "trumpet", "trust", + "truth", "try", "tube", "tuition", "tumble", "tuna", "tunnel", "turkey", "turn", "turtle", + "twelve", "twenty", "twice", "twin", "twist", "two", "type", "typical", "ugly", "umbrella", + "unable", "unaware", "uncle", "uncover", "under", "undo", "unfair", "unfold", "unhappy", "uniform", + "unique", "unit", "universe", "unknown", "unlock", "until", "unusual", "unveil", "update", "upgrade", + "uphold", "upon", "upper", "upset", "urban", "urge", "usage", "use", "used", "useful", + "useless", "usual", "utility", "vacant", "vacuum", "vague", "valid", "valley", "valve", "van", + "vanish", "vapor", "various", "vast", "vault", "vehicle", "velvet", "vendor", "venture", "venue", + "verb", "verify", "version", "very", "vessel", "veteran", "viable", "vibrant", "vicious", "victory", + "video", "view", "village", "vintage", "violin", "virtual", "virus", "visa", "visit", "visual", + "vital", "vivid", "vocal", "voice", "void", "volcano", "volume", "vote", "voyage", "wage", + "wagon", "wait", "walk", "wall", "walnut", "want", "warfare", "warm", "warrior", "wash", + "wasp", "waste", "water", "wave", "way", "wealth", "weapon", "wear", "weasel", "weather", + "web", "wedding", "weekend", "weird", "welcome", "west", "wet", "whale", "what", "wheat", + "wheel", "when", "where", "whip", "whisper", "wide", "width", "wife", "wild", "will", + "win", "window", "wine", "wing", "wink", "winner", "winter", "wire", "wisdom", "wise", + "wish", "witness", "wolf", "woman", "wonder", "wood", "wool", "word", "work", "world", + "worry", "worth", "wrap", "wreck", "wrestle", "wrist", "write", "wrong", "yard", "year", + "yellow", "you", "young", "youth", "zebra", "zero", "zone", "zoo" + ] + }, "letters": { "unicodeVersion": "15.0.0", "ranges": "41-5a,61-7a,aa,b5,ba,c0-d6,d8-f6,f8-2c1,2c6-2d1,2e0-2e4,2ec,2ee,370-374,376-377,37a-37d,37f,386,388-38a,38c,38e-3a1,3a3-3f5,3f7-481,48a-52f,531-556,559,560-588,5d0-5ea,5ef-5f2,620-64a,66e-66f,671-6d3,6d5,6e5-6e6,6ee-6ef,6fa-6fc,6ff,710,712-72f,74d-7a5,7b1,7ca-7ea,7f4-7f5,7fa,800-815,81a,824,828,840-858,860-86a,870-887,889-88e,8a0-8c9,904-939,93d,950,958-961,971-980,985-98c,98f-990,993-9a8,9aa-9b0,9b2,9b6-9b9,9bd,9ce,9dc-9dd,9df-9e1,9f0-9f1,9fc,a05-a0a,a0f-a10,a13-a28,a2a-a30,a32-a33,a35-a36,a38-a39,a59-a5c,a5e,a72-a74,a85-a8d,a8f-a91,a93-aa8,aaa-ab0,ab2-ab3,ab5-ab9,abd,ad0,ae0-ae1,af9,b05-b0c,b0f-b10,b13-b28,b2a-b30,b32-b33,b35-b39,b3d,b5c-b5d,b5f-b61,b71,b83,b85-b8a,b8e-b90,b92-b95,b99-b9a,b9c,b9e-b9f,ba3-ba4,ba8-baa,bae-bb9,bd0,c05-c0c,c0e-c10,c12-c28,c2a-c39,c3d,c58-c5a,c5d,c60-c61,c80,c85-c8c,c8e-c90,c92-ca8,caa-cb3,cb5-cb9,cbd,cdd-cde,ce0-ce1,cf1-cf2,d04-d0c,d0e-d10,d12-d3a,d3d,d4e,d54-d56,d5f-d61,d7a-d7f,d85-d96,d9a-db1,db3-dbb,dbd,dc0-dc6,e01-e30,e32-e33,e40-e46,e81-e82,e84,e86-e8a,e8c-ea3,ea5,ea7-eb0,eb2-eb3,ebd,ec0-ec4,ec6,edc-edf,f00,f40-f47,f49-f6c,f88-f8c,1000-102a,103f,1050-1055,105a-105d,1061,1065-1066,106e-1070,1075-1081,108e,10a0-10c5,10c7,10cd,10d0-10fa,10fc-1248,124a-124d,1250-1256,1258,125a-125d,1260-1288,128a-128d,1290-12b0,12b2-12b5,12b8-12be,12c0,12c2-12c5,12c8-12d6,12d8-1310,1312-1315,1318-135a,1380-138f,13a0-13f5,13f8-13fd,1401-166c,166f-167f,1681-169a,16a0-16ea,16f1-16f8,1700-1711,171f-1731,1740-1751,1760-176c,176e-1770,1780-17b3,17d7,17dc,1820-1878,1880-1884,1887-18a8,18aa,18b0-18f5,1900-191e,1950-196d,1970-1974,1980-19ab,19b0-19c9,1a00-1a16,1a20-1a54,1aa7,1b05-1b33,1b45-1b4c,1b83-1ba0,1bae-1baf,1bba-1be5,1c00-1c23,1c4d-1c4f,1c5a-1c7d,1c80-1c88,1c90-1cba,1cbd-1cbf,1ce9-1cec,1cee-1cf3,1cf5-1cf6,1cfa,1d00-1dbf,1e00-1f15,1f18-1f1d,1f20-1f45,1f48-1f4d,1f50-1f57,1f59,1f5b,1f5d,1f5f-1f7d,1f80-1fb4,1fb6-1fbc,1fbe,1fc2-1fc4,1fc6-1fcc,1fd0-1fd3,1fd6-1fdb,1fe0-1fec,1ff2-1ff4,1ff6-1ffc,2071,207f,2090-209c,2102,2107,210a-2113,2115,2119-211d,2124,2126,2128,212a-212d,212f-2139,213c-213f,2145-2149,214e,2183-2184,2c00-2ce4,2ceb-2cee,2cf2-2cf3,2d00-2d25,2d27,2d2d,2d30-2d67,2d6f,2d80-2d96,2da0-2da6,2da8-2dae,2db0-2db6,2db8-2dbe,2dc0-2dc6,2dc8-2dce,2dd0-2dd6,2dd8-2dde,2e2f,3005-3006,3031-3035,303b-303c,3041-3096,309d-309f,30a1-30fa,30fc-30ff,3105-312f,3131-318e,31a0-31bf,31f0-31ff,3400-4dbf,4e00-a48c,a4d0-a4fd,a500-a60c,a610-a61f,a62a-a62b,a640-a66e,a67f-a69d,a6a0-a6e5,a717-a71f,a722-a788,a78b-a7ca,a7d0-a7d1,a7d3,a7d5-a7d9,a7f2-a801,a803-a805,a807-a80a,a80c-a822,a840-a873,a882-a8b3,a8f2-a8f7,a8fb,a8fd-a8fe,a90a-a925,a930-a946,a960-a97c,a984-a9b2,a9cf,a9e0-a9e4,a9e6-a9ef,a9fa-a9fe,aa00-aa28,aa40-aa42,aa44-aa4b,aa60-aa76,aa7a,aa7e-aaaf,aab1,aab5-aab6,aab9-aabd,aac0,aac2,aadb-aadd,aae0-aaea,aaf2-aaf4,ab01-ab06,ab09-ab0e,ab11-ab16,ab20-ab26,ab28-ab2e,ab30-ab5a,ab5c-ab69,ab70-abe2,ac00-d7a3,d7b0-d7c6,d7cb-d7fb,f900-fa6d,fa70-fad9,fb00-fb06,fb13-fb17,fb1d,fb1f-fb28,fb2a-fb36,fb38-fb3c,fb3e,fb40-fb41,fb43-fb44,fb46-fbb1,fbd3-fd3d,fd50-fd8f,fd92-fdc7,fdf0-fdfb,fe70-fe74,fe76-fefc,ff21-ff3a,ff41-ff5a,ff66-ffbe,ffc2-ffc7,ffca-ffcf,ffd2-ffd7,ffda-ffdc,10000-1000b,1000d-10026,10028-1003a,1003c-1003d,1003f-1004d,10050-1005d,10080-100fa,10280-1029c,102a0-102d0,10300-1031f,1032d-10340,10342-10349,10350-10375,10380-1039d,103a0-103c3,103c8-103cf,10400-1049d,104b0-104d3,104d8-104fb,10500-10527,10530-10563,10570-1057a,1057c-1058a,1058c-10592,10594-10595,10597-105a1,105a3-105b1,105b3-105b9,105bb-105bc,10600-10736,10740-10755,10760-10767,10780-10785,10787-107b0,107b2-107ba,10800-10805,10808,1080a-10835,10837-10838,1083c,1083f-10855,10860-10876,10880-1089e,108e0-108f2,108f4-108f5,10900-10915,10920-10939,10980-109b7,109be-109bf,10a00,10a10-10a13,10a15-10a17,10a19-10a35,10a60-10a7c,10a80-10a9c,10ac0-10ac7,10ac9-10ae4,10b00-10b35,10b40-10b55,10b60-10b72,10b80-10b91,10c00-10c48,10c80-10cb2,10cc0-10cf2,10d00-10d23,10e80-10ea9,10eb0-10eb1,10f00-10f1c,10f27,10f30-10f45,10f70-10f81,10fb0-10fc4,10fe0-10ff6,11003-11037,11071-11072,11075,11083-110af,110d0-110e8,11103-11126,11144,11147,11150-11172,11176,11183-111b2,111c1-111c4,111da,111dc,11200-11211,11213-1122b,1123f-11240,11280-11286,11288,1128a-1128d,1128f-1129d,1129f-112a8,112b0-112de,11305-1130c,1130f-11310,11313-11328,1132a-11330,11332-11333,11335-11339,1133d,11350,1135d-11361,11400-11434,11447-1144a,1145f-11461,11480-114af,114c4-114c5,114c7,11580-115ae,115d8-115db,11600-1162f,11644,11680-116aa,116b8,11700-1171a,11740-11746,11800-1182b,118a0-118df,118ff-11906,11909,1190c-11913,11915-11916,11918-1192f,1193f,11941,119a0-119a7,119aa-119d0,119e1,119e3,11a00,11a0b-11a32,11a3a,11a50,11a5c-11a89,11a9d,11ab0-11af8,11c00-11c08,11c0a-11c2e,11c40,11c72-11c8f,11d00-11d06,11d08-11d09,11d0b-11d30,11d46,11d60-11d65,11d67-11d68,11d6a-11d89,11d98,11ee0-11ef2,11f02,11f04-11f10,11f12-11f33,11fb0,12000-12399,12480-12543,12f90-12ff0,13000-1342f,13441-13446,14400-14646,16800-16a38,16a40-16a5e,16a70-16abe,16ad0-16aed,16b00-16b2f,16b40-16b43,16b63-16b77,16b7d-16b8f,16e40-16e7f,16f00-16f4a,16f50,16f93-16f9f,16fe0-16fe1,16fe3,17000-187f7,18800-18cd5,18d00-18d08,1aff0-1aff3,1aff5-1affb,1affd-1affe,1b000-1b122,1b132,1b150-1b152,1b155,1b164-1b167,1b170-1b2fb,1bc00-1bc6a,1bc70-1bc7c,1bc80-1bc88,1bc90-1bc99,1d400-1d454,1d456-1d49c,1d49e-1d49f,1d4a2,1d4a5-1d4a6,1d4a9-1d4ac,1d4ae-1d4b9,1d4bb,1d4bd-1d4c3,1d4c5-1d505,1d507-1d50a,1d50d-1d514,1d516-1d51c,1d51e-1d539,1d53b-1d53e,1d540-1d544,1d546,1d54a-1d550,1d552-1d6a5,1d6a8-1d6c0,1d6c2-1d6da,1d6dc-1d6fa,1d6fc-1d714,1d716-1d734,1d736-1d74e,1d750-1d76e,1d770-1d788,1d78a-1d7a8,1d7aa-1d7c2,1d7c4-1d7cb,1df00-1df1e,1df25-1df2a,1e030-1e06d,1e100-1e12c,1e137-1e13d,1e14e,1e290-1e2ad,1e2c0-1e2eb,1e4d0-1e4eb,1e7e0-1e7e6,1e7e8-1e7eb,1e7ed-1e7ee,1e7f0-1e7fe,1e800-1e8c4,1e900-1e943,1e94b,1ee00-1ee03,1ee05-1ee1f,1ee21-1ee22,1ee24,1ee27,1ee29-1ee32,1ee34-1ee37,1ee39,1ee3b,1ee42,1ee47,1ee49,1ee4b,1ee4d-1ee4f,1ee51-1ee52,1ee54,1ee57,1ee59,1ee5b,1ee5d,1ee5f,1ee61-1ee62,1ee64,1ee67-1ee6a,1ee6c-1ee72,1ee74-1ee77,1ee79-1ee7c,1ee7e,1ee80-1ee89,1ee8b-1ee9b,1eea1-1eea3,1eea5-1eea9,1eeab-1eebb,20000-2a6df,2a700-2b739,2b740-2b81d,2b820-2cea1,2ceb0-2ebe0,2f800-2fa1d,30000-3134a,31350-323af" From 0ba389e63736c65480d63f8f81c22f41066aa312 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:14:40 +0100 Subject: [PATCH 03/30] fix(redaction): MCP gap rules, part 4 (DRO-4114) --- python/src/droidrun_redaction/_rules.py | 153 +++++++++--- python/src/droidrun_redaction/_runs.py | 11 + python/src/droidrun_redaction/_scan.py | 2 +- python/src/droidrun_redaction/_spec_hash.py | 2 +- python/src/droidrun_redaction/_walk.py | 2 +- .../droidrun_redaction/spec/algorithms.json | 224 ++++++++++++++++++ python/src/droidrun_redaction/spec/keys.json | 2 + python/src/droidrun_redaction/spec/rules.json | 43 +++- .../spec/vectors/key-names.json | 16 +- .../spec/vectors/keywords.json | 32 ++- .../droidrun_redaction/spec/vectors/pii.json | 58 ++++- python/tests/helpers.py | 5 +- 12 files changed, 510 insertions(+), 40 deletions(-) diff --git a/python/src/droidrun_redaction/_rules.py b/python/src/droidrun_redaction/_rules.py index 835996c..9b3f3bd 100644 --- a/python/src/droidrun_redaction/_rules.py +++ b/python/src/droidrun_redaction/_rules.py @@ -10,8 +10,15 @@ from ._evidence import has_value_evidence, is_doc_placeholder, is_trivial_value, trim from ._ipv6 import is_ipv6 -from ._keys import is_secret_key_name, key_verdict +from ._keys import ( + exact_key_form, + is_localized_password, + is_mnemonic_key, + is_secret_key_name, + key_verdict, +) from ._patterns import ( + CharTest, Range, char_test, compile_pattern, @@ -23,6 +30,7 @@ ) from ._placeholder import is_placeholder_value, placeholder_end_at from ._runs import ( + closing_quote, guarded_run_end, label_start, percent_decode, @@ -32,12 +40,17 @@ trim_query_value, word_before, ) -from ._spec import RULES, SpecError +from ._spec import KEYS, RULES, SpecError Scanner = Callable[[str], list[Range]] Filter = Callable[[str, Range, Range], bool] -_CHECKS = {"ipv6": is_ipv6} _STATUS_WORDS = frozenset(RULES["statusWords"]) +_ASCII_DIGIT = re.compile(r"[0-9]") +_ASCII_WORD = re.compile(r"[A-Za-z0-9_]") +_COMPACT_DATE = re.compile(r"(?:19|20)[0-9]{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12][0-9]|3[01])") +_DATE_YEAR = re.compile(r"(?:19|20)[0-9]{2}") +_DATE_TAIL = re.compile(r"(?:-(?:0[1-9]|1[0-2])-|/(?:0[1-9]|1[0-2])/|\.(?:0[1-9]|1[0-2])\.)(?:0[1-9]|[12][0-9]|3[01])") +_PASSWORD_TAILS = frozenset(re.split(r"[ '’]", key)[-1] for key in KEYS["localizedPasswords"]) def _group_span(match: re.Match[str], group: int) -> Range | None: @@ -46,15 +59,34 @@ def _group_span(match: re.Match[str], group: int) -> Range | None: return None if span[0] == -1 else span +def _passes_luhn(value: str) -> bool: + total = 0 + doubled = False + for unit in reversed(value): + if not "0" <= unit <= "9": + continue + digit = ord(unit) - 48 + term = 2 * digit if doubled else digit + total += term - 9 if term > 9 else term + doubled = not doubled + return total % 10 == 0 + + def _prepare_check(rule: dict[str, Any]) -> Callable[[str], bool]: - """The named check a `regex` rule asks for (SPEC 5.8); an unknown name stops the package at load.""" - if "check" not in rule: - return lambda value: True - check = _CHECKS.get(rule["check"]) + """The named check a `regex` rule asks for (SPEC 5.8–5.9); unknown names stop package load.""" + check = rule.get("check") if check is None: - raise SpecError("redaction spec holds an unknown check") + return lambda value: True min_colons = rule.get("minColons", 0) - return lambda value: check(value, min_colons) + if check == "ipv6": + return lambda value: is_ipv6(value, min_colons) + if check == "ipv6-zone": + return lambda value: is_ipv6(value.split("%", 1)[0], min_colons) + if check == "otp-alphanumeric": + return lambda value: _ASCII_DIGIT.search(value) is not None + if check == "luhn": + return _passes_luhn + raise SpecError("redaction spec holds an unknown check") def _prepare_ignored_suffix(rule: dict[str, Any]) -> Callable[[str], bool]: @@ -66,8 +98,25 @@ def _prepare_ignored_suffix(rule: dict[str, Any]) -> Callable[[str], bool]: def _prepare_ignored_context(rule: dict[str, Any]) -> Callable[[str, int], bool]: """True when the word before the match is one of the listed words (SPEC 4.1 `ignoreAfterWords`).""" words = frozenset(rule.get("ignoreAfterWords", ())) + labels = rule.get("ignoreAfterLabels", ()) is_gap = char_test(rule["afterGapClass"]) if "afterGapClass" in rule else lambda unit: False - return lambda text, match_start: len(words) > 0 and word_before(text, match_start, is_gap) in words + + def ignored(text: str, at: int) -> bool: + if words and word_before(text, at, is_gap) in words: + return True + if not labels: + return False + end = at + while end and at - end < 64 and text[end - 1] in " \t:=#": + end -= 1 + for label in labels: + start = end - len(label) + if start >= 0 and (not start or not _ASCII_WORD.fullmatch(text[start - 1])): + if fold_lower(text[start:end]) == label: + return True + return False + + return ignored def _prepare_edges(rule: dict[str, Any]) -> Callable[[str, int, int], bool]: @@ -84,6 +133,26 @@ def is_piece(text: str, match_start: int, match_end: int) -> bool: return is_piece +def _numeric_fragment(text: str, start: int, end: int, mode: str) -> bool: + before = text[start - 1] if start else "" + after = text[end : end + 1] + digit_before = start >= 2 and "0" <= text[start - 2] <= "9" + digit_after = end + 1 < len(text) and "0" <= text[end + 1] <= "9" + if mode == "run": + return before in ("+", ".", "-") or (before == " " and digit_before) or ( + after in (" ", ".", "-") and digit_after + ) + punctuation = ("-", ".", "/", ":") + return (before in punctuation and digit_before) or (after in punctuation and digit_after) + + +def _is_date(value: str, text: str, end: int) -> bool: + core = value[2:] if value.startswith(("G-", "g-")) else value + return _COMPACT_DATE.fullmatch(core) is not None or ( + _DATE_YEAR.fullmatch(core) is not None and _DATE_TAIL.match(text, end, end + 6) is not None + ) + + def _prepare_filter(rule: dict[str, Any]) -> Filter: """The filters of SPEC 4.1 step 3: `passes(text, candidate, whole match)`.""" has_class = contains_test(rule["requireClass"]) if "requireClass" in rule else None @@ -95,6 +164,8 @@ def _prepare_filter(rule: dict[str, Any]) -> Filter: has_ignored_context = _prepare_ignored_context(rule) is_piece = _prepare_edges(rule) passes_check = _prepare_check(rule) + numeric_edges = rule.get("numericEdges") + ignore_date = rule.get("ignoreDate") is True def passes(text: str, span: Range, whole: Range) -> bool: start, end = span @@ -109,6 +180,10 @@ def passes(text: str, span: Range, whole: Range) -> bool: return False if has_ignored_context(text, whole[0]) or is_piece(text, whole[0], whole[1]): return False + if numeric_edges is not None and _numeric_fragment(text, start, end, numeric_edges): + return False + if ignore_date and _is_date(value, text, end): + return False if not passes_check(value): return False return not (drops_placeholder and is_placeholder_value(text, start, end)) @@ -382,20 +457,6 @@ def scan(text: str) -> list[Range]: return scan -def _closing_quote(text: str, start: int, quote: str, layers: int, limit: int) -> tuple[int, int] | None: - """(position of the closing quote, run of backslashes before it) of a value that opened at `start`.""" - position = text.find(quote, start, limit) - while position != -1: - run = 0 - while position - run - 1 >= start and text[position - run - 1] == "\\": - run += 1 - closes = run % 2 == 0 if layers == 0 else run == layers - if closes: - return position, run - position = text.find(quote, position + 1, limit) - return None - - def prepare_quoted_pairs(rule: dict[str, Any]) -> Scanner: pattern = compile_pattern(rule["label"]) value_limit = rule["valueLimit"] @@ -407,7 +468,7 @@ def scan(text: str) -> list[Range]: start = match.end() layers = len(match.group(1)) limit = min(len(text), start + value_limit) - closing = _closing_quote(text, start, match.group(2), layers, limit) + closing = closing_quote(text, start, match.group(2), layers, limit) if closing is None: ranges.append((start, len(text))) break @@ -466,6 +527,30 @@ def _is_backslash(unit: str) -> bool: return unit == "\\" +def _localized_password_start( + text: str, start: int, end: int, quote: str, is_key: CharTest, key_max: int +) -> int | None: + """Find the longest exact local alias within a bounded lookback, without changing offsets.""" + if exact_key_form(text[start:end]) not in _PASSWORD_TAILS: + return None + floor = max(0, end - key_max) + if quote: + for at in range(end - 1, max(-1, floor - 2), -1): + unit = text[at] + if unit == quote: + return at + 1 if is_localized_password(text[at + 1 : end]) else None + if unit in "\r\n\u2028\u2029": + break + return None + alias_start = None + for at in range(start, floor - 1, -1): + if at and (is_key(text[at - 1]) or text[at - 1] in "'’"): + continue + if is_localized_password(text[at:end]): + alias_start = at + return alias_start + + def _prepare_key_before(rule: dict[str, Any]) -> Callable[[str, int], Range | None]: """The key that stands before the separator at `at`: spaces, an optional (escaped) quote, then up to `keyMax` units of `keyChar` (SPEC 4.18 step 1); None when no key stands there.""" @@ -477,10 +562,22 @@ def _prepare_key_before(rule: dict[str, Any]) -> Callable[[str, int], Range | No def key_before(text: str, at: int) -> Range | None: unbounded = len(text) end = label_start(text, at, is_gap, unbounded) - if end > 0 and is_quote(text[end - 1]): + quote = text[end - 1] if end > 0 and is_quote(text[end - 1]) else "" + escaped = False + if quote: + quote_at = end - 1 end = label_start(text, end - 1, _is_backslash, unbounded) + escaped = end != quote_at start = label_start(text, end, is_key, key_max) - return None if start == end else (start, end) + if start == end: + return None + localized = None if escaped else _localized_password_start(text, start, end, quote, is_key, key_max) + if localized is None: + key = text[start:end] + if is_mnemonic_key(key) or is_localized_password(key): + return None + return start, end + return localized, end return key_before @@ -499,7 +596,7 @@ def prepare_key_pairs(rule: dict[str, Any]) -> Scanner: def quoted_end(text: str, start: int, match: re.Match[str]) -> int | None: limit = min(len(text), start + value_limit) - closing = _closing_quote(text, start, match.group(2), len(match.group(1)), limit) + closing = closing_quote(text, start, match.group(2), len(match.group(1)), limit) return None if closing is None else closing[0] - closing[1] def query_end(text: str, next_amp: Callable[[int], int], label: int, value: Range) -> int: diff --git a/python/src/droidrun_redaction/_runs.py b/python/src/droidrun_redaction/_runs.py index 02b1ebb..fa8a476 100644 --- a/python/src/droidrun_redaction/_runs.py +++ b/python/src/droidrun_redaction/_runs.py @@ -119,3 +119,14 @@ def percent_decode(units: str) -> str: return units parts.append(tail) return "".join(parts) +def closing_quote(text: str, start: int, quote: str, layers: int, limit: int) -> tuple[int, int] | None: + """Position and preceding backslash count of the closing quote, if present.""" + position = text.find(quote, start, limit) + while position != -1: + run = 0 + while position - run - 1 >= start and text[position - run - 1] == "\\": + run += 1 + if (run % 2 == 0 if layers == 0 else run == layers): + return position, run + position = text.find(quote, position + 1, limit) + return None diff --git a/python/src/droidrun_redaction/_scan.py b/python/src/droidrun_redaction/_scan.py index ddf5117..4af33ba 100644 --- a/python/src/droidrun_redaction/_scan.py +++ b/python/src/droidrun_redaction/_scan.py @@ -95,7 +95,7 @@ def detect_full(units: str, options: Detect) -> list[Hit]: return [] cap = FULL_LIMITS["scanCap"] scanned = units if len(units) <= cap else units[:cap] - return merge_hits([*_window_hits(scanned), *detect(units, options)]) + return detect(units, options, _window_hits(scanned)) def _error_text() -> tuple[str, list[Hit]]: diff --git a/python/src/droidrun_redaction/_spec_hash.py b/python/src/droidrun_redaction/_spec_hash.py index 5253953..554262b 100644 --- a/python/src/droidrun_redaction/_spec_hash.py +++ b/python/src/droidrun_redaction/_spec_hash.py @@ -1,2 +1,2 @@ # Generated by tools/sync-spec.ts from spec/*.json: do not edit. -SPEC_HASH = "99806c43cc0ea49beccff2e5a79b76b7ef0ca959fa308c8a4e5c7f5a1ef15e1d" +SPEC_HASH = "91bc1cc4d6ea2af92a56aa7fab8c48eefac29847ad536bb715f22d3e7efea011" diff --git a/python/src/droidrun_redaction/_walk.py b/python/src/droidrun_redaction/_walk.py index f4a438e..cc2d931 100644 --- a/python/src/droidrun_redaction/_walk.py +++ b/python/src/droidrun_redaction/_walk.py @@ -372,4 +372,4 @@ def walk_json(value: Any, state: WalkState) -> Any: else: pending = (child, "none", top.depth + 1) continue - pending = (child, stronger_verdict(top.verdict, key_verdict(key)), top.depth + 1) + pending = (child, stronger_verdict(top.verdict, key_verdict(key, child)), top.depth + 1) diff --git a/python/src/droidrun_redaction/spec/algorithms.json b/python/src/droidrun_redaction/spec/algorithms.json index b1613ba..0e278a5 100644 --- a/python/src/droidrun_redaction/spec/algorithms.json +++ b/python/src/droidrun_redaction/spec/algorithms.json @@ -91,6 +91,230 @@ "maxDepth": 64, "maxNodes": 500000 }, + "ibanLengths": { + "AD": 24, "AE": 23, "AL": 28, "AT": 20, "AZ": 28, "BA": 20, "BE": 16, "BG": 22, + "BH": 22, "BI": 27, "BR": 29, "BY": 28, "CH": 21, "CR": 22, "CY": 28, "CZ": 24, + "DE": 22, "DJ": 27, "DK": 18, "DO": 28, "EE": 20, "EG": 29, "ES": 24, "FI": 18, + "FK": 18, "FO": 18, "FR": 27, "GB": 22, "GE": 22, "GI": 23, "GL": 18, "GR": 27, + "GT": 28, "HN": 28, "HR": 21, "HU": 28, "IE": 22, "IL": 23, "IQ": 23, "IS": 26, + "IT": 27, "JO": 30, "KW": 30, "KZ": 20, "LB": 28, "LC": 32, "LI": 21, "LT": 20, + "LU": 20, "LV": 21, "LY": 25, "MC": 27, "MD": 24, "ME": 22, "MK": 19, "MN": 20, + "MR": 27, "MT": 31, "MU": 30, "NI": 28, "NL": 18, "NO": 15, "OM": 23, "PK": 24, + "PL": 28, "PS": 29, "PT": 25, "QA": 29, "RO": 24, "RS": 22, "RU": 33, "SA": 24, + "SC": 31, "SD": 18, "SE": 24, "SI": 19, "SK": 24, "SM": 27, "SO": 23, "ST": 25, + "SV": 28, "TL": 23, "TN": 24, "TR": 26, "UA": 29, "VA": 22, "VG": 24, "XK": 20, + "YE": 30 + }, + "mnemonic": { + "counts": [12, 15, 18, 21, 24], + "words": [ + "abandon", "ability", "able", "about", "above", "absent", "absorb", "abstract", "absurd", "abuse", + "access", "accident", "account", "accuse", "achieve", "acid", "acoustic", "acquire", "across", "act", + "action", "actor", "actress", "actual", "adapt", "add", "addict", "address", "adjust", "admit", + "adult", "advance", "advice", "aerobic", "affair", "afford", "afraid", "again", "age", "agent", + "agree", "ahead", "aim", "air", "airport", "aisle", "alarm", "album", "alcohol", "alert", + "alien", "all", "alley", "allow", "almost", "alone", "alpha", "already", "also", "alter", + "always", "amateur", "amazing", "among", "amount", "amused", "analyst", "anchor", "ancient", "anger", + "angle", "angry", "animal", "ankle", "announce", "annual", "another", "answer", "antenna", "antique", + "anxiety", "any", "apart", "apology", "appear", "apple", "approve", "april", "arch", "arctic", + "area", "arena", "argue", "arm", "armed", "armor", "army", "around", "arrange", "arrest", + "arrive", "arrow", "art", "artefact", "artist", "artwork", "ask", "aspect", "assault", "asset", + "assist", "assume", "asthma", "athlete", "atom", "attack", "attend", "attitude", "attract", "auction", + "audit", "august", "aunt", "author", "auto", "autumn", "average", "avocado", "avoid", "awake", + "aware", "away", "awesome", "awful", "awkward", "axis", "baby", "bachelor", "bacon", "badge", + "bag", "balance", "balcony", "ball", "bamboo", "banana", "banner", "bar", "barely", "bargain", + "barrel", "base", "basic", "basket", "battle", "beach", "bean", "beauty", "because", "become", + "beef", "before", "begin", "behave", "behind", "believe", "below", "belt", "bench", "benefit", + "best", "betray", "better", "between", "beyond", "bicycle", "bid", "bike", "bind", "biology", + "bird", "birth", "bitter", "black", "blade", "blame", "blanket", "blast", "bleak", "bless", + "blind", "blood", "blossom", "blouse", "blue", "blur", "blush", "board", "boat", "body", + "boil", "bomb", "bone", "bonus", "book", "boost", "border", "boring", "borrow", "boss", + "bottom", "bounce", "box", "boy", "bracket", "brain", "brand", "brass", "brave", "bread", + "breeze", "brick", "bridge", "brief", "bright", "bring", "brisk", "broccoli", "broken", "bronze", + "broom", "brother", "brown", "brush", "bubble", "buddy", "budget", "buffalo", "build", "bulb", + "bulk", "bullet", "bundle", "bunker", "burden", "burger", "burst", "bus", "business", "busy", + "butter", "buyer", "buzz", "cabbage", "cabin", "cable", "cactus", "cage", "cake", "call", + "calm", "camera", "camp", "can", "canal", "cancel", "candy", "cannon", "canoe", "canvas", + "canyon", "capable", "capital", "captain", "car", "carbon", "card", "cargo", "carpet", "carry", + "cart", "case", "cash", "casino", "castle", "casual", "cat", "catalog", "catch", "category", + "cattle", "caught", "cause", "caution", "cave", "ceiling", "celery", "cement", "census", "century", + "cereal", "certain", "chair", "chalk", "champion", "change", "chaos", "chapter", "charge", "chase", + "chat", "cheap", "check", "cheese", "chef", "cherry", "chest", "chicken", "chief", "child", + "chimney", "choice", "choose", "chronic", "chuckle", "chunk", "churn", "cigar", "cinnamon", "circle", + "citizen", "city", "civil", "claim", "clap", "clarify", "claw", "clay", "clean", "clerk", + "clever", "click", "client", "cliff", "climb", "clinic", "clip", "clock", "clog", "close", + "cloth", "cloud", "clown", "club", "clump", "cluster", "clutch", "coach", "coast", "coconut", + "code", "coffee", "coil", "coin", "collect", "color", "column", "combine", "come", "comfort", + "comic", "common", "company", "concert", "conduct", "confirm", "congress", "connect", "consider", "control", + "convince", "cook", "cool", "copper", "copy", "coral", "core", "corn", "correct", "cost", + "cotton", "couch", "country", "couple", "course", "cousin", "cover", "coyote", "crack", "cradle", + "craft", "cram", "crane", "crash", "crater", "crawl", "crazy", "cream", "credit", "creek", + "crew", "cricket", "crime", "crisp", "critic", "crop", "cross", "crouch", "crowd", "crucial", + "cruel", "cruise", "crumble", "crunch", "crush", "cry", "crystal", "cube", "culture", "cup", + "cupboard", "curious", "current", "curtain", "curve", "cushion", "custom", "cute", "cycle", "dad", + "damage", "damp", "dance", "danger", "daring", "dash", "daughter", "dawn", "day", "deal", + "debate", "debris", "decade", "december", "decide", "decline", "decorate", "decrease", "deer", "defense", + "define", "defy", "degree", "delay", "deliver", "demand", "demise", "denial", "dentist", "deny", + "depart", "depend", "deposit", "depth", "deputy", "derive", "describe", "desert", "design", "desk", + "despair", "destroy", "detail", "detect", "develop", "device", "devote", "diagram", "dial", "diamond", + "diary", "dice", "diesel", "diet", "differ", "digital", "dignity", "dilemma", "dinner", "dinosaur", + "direct", "dirt", "disagree", "discover", "disease", "dish", "dismiss", "disorder", "display", "distance", + "divert", "divide", "divorce", "dizzy", "doctor", "document", "dog", "doll", "dolphin", "domain", + "donate", "donkey", "donor", "door", "dose", "double", "dove", "draft", "dragon", "drama", + "drastic", "draw", "dream", "dress", "drift", "drill", "drink", "drip", "drive", "drop", + "drum", "dry", "duck", "dumb", "dune", "during", "dust", "dutch", "duty", "dwarf", + "dynamic", "eager", "eagle", "early", "earn", "earth", "easily", "east", "easy", "echo", + "ecology", "economy", "edge", "edit", "educate", "effort", "egg", "eight", "either", "elbow", + "elder", "electric", "elegant", "element", "elephant", "elevator", "elite", "else", "embark", "embody", + "embrace", "emerge", "emotion", "employ", "empower", "empty", "enable", "enact", "end", "endless", + "endorse", "enemy", "energy", "enforce", "engage", "engine", "enhance", "enjoy", "enlist", "enough", + "enrich", "enroll", "ensure", "enter", "entire", "entry", "envelope", "episode", "equal", "equip", + "era", "erase", "erode", "erosion", "error", "erupt", "escape", "essay", "essence", "estate", + "eternal", "ethics", "evidence", "evil", "evoke", "evolve", "exact", "example", "excess", "exchange", + "excite", "exclude", "excuse", "execute", "exercise", "exhaust", "exhibit", "exile", "exist", "exit", + "exotic", "expand", "expect", "expire", "explain", "expose", "express", "extend", "extra", "eye", + "eyebrow", "fabric", "face", "faculty", "fade", "faint", "faith", "fall", "false", "fame", + "family", "famous", "fan", "fancy", "fantasy", "farm", "fashion", "fat", "fatal", "father", + "fatigue", "fault", "favorite", "feature", "february", "federal", "fee", "feed", "feel", "female", + "fence", "festival", "fetch", "fever", "few", "fiber", "fiction", "field", "figure", "file", + "film", "filter", "final", "find", "fine", "finger", "finish", "fire", "firm", "first", + "fiscal", "fish", "fit", "fitness", "fix", "flag", "flame", "flash", "flat", "flavor", + "flee", "flight", "flip", "float", "flock", "floor", "flower", "fluid", "flush", "fly", + "foam", "focus", "fog", "foil", "fold", "follow", "food", "foot", "force", "forest", + "forget", "fork", "fortune", "forum", "forward", "fossil", "foster", "found", "fox", "fragile", + "frame", "frequent", "fresh", "friend", "fringe", "frog", "front", "frost", "frown", "frozen", + "fruit", "fuel", "fun", "funny", "furnace", "fury", "future", "gadget", "gain", "galaxy", + "gallery", "game", "gap", "garage", "garbage", "garden", "garlic", "garment", "gas", "gasp", + "gate", "gather", "gauge", "gaze", "general", "genius", "genre", "gentle", "genuine", "gesture", + "ghost", "giant", "gift", "giggle", "ginger", "giraffe", "girl", "give", "glad", "glance", + "glare", "glass", "glide", "glimpse", "globe", "gloom", "glory", "glove", "glow", "glue", + "goat", "goddess", "gold", "good", "goose", "gorilla", "gospel", "gossip", "govern", "gown", + "grab", "grace", "grain", "grant", "grape", "grass", "gravity", "great", "green", "grid", + "grief", "grit", "grocery", "group", "grow", "grunt", "guard", "guess", "guide", "guilt", + "guitar", "gun", "gym", "habit", "hair", "half", "hammer", "hamster", "hand", "happy", + "harbor", "hard", "harsh", "harvest", "hat", "have", "hawk", "hazard", "head", "health", + "heart", "heavy", "hedgehog", "height", "hello", "helmet", "help", "hen", "hero", "hidden", + "high", "hill", "hint", "hip", "hire", "history", "hobby", "hockey", "hold", "hole", + "holiday", "hollow", "home", "honey", "hood", "hope", "horn", "horror", "horse", "hospital", + "host", "hotel", "hour", "hover", "hub", "huge", "human", "humble", "humor", "hundred", + "hungry", "hunt", "hurdle", "hurry", "hurt", "husband", "hybrid", "ice", "icon", "idea", + "identify", "idle", "ignore", "ill", "illegal", "illness", "image", "imitate", "immense", "immune", + "impact", "impose", "improve", "impulse", "inch", "include", "income", "increase", "index", "indicate", + "indoor", "industry", "infant", "inflict", "inform", "inhale", "inherit", "initial", "inject", "injury", + "inmate", "inner", "innocent", "input", "inquiry", "insane", "insect", "inside", "inspire", "install", + "intact", "interest", "into", "invest", "invite", "involve", "iron", "island", "isolate", "issue", + "item", "ivory", "jacket", "jaguar", "jar", "jazz", "jealous", "jeans", "jelly", "jewel", + "job", "join", "joke", "journey", "joy", "judge", "juice", "jump", "jungle", "junior", + "junk", "just", "kangaroo", "keen", "keep", "ketchup", "key", "kick", "kid", "kidney", + "kind", "kingdom", "kiss", "kit", "kitchen", "kite", "kitten", "kiwi", "knee", "knife", + "knock", "know", "lab", "label", "labor", "ladder", "lady", "lake", "lamp", "language", + "laptop", "large", "later", "latin", "laugh", "laundry", "lava", "law", "lawn", "lawsuit", + "layer", "lazy", "leader", "leaf", "learn", "leave", "lecture", "left", "leg", "legal", + "legend", "leisure", "lemon", "lend", "length", "lens", "leopard", "lesson", "letter", "level", + "liar", "liberty", "library", "license", "life", "lift", "light", "like", "limb", "limit", + "link", "lion", "liquid", "list", "little", "live", "lizard", "load", "loan", "lobster", + "local", "lock", "logic", "lonely", "long", "loop", "lottery", "loud", "lounge", "love", + "loyal", "lucky", "luggage", "lumber", "lunar", "lunch", "luxury", "lyrics", "machine", "mad", + "magic", "magnet", "maid", "mail", "main", "major", "make", "mammal", "man", "manage", + "mandate", "mango", "mansion", "manual", "maple", "marble", "march", "margin", "marine", "market", + "marriage", "mask", "mass", "master", "match", "material", "math", "matrix", "matter", "maximum", + "maze", "meadow", "mean", "measure", "meat", "mechanic", "medal", "media", "melody", "melt", + "member", "memory", "mention", "menu", "mercy", "merge", "merit", "merry", "mesh", "message", + "metal", "method", "middle", "midnight", "milk", "million", "mimic", "mind", "minimum", "minor", + "minute", "miracle", "mirror", "misery", "miss", "mistake", "mix", "mixed", "mixture", "mobile", + "model", "modify", "mom", "moment", "monitor", "monkey", "monster", "month", "moon", "moral", + "more", "morning", "mosquito", "mother", "motion", "motor", "mountain", "mouse", "move", "movie", + "much", "muffin", "mule", "multiply", "muscle", "museum", "mushroom", "music", "must", "mutual", + "myself", "mystery", "myth", "naive", "name", "napkin", "narrow", "nasty", "nation", "nature", + "near", "neck", "need", "negative", "neglect", "neither", "nephew", "nerve", "nest", "net", + "network", "neutral", "never", "news", "next", "nice", "night", "noble", "noise", "nominee", + "noodle", "normal", "north", "nose", "notable", "note", "nothing", "notice", "novel", "now", + "nuclear", "number", "nurse", "nut", "oak", "obey", "object", "oblige", "obscure", "observe", + "obtain", "obvious", "occur", "ocean", "october", "odor", "off", "offer", "office", "often", + "oil", "okay", "old", "olive", "olympic", "omit", "once", "one", "onion", "online", + "only", "open", "opera", "opinion", "oppose", "option", "orange", "orbit", "orchard", "order", + "ordinary", "organ", "orient", "original", "orphan", "ostrich", "other", "outdoor", "outer", "output", + "outside", "oval", "oven", "over", "own", "owner", "oxygen", "oyster", "ozone", "pact", + "paddle", "page", "pair", "palace", "palm", "panda", "panel", "panic", "panther", "paper", + "parade", "parent", "park", "parrot", "party", "pass", "patch", "path", "patient", "patrol", + "pattern", "pause", "pave", "payment", "peace", "peanut", "pear", "peasant", "pelican", "pen", + "penalty", "pencil", "people", "pepper", "perfect", "permit", "person", "pet", "phone", "photo", + "phrase", "physical", "piano", "picnic", "picture", "piece", "pig", "pigeon", "pill", "pilot", + "pink", "pioneer", "pipe", "pistol", "pitch", "pizza", "place", "planet", "plastic", "plate", + "play", "please", "pledge", "pluck", "plug", "plunge", "poem", "poet", "point", "polar", + "pole", "police", "pond", "pony", "pool", "popular", "portion", "position", "possible", "post", + "potato", "pottery", "poverty", "powder", "power", "practice", "praise", "predict", "prefer", "prepare", + "present", "pretty", "prevent", "price", "pride", "primary", "print", "priority", "prison", "private", + "prize", "problem", "process", "produce", "profit", "program", "project", "promote", "proof", "property", + "prosper", "protect", "proud", "provide", "public", "pudding", "pull", "pulp", "pulse", "pumpkin", + "punch", "pupil", "puppy", "purchase", "purity", "purpose", "purse", "push", "put", "puzzle", + "pyramid", "quality", "quantum", "quarter", "question", "quick", "quit", "quiz", "quote", "rabbit", + "raccoon", "race", "rack", "radar", "radio", "rail", "rain", "raise", "rally", "ramp", + "ranch", "random", "range", "rapid", "rare", "rate", "rather", "raven", "raw", "razor", + "ready", "real", "reason", "rebel", "rebuild", "recall", "receive", "recipe", "record", "recycle", + "reduce", "reflect", "reform", "refuse", "region", "regret", "regular", "reject", "relax", "release", + "relief", "rely", "remain", "remember", "remind", "remove", "render", "renew", "rent", "reopen", + "repair", "repeat", "replace", "report", "require", "rescue", "resemble", "resist", "resource", "response", + "result", "retire", "retreat", "return", "reunion", "reveal", "review", "reward", "rhythm", "rib", + "ribbon", "rice", "rich", "ride", "ridge", "rifle", "right", "rigid", "ring", "riot", + "ripple", "risk", "ritual", "rival", "river", "road", "roast", "robot", "robust", "rocket", + "romance", "roof", "rookie", "room", "rose", "rotate", "rough", "round", "route", "royal", + "rubber", "rude", "rug", "rule", "run", "runway", "rural", "sad", "saddle", "sadness", + "safe", "sail", "salad", "salmon", "salon", "salt", "salute", "same", "sample", "sand", + "satisfy", "satoshi", "sauce", "sausage", "save", "say", "scale", "scan", "scare", "scatter", + "scene", "scheme", "school", "science", "scissors", "scorpion", "scout", "scrap", "screen", "script", + "scrub", "sea", "search", "season", "seat", "second", "secret", "section", "security", "seed", + "seek", "segment", "select", "sell", "seminar", "senior", "sense", "sentence", "series", "service", + "session", "settle", "setup", "seven", "shadow", "shaft", "shallow", "share", "shed", "shell", + "sheriff", "shield", "shift", "shine", "ship", "shiver", "shock", "shoe", "shoot", "shop", + "short", "shoulder", "shove", "shrimp", "shrug", "shuffle", "shy", "sibling", "sick", "side", + "siege", "sight", "sign", "silent", "silk", "silly", "silver", "similar", "simple", "since", + "sing", "siren", "sister", "situate", "six", "size", "skate", "sketch", "ski", "skill", + "skin", "skirt", "skull", "slab", "slam", "sleep", "slender", "slice", "slide", "slight", + "slim", "slogan", "slot", "slow", "slush", "small", "smart", "smile", "smoke", "smooth", + "snack", "snake", "snap", "sniff", "snow", "soap", "soccer", "social", "sock", "soda", + "soft", "solar", "soldier", "solid", "solution", "solve", "someone", "song", "soon", "sorry", + "sort", "soul", "sound", "soup", "source", "south", "space", "spare", "spatial", "spawn", + "speak", "special", "speed", "spell", "spend", "sphere", "spice", "spider", "spike", "spin", + "spirit", "split", "spoil", "sponsor", "spoon", "sport", "spot", "spray", "spread", "spring", + "spy", "square", "squeeze", "squirrel", "stable", "stadium", "staff", "stage", "stairs", "stamp", + "stand", "start", "state", "stay", "steak", "steel", "stem", "step", "stereo", "stick", + "still", "sting", "stock", "stomach", "stone", "stool", "story", "stove", "strategy", "street", + "strike", "strong", "struggle", "student", "stuff", "stumble", "style", "subject", "submit", "subway", + "success", "such", "sudden", "suffer", "sugar", "suggest", "suit", "summer", "sun", "sunny", + "sunset", "super", "supply", "supreme", "sure", "surface", "surge", "surprise", "surround", "survey", + "suspect", "sustain", "swallow", "swamp", "swap", "swarm", "swear", "sweet", "swift", "swim", + "swing", "switch", "sword", "symbol", "symptom", "syrup", "system", "table", "tackle", "tag", + "tail", "talent", "talk", "tank", "tape", "target", "task", "taste", "tattoo", "taxi", + "teach", "team", "tell", "ten", "tenant", "tennis", "tent", "term", "test", "text", + "thank", "that", "theme", "then", "theory", "there", "they", "thing", "this", "thought", + "three", "thrive", "throw", "thumb", "thunder", "ticket", "tide", "tiger", "tilt", "timber", + "time", "tiny", "tip", "tired", "tissue", "title", "toast", "tobacco", "today", "toddler", + "toe", "together", "toilet", "token", "tomato", "tomorrow", "tone", "tongue", "tonight", "tool", + "tooth", "top", "topic", "topple", "torch", "tornado", "tortoise", "toss", "total", "tourist", + "toward", "tower", "town", "toy", "track", "trade", "traffic", "tragic", "train", "transfer", + "trap", "trash", "travel", "tray", "treat", "tree", "trend", "trial", "tribe", "trick", + "trigger", "trim", "trip", "trophy", "trouble", "truck", "true", "truly", "trumpet", "trust", + "truth", "try", "tube", "tuition", "tumble", "tuna", "tunnel", "turkey", "turn", "turtle", + "twelve", "twenty", "twice", "twin", "twist", "two", "type", "typical", "ugly", "umbrella", + "unable", "unaware", "uncle", "uncover", "under", "undo", "unfair", "unfold", "unhappy", "uniform", + "unique", "unit", "universe", "unknown", "unlock", "until", "unusual", "unveil", "update", "upgrade", + "uphold", "upon", "upper", "upset", "urban", "urge", "usage", "use", "used", "useful", + "useless", "usual", "utility", "vacant", "vacuum", "vague", "valid", "valley", "valve", "van", + "vanish", "vapor", "various", "vast", "vault", "vehicle", "velvet", "vendor", "venture", "venue", + "verb", "verify", "version", "very", "vessel", "veteran", "viable", "vibrant", "vicious", "victory", + "video", "view", "village", "vintage", "violin", "virtual", "virus", "visa", "visit", "visual", + "vital", "vivid", "vocal", "voice", "void", "volcano", "volume", "vote", "voyage", "wage", + "wagon", "wait", "walk", "wall", "walnut", "want", "warfare", "warm", "warrior", "wash", + "wasp", "waste", "water", "wave", "way", "wealth", "weapon", "wear", "weasel", "weather", + "web", "wedding", "weekend", "weird", "welcome", "west", "wet", "whale", "what", "wheat", + "wheel", "when", "where", "whip", "whisper", "wide", "width", "wife", "wild", "will", + "win", "window", "wine", "wing", "wink", "winner", "winter", "wire", "wisdom", "wise", + "wish", "witness", "wolf", "woman", "wonder", "wood", "wool", "word", "work", "world", + "worry", "worth", "wrap", "wreck", "wrestle", "wrist", "write", "wrong", "yard", "year", + "yellow", "you", "young", "youth", "zebra", "zero", "zone", "zoo" + ] + }, "letters": { "unicodeVersion": "15.0.0", "ranges": "41-5a,61-7a,aa,b5,ba,c0-d6,d8-f6,f8-2c1,2c6-2d1,2e0-2e4,2ec,2ee,370-374,376-377,37a-37d,37f,386,388-38a,38c,38e-3a1,3a3-3f5,3f7-481,48a-52f,531-556,559,560-588,5d0-5ea,5ef-5f2,620-64a,66e-66f,671-6d3,6d5,6e5-6e6,6ee-6ef,6fa-6fc,6ff,710,712-72f,74d-7a5,7b1,7ca-7ea,7f4-7f5,7fa,800-815,81a,824,828,840-858,860-86a,870-887,889-88e,8a0-8c9,904-939,93d,950,958-961,971-980,985-98c,98f-990,993-9a8,9aa-9b0,9b2,9b6-9b9,9bd,9ce,9dc-9dd,9df-9e1,9f0-9f1,9fc,a05-a0a,a0f-a10,a13-a28,a2a-a30,a32-a33,a35-a36,a38-a39,a59-a5c,a5e,a72-a74,a85-a8d,a8f-a91,a93-aa8,aaa-ab0,ab2-ab3,ab5-ab9,abd,ad0,ae0-ae1,af9,b05-b0c,b0f-b10,b13-b28,b2a-b30,b32-b33,b35-b39,b3d,b5c-b5d,b5f-b61,b71,b83,b85-b8a,b8e-b90,b92-b95,b99-b9a,b9c,b9e-b9f,ba3-ba4,ba8-baa,bae-bb9,bd0,c05-c0c,c0e-c10,c12-c28,c2a-c39,c3d,c58-c5a,c5d,c60-c61,c80,c85-c8c,c8e-c90,c92-ca8,caa-cb3,cb5-cb9,cbd,cdd-cde,ce0-ce1,cf1-cf2,d04-d0c,d0e-d10,d12-d3a,d3d,d4e,d54-d56,d5f-d61,d7a-d7f,d85-d96,d9a-db1,db3-dbb,dbd,dc0-dc6,e01-e30,e32-e33,e40-e46,e81-e82,e84,e86-e8a,e8c-ea3,ea5,ea7-eb0,eb2-eb3,ebd,ec0-ec4,ec6,edc-edf,f00,f40-f47,f49-f6c,f88-f8c,1000-102a,103f,1050-1055,105a-105d,1061,1065-1066,106e-1070,1075-1081,108e,10a0-10c5,10c7,10cd,10d0-10fa,10fc-1248,124a-124d,1250-1256,1258,125a-125d,1260-1288,128a-128d,1290-12b0,12b2-12b5,12b8-12be,12c0,12c2-12c5,12c8-12d6,12d8-1310,1312-1315,1318-135a,1380-138f,13a0-13f5,13f8-13fd,1401-166c,166f-167f,1681-169a,16a0-16ea,16f1-16f8,1700-1711,171f-1731,1740-1751,1760-176c,176e-1770,1780-17b3,17d7,17dc,1820-1878,1880-1884,1887-18a8,18aa,18b0-18f5,1900-191e,1950-196d,1970-1974,1980-19ab,19b0-19c9,1a00-1a16,1a20-1a54,1aa7,1b05-1b33,1b45-1b4c,1b83-1ba0,1bae-1baf,1bba-1be5,1c00-1c23,1c4d-1c4f,1c5a-1c7d,1c80-1c88,1c90-1cba,1cbd-1cbf,1ce9-1cec,1cee-1cf3,1cf5-1cf6,1cfa,1d00-1dbf,1e00-1f15,1f18-1f1d,1f20-1f45,1f48-1f4d,1f50-1f57,1f59,1f5b,1f5d,1f5f-1f7d,1f80-1fb4,1fb6-1fbc,1fbe,1fc2-1fc4,1fc6-1fcc,1fd0-1fd3,1fd6-1fdb,1fe0-1fec,1ff2-1ff4,1ff6-1ffc,2071,207f,2090-209c,2102,2107,210a-2113,2115,2119-211d,2124,2126,2128,212a-212d,212f-2139,213c-213f,2145-2149,214e,2183-2184,2c00-2ce4,2ceb-2cee,2cf2-2cf3,2d00-2d25,2d27,2d2d,2d30-2d67,2d6f,2d80-2d96,2da0-2da6,2da8-2dae,2db0-2db6,2db8-2dbe,2dc0-2dc6,2dc8-2dce,2dd0-2dd6,2dd8-2dde,2e2f,3005-3006,3031-3035,303b-303c,3041-3096,309d-309f,30a1-30fa,30fc-30ff,3105-312f,3131-318e,31a0-31bf,31f0-31ff,3400-4dbf,4e00-a48c,a4d0-a4fd,a500-a60c,a610-a61f,a62a-a62b,a640-a66e,a67f-a69d,a6a0-a6e5,a717-a71f,a722-a788,a78b-a7ca,a7d0-a7d1,a7d3,a7d5-a7d9,a7f2-a801,a803-a805,a807-a80a,a80c-a822,a840-a873,a882-a8b3,a8f2-a8f7,a8fb,a8fd-a8fe,a90a-a925,a930-a946,a960-a97c,a984-a9b2,a9cf,a9e0-a9e4,a9e6-a9ef,a9fa-a9fe,aa00-aa28,aa40-aa42,aa44-aa4b,aa60-aa76,aa7a,aa7e-aaaf,aab1,aab5-aab6,aab9-aabd,aac0,aac2,aadb-aadd,aae0-aaea,aaf2-aaf4,ab01-ab06,ab09-ab0e,ab11-ab16,ab20-ab26,ab28-ab2e,ab30-ab5a,ab5c-ab69,ab70-abe2,ac00-d7a3,d7b0-d7c6,d7cb-d7fb,f900-fa6d,fa70-fad9,fb00-fb06,fb13-fb17,fb1d,fb1f-fb28,fb2a-fb36,fb38-fb3c,fb3e,fb40-fb41,fb43-fb44,fb46-fbb1,fbd3-fd3d,fd50-fd8f,fd92-fdc7,fdf0-fdfb,fe70-fe74,fe76-fefc,ff21-ff3a,ff41-ff5a,ff66-ffbe,ffc2-ffc7,ffca-ffcf,ffd2-ffd7,ffda-ffdc,10000-1000b,1000d-10026,10028-1003a,1003c-1003d,1003f-1004d,10050-1005d,10080-100fa,10280-1029c,102a0-102d0,10300-1031f,1032d-10340,10342-10349,10350-10375,10380-1039d,103a0-103c3,103c8-103cf,10400-1049d,104b0-104d3,104d8-104fb,10500-10527,10530-10563,10570-1057a,1057c-1058a,1058c-10592,10594-10595,10597-105a1,105a3-105b1,105b3-105b9,105bb-105bc,10600-10736,10740-10755,10760-10767,10780-10785,10787-107b0,107b2-107ba,10800-10805,10808,1080a-10835,10837-10838,1083c,1083f-10855,10860-10876,10880-1089e,108e0-108f2,108f4-108f5,10900-10915,10920-10939,10980-109b7,109be-109bf,10a00,10a10-10a13,10a15-10a17,10a19-10a35,10a60-10a7c,10a80-10a9c,10ac0-10ac7,10ac9-10ae4,10b00-10b35,10b40-10b55,10b60-10b72,10b80-10b91,10c00-10c48,10c80-10cb2,10cc0-10cf2,10d00-10d23,10e80-10ea9,10eb0-10eb1,10f00-10f1c,10f27,10f30-10f45,10f70-10f81,10fb0-10fc4,10fe0-10ff6,11003-11037,11071-11072,11075,11083-110af,110d0-110e8,11103-11126,11144,11147,11150-11172,11176,11183-111b2,111c1-111c4,111da,111dc,11200-11211,11213-1122b,1123f-11240,11280-11286,11288,1128a-1128d,1128f-1129d,1129f-112a8,112b0-112de,11305-1130c,1130f-11310,11313-11328,1132a-11330,11332-11333,11335-11339,1133d,11350,1135d-11361,11400-11434,11447-1144a,1145f-11461,11480-114af,114c4-114c5,114c7,11580-115ae,115d8-115db,11600-1162f,11644,11680-116aa,116b8,11700-1171a,11740-11746,11800-1182b,118a0-118df,118ff-11906,11909,1190c-11913,11915-11916,11918-1192f,1193f,11941,119a0-119a7,119aa-119d0,119e1,119e3,11a00,11a0b-11a32,11a3a,11a50,11a5c-11a89,11a9d,11ab0-11af8,11c00-11c08,11c0a-11c2e,11c40,11c72-11c8f,11d00-11d06,11d08-11d09,11d0b-11d30,11d46,11d60-11d65,11d67-11d68,11d6a-11d89,11d98,11ee0-11ef2,11f02,11f04-11f10,11f12-11f33,11fb0,12000-12399,12480-12543,12f90-12ff0,13000-1342f,13441-13446,14400-14646,16800-16a38,16a40-16a5e,16a70-16abe,16ad0-16aed,16b00-16b2f,16b40-16b43,16b63-16b77,16b7d-16b8f,16e40-16e7f,16f00-16f4a,16f50,16f93-16f9f,16fe0-16fe1,16fe3,17000-187f7,18800-18cd5,18d00-18d08,1aff0-1aff3,1aff5-1affb,1affd-1affe,1b000-1b122,1b132,1b150-1b152,1b155,1b164-1b167,1b170-1b2fb,1bc00-1bc6a,1bc70-1bc7c,1bc80-1bc88,1bc90-1bc99,1d400-1d454,1d456-1d49c,1d49e-1d49f,1d4a2,1d4a5-1d4a6,1d4a9-1d4ac,1d4ae-1d4b9,1d4bb,1d4bd-1d4c3,1d4c5-1d505,1d507-1d50a,1d50d-1d514,1d516-1d51c,1d51e-1d539,1d53b-1d53e,1d540-1d544,1d546,1d54a-1d550,1d552-1d6a5,1d6a8-1d6c0,1d6c2-1d6da,1d6dc-1d6fa,1d6fc-1d714,1d716-1d734,1d736-1d74e,1d750-1d76e,1d770-1d788,1d78a-1d7a8,1d7aa-1d7c2,1d7c4-1d7cb,1df00-1df1e,1df25-1df2a,1e030-1e06d,1e100-1e12c,1e137-1e13d,1e14e,1e290-1e2ad,1e2c0-1e2eb,1e4d0-1e4eb,1e7e0-1e7e6,1e7e8-1e7eb,1e7ed-1e7ee,1e7f0-1e7fe,1e800-1e8c4,1e900-1e943,1e94b,1ee00-1ee03,1ee05-1ee1f,1ee21-1ee22,1ee24,1ee27,1ee29-1ee32,1ee34-1ee37,1ee39,1ee3b,1ee42,1ee47,1ee49,1ee4b,1ee4d-1ee4f,1ee51-1ee52,1ee54,1ee57,1ee59,1ee5b,1ee5d,1ee5f,1ee61-1ee62,1ee64,1ee67-1ee6a,1ee6c-1ee72,1ee74-1ee77,1ee79-1ee7c,1ee7e,1ee80-1ee89,1ee8b-1ee9b,1eea1-1eea3,1eea5-1eea9,1eeab-1eebb,20000-2a6df,2a700-2b739,2b740-2b81d,2b820-2cea1,2ceb0-2ebe0,2f800-2fa1d,30000-3134a,31350-323af" diff --git a/python/src/droidrun_redaction/spec/keys.json b/python/src/droidrun_redaction/spec/keys.json index 55bffcc..5afe62c 100644 --- a/python/src/droidrun_redaction/spec/keys.json +++ b/python/src/droidrun_redaction/spec/keys.json @@ -1,6 +1,8 @@ { "specVersion": 1, "description": "Key-name word lists of the key-name matcher (SPEC.md section 6).", + "localizedPasswords": ["passwort", "kennwort", "contraseña", "mot de passe", "mdp", "senha", "parola d'ordine", "parola d’ordine", "пароль", "wachtwoord", "hasło", "şifre", "lösenord"], + "mnemonicKeys": ["mnemonic", "mnemonic phrase", "recovery phrase", "seed phrase"], "structuralSkipKeys": [ "type", "id" diff --git a/python/src/droidrun_redaction/spec/rules.json b/python/src/droidrun_redaction/spec/rules.json index 285d217..6d9d043 100644 --- a/python/src/droidrun_redaction/spec/rules.json +++ b/python/src/droidrun_redaction/spec/rules.json @@ -16,6 +16,19 @@ "DQ_UNIT": "(?:[^\"\\\\\r\n]|\\\\[^\r\n])", "SQ_UNIT": "(?:[^'\\\\\r\n]|\\\\[^\r\n])", "BARE_VALUE": "[^{{WS}},;\"'{}\\[\\]\\\\]+", + "MNEMONIC_KEY": {"join": " ", "words": [["mnemonic", "phrase"], ["recovery", "phrase"], ["seed", "phrase"], ["mnemonic"], ["seed"]]}, + "OTP_BRAND": {"join": "", "words": [["google"], ["instagram"], ["telegram"], ["uber"], ["whatsapp"]]}, + "OTP_YOUR": {"join": "", "words": [["your"]]}, + "OTP_SUFFIX_EN": {"join": " ", "words": [["is", "your"]]}, + "OTP_SUFFIX_DE": {"join": " ", "words": [["ist", "dein"], ["ist", "ihr"]]}, + "OTP_SUFFIX_FR": {"join": " ", "words": [["est", "votre"], ["est", "ton"]]}, + "OTP_SUFFIX_ES": {"join": " ", "words": [["es", "tu"], ["es", "su"]]}, + "OTP_USE": {"join": "", "words": [["use"]]}, + "OTP_SIGN_IN": {"join": " ", "words": [["to", "sign", "in"]]}, + "OTP_SPANISH": "[cC][óÓoO][dD][iI][gG][oO] [dD][eE] [vV][eE][rR][iI][fF][iI][cC][aA][cC][iI][óÓoO][nN]", + "OTP_SPANISH_JOIN": "[ \t:=]{1,3}(?:[eE][sS][ \t]{1,3})?", + "OTP_CODE_DIGITS": "(?:[0-9]{3}[ -][0-9]{3}|[0-9]{4,8})", + "OTP_OLD_MARKER": "\\[REDACTED(?::[^\\[\\]:{{WS}}]{1,128}(?::[^\\[\\]]{0,4})?)?\\]", "PHONE_EXT": "(?:[ \t]{1,4}(?:[eE][xX][tT]\\.?|[xX])[ \t]{0,4}[0-9]{1,8}\\b)?", "OCTET": "(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])", "OTP_JOIN": "[{{WS}}:=:]{0,3}(?:(?:{{OTP_IS}}|[为是は])[{{WS}}::]{0,3})?", @@ -435,7 +448,8 @@ "nestedLimit": 4096, "decodeBudget": 1000000, "dropPlaceholder": true - } + }, + {"id": "mnemonic", "kind": "mnemonic", "label": "(\"{{MNEMONIC_KEY}}\"|'{{MNEMONIC_KEY}}'|\\b{{MNEMONIC_KEY}})[ \t]*(?:=>|:=|[:=])[ \t]*([\"'])?", "pattern": "[A-Za-z0-9_]+", "lineEnd": "[\r\n\u2028\u2029]", "gapClass": "[ \t]", "ignoreBeforeClass": "[A-Za-z0-9_.\\-]"} ], "statusWords": ["expired", "required", "failed", "missing", "invalid", "true", "false", "null", "none"], "strict": [ @@ -486,7 +500,7 @@ "escapeStop": "[\\\\\"']", "identChar": "[A-Za-z0-9_%-]", "labelLookback": 64, - "keyChar": "[A-Za-z0-9_-]", + "keyChar": "[A-Za-z0-9_À-ÖØ-öø-ÿĀ-ž̀-ͯА-яЁёK-]", "keyMax": 64, "gapClass": "[{{WS}}]", "quoteChar": "[\"']", @@ -567,6 +581,11 @@ ".cpp" ] }, + {"id": "iban", "kind": "iban", "pattern": "\\b[A-Za-z]{2}[0-9]{2}"}, + {"id": "card", "kind": "regex", "pattern": "\\b[1-9](?:[ -]?[0-9]){12,18}\\b", "check": "luhn", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "ignoreAfterLabels": ["invoice number"], "afterGapClass": "[ \t:=#]"}, + {"id": "phone", "kind": "regex", "pattern": "\\b00[1-9](?:[ .-]?[0-9]){7,14}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, + {"id": "phone", "kind": "regex", "pattern": "\\b(?:0(?:30|40|69|89)|0(?:2[0-9]|3[3-9]|4[1-9]|5[0-9]|6[0-8]|7[0-9]|8[0-8]|9[0-9])[0-9]{1,2})[ -][1-9][0-9]{5,8}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, + {"id": "phone", "kind": "regex", "pattern": "\\b(?:015[0-9]|01[67][0-9])[ -][0-9]{7,8}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, { "id": "phone", "kind": "regex", @@ -622,10 +641,12 @@ "kind": "regex", "pattern": "\\b0[0-9][ .-][0-9]{2}[ .-][0-9]{2}[ .-][0-9]{2}[ .-][0-9]{2}\\b{{PHONE_EXT}}" }, + {"id": "ip", "kind": "regex", "pattern": "(?:\\b[0-9A-Fa-f]{1,4}:|::)[0-9A-Fa-f:]{0,38}%[A-Za-z0-9_~-](?:[A-Za-z0-9_~.-]{0,62}[A-Za-z0-9_~-])?", "check": "ipv6-zone", "minColons": 2, "ignoreBeforeClass": "[0-9A-Za-z_:%]", "ignoreAfterClass": "[0-9A-Za-z_~%-]"}, { "id": "ip", "kind": "regex", "pattern": "\\b{{OCTET}}\\.{{OCTET}}\\.{{OCTET}}\\.{{OCTET}}\\b", + "ignoreEquals": ["0.0.0.0"], "ignoreAfterWords": [ "v", "version", @@ -668,12 +689,14 @@ { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}){{OTP_JOIN}}([0-9]{4,8})\\b", "group": 1 }, { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "(?:\\b(?:{{OTP_NOUN}}|2[fF][aA])|{{OTP_NOUN_CJK}}){{OTP_JOIN_PLUS}}([0-9]{3}[ -][0-9]{3})\\b", "group": 1, "ignoreAfterClass": "[-0-9]" @@ -681,6 +704,7 @@ { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "(?:(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}){{OTP_WAS}}|\\b2[fF][aA]{{OTP_JOIN_PLUS}})([0-9]{4,8})\\b", "group": 1, "ignoreAfterClass": "[-0-9]" @@ -688,8 +712,10 @@ { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}{{OTP_JOIN_PLUS}}([0-9]{6,8})\\b", "group": 1, + "ignoreAfterLabels": ["http error"], "ignoreAfterWords": [ "error", "exit", @@ -698,10 +724,19 @@ "postal", "zip", "area", - "country" + "country", + "invoice", + "order" ], "afterGapClass": "[{{WS}}]" - } + }, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_YOUR}} {{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b(?:{{OTP_YOUR}} )?{{OTP_BRAND}} {{OTP_BARE}}{{OTP_JOIN_PLUS}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}([A-Z0-9]{4,8})\\b", "group": 1, "requireClass": "[A-Z]", "numericEdges": "code", "ignoreAfterWords": ["error", "exit", "status", "response", "postal", "zip", "area", "country", "order", "invoice", "see", "source", "product"], "ignoreAfterLabels": ["http error"], "afterGapClass": "[{{WS}}]", "check": "otp-alphanumeric"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_SPANISH}}{{OTP_SPANISH_JOIN}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}|\\b{{OTP_SPANISH}}){{OTP_JOIN_PLUS}}{{OTP_OLD_MARKER}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b((?:[gG]-)?{{OTP_CODE_DIGITS}}) (?:{{OTP_SUFFIX_EN}} (?:(?:{{OTP_BRAND}} )?{{OTP_NOUN}}|{{OTP_BRAND}} {{OTP_BARE}})|{{OTP_SUFFIX_DE}} {{OTP_NOUN}}|{{OTP_SUFFIX_FR}} {{OTP_NOUN}}|{{OTP_SUFFIX_ES}} {{OTP_SPANISH}})\\b", "group": 1, "numericEdges": "code", "ignoreBeforeClass": "[-.]"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_USE}} ({{OTP_CODE_DIGITS}}) {{OTP_SIGN_IN}}\\b", "group": 1, "numericEdges": "code"} ], "full": [ { diff --git a/python/src/droidrun_redaction/spec/vectors/key-names.json b/python/src/droidrun_redaction/spec/vectors/key-names.json index 1b8b91b..1a1d011 100644 --- a/python/src/droidrun_redaction/spec/vectors/key-names.json +++ b/python/src/droidrun_redaction/spec/vectors/key-names.json @@ -459,6 +459,20 @@ "expected": { "Bearer [REDACTED:auth-header]": 1 } - } + }, + {"name": "MCP gap: German password label", "input": "Passwort=geheim123", "mode": "strict", "expected": "Passwort=[REDACTED:generic-keyword]"}, + {"name": "MCP gap: German password in raw JSON", "input": "{\"passwort\":\"geheim123\"}", "mode": "strict", "expected": "{\"passwort\":\"[REDACTED:generic-keyword]\"}"}, + {"name": "MCP gap: German alternative label", "input": "Kennwort: geheim123", "mode": "strict", "expected": "Kennwort: [REDACTED:generic-keyword]"}, + {"name": "MCP gap: Spanish label", "input": "contraseña: geheim123", "mode": "strict", "expected": "contraseña: [REDACTED:generic-keyword]"}, + {"name": "MCP gap: canonical Unicode aliases", "input": {"CONTRASEÑA": "a", "mot de passe": "b", "senha": "c", "PAROLA D’ORDINE": "d", "ПАРОЛЬ": "e", "PasswortPolicy": "keep", "passwort_hint": "keep"}, "mode": "strict", "expected": {"CONTRASEÑA": "[REDACTED:key-context]", "mot de passe": "[REDACTED:key-context]", "senha": "[REDACTED:key-context]", "PAROLA D’ORDINE": "[REDACTED:key-context]", "ПАРОЛЬ": "[REDACTED:key-context]", "PasswortPolicy": "keep", "passwort_hint": "keep"}}, + {"name": "MCP gap: Turkish dotted capital I", "input": "ŞİFRE=geheim123", "mode": "strict", "expected": "ŞİFRE=[REDACTED:generic-keyword]"}, + {"name": "MCP gap: localized parsed key in default mode", "input": {"MOT DE PASSE": "a"}, "expected": {"MOT DE PASSE": "[REDACTED:key-context]"}}, + {"name": "MCP gap: localized unquoted text label", "input": "set MOT DE PASSE: hunter2; parola d'ordine=geheim123; ПАРОЛЬ=secret123", "mode": "strict", "expected": "set MOT DE PASSE: [REDACTED:generic-keyword]; parola d'ordine=[REDACTED:generic-keyword]; ПАРОЛЬ=[REDACTED:generic-keyword]"}, + {"name": "MCP gap: not localized key suffixes", "input": "not-passwort=keep; passwort_hint=keep; contraseñaSegura: keep", "mode": "strict", "expected": "not-passwort=keep; passwort_hint=keep; contraseñaSegura: keep"}, + {"name": "MCP gap: quoted localized key is exact", "input": "{\"x passwort\":\"visible\",\"contraseÑa\":\"mask\"}", "mode": "strict", "expected": "{\"x passwort\":\"visible\",\"contraseÑa\":\"[REDACTED:generic-keyword]\"}"}, + {"name": "gap review: Kelvin-sign key in raw JSON", "input": "{\"\u212aennwort\":\"abc\"}", "mode": "strict", "expected": "{\"\u212aennwort\":\"[REDACTED:generic-keyword]\"}"}, + {"name": "gap review: Kelvin-sign key in parsed JSON", "input": {"\u212aennwort": "abc"}, "mode": "strict", "expected": {"\u212aennwort": "[REDACTED:key-context]"}}, + {"name": "gap review: parsed diagnostic seed values", "input": {"seed": 42, "Seed": "ordinary value", "status": "keep"}, "expected": {"seed": 42, "Seed": "ordinary value", "status": "keep"}}, + {"name": "gap review: parsed recovery seed and phrases", "input": {"seed": "abandon ability able about …", "recovery phrase": "unlisted content", "seed phrase": "unlisted content"}, "expected": {"seed": "[REDACTED:key-context]", "recovery phrase": "[REDACTED:key-context]", "seed phrase": "[REDACTED:key-context]"}} ] } diff --git a/python/src/droidrun_redaction/spec/vectors/keywords.json b/python/src/droidrun_redaction/spec/vectors/keywords.json index bed6866..6d1a721 100644 --- a/python/src/droidrun_redaction/spec/vectors/keywords.json +++ b/python/src/droidrun_redaction/spec/vectors/keywords.json @@ -450,6 +450,36 @@ {"name": "review: a session start message is not a secret", "input": "session: started at 10:00", "mode": "strict", "opts": {"pii": true}, "expected": "session: started at 10:00"}, {"name": "compat: no scheme-prefixed token assignment scan", "input": "token=Basic hunter2", "mode": "compat", "opts": {"pii": true}, "expected": "token=Basic hunter2"}, {"name": "compat: no sessionid assignment scan", "input": "sessionid=x", "mode": "compat", "opts": {"pii": true}, "expected": "sessionid=x"}, - {"name": "compat: a placeholder does not consume the closing brace", "input": "{\"token\":[REDACTED:github]}", "mode": "compat", "opts": {"pii": true}, "expected": "{\"token\":[REDACTED:github]}"} + {"name": "compat: a placeholder does not consume the closing brace", "input": "{\"token\":[REDACTED:github]}", "mode": "compat", "opts": {"pii": true}, "expected": "{\"token\":[REDACTED:github]}"}, + {"name": "MCP gap: mnemonic key consumes line", "input": "mnemonic: abandon ability able about …\nnext line", "mode": "strict", "expected": "mnemonic: [REDACTED:mnemonic]\nnext line"}, + {"name": "MCP gap: seed key consumes line", "input": "seed: abandon ability able about …", "mode": "strict", "expected": "seed: [REDACTED:mnemonic]"}, + {"name": "mnemonic keeps single-quoted spaces", "input": "seed: ' '", "mode": "strict", "expected": "seed: ' '"}, + {"name": "mnemonic keeps double-quoted spaces", "input": "seed: \" \"", "mode": "strict", "expected": "seed: \" \""}, + {"name": "mnemonic keeps an unquoted blank value", "input": "mnemonic: ", "mode": "strict", "expected": "mnemonic: "}, + {"name": "MCP gap: seed JSON value stops at the closing quote", "input": "{\"seed\":\"abandon ability able about …\",\"next\":\"keep\"}", "mode": "strict", "expected": "{\"seed\":\"[REDACTED:mnemonic]\",\"next\":\"keep\"}"}, + {"name": "MCP gap: seed structured JSON key", "input": {"mnemonic": "abandon ability able about"}, "mode": "strict", "expected": {"mnemonic": "[REDACTED:key-context]"}}, + {"name": "MCP gap: keyed and bare mnemonic in default mode", "input": "MNEMONIC: some secret text\nabandon ability able about above absent absorb abstract absurd abuse access accident", "expected": "MNEMONIC: [REDACTED:mnemonic]\n[REDACTED:mnemonic]"}, + {"name": "MCP gap: 12 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: 15 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: 18 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: 21 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire across act action.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: 24 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire across act action actor actress actual.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: ordinary prose and unaccepted count", "input": "The journalist described how the committee resolved an unexpectedly complicated administrative issue.\nabandon ability able about above absent absorb abstract absurd abuse access accident account", "mode": "strict", "expected": "The journalist described how the committee resolved an unexpectedly complicated administrative issue.\nabandon ability able about above absent absorb abstract absurd abuse access accident account"}, + {"name": "MCP gap: not a seed key", "input": "random_seed: 123; seedling: apple", "mode": "strict", "expected": "random_seed: 123; seedling: apple"}, + {"name": "gap review: checksum-valid 12-word window in prose", "input": "Use abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about", "expected": "Use [REDACTED:mnemonic]"}, + {"name": "gap review: invalid checksum in every window of a long run", "input": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon", "expected": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon"}, + {"name": "gap review: diagnostic seed in compat without PII", "input": "RNG seed=1234 caused the crash", "expected": "RNG seed=1234 caused the crash"}, + {"name": "gap review: unquoted numeric seed in raw JSON", "input": "{\"seed\":42,\"status\":\"keep\"}", "mode": "strict", "expected": "{\"seed\":42,\"status\":\"keep\"}"}, + {"name": "gap review: masked seed stops at an object delimiter", "input": "{\"seed\":abandon ability able about,\"status\":\"keep\"}", "expected": "{\"seed\":[REDACTED:mnemonic],\"status\":\"keep\"}"}, + {"name": "gap review: already masked seed preserves a closing brace", "input": "seed: [REDACTED:mnemonic]}", "expected": "seed: [REDACTED:mnemonic]}"}, + {"name": "gap review: named recovery phrase allows any value", "input": "recovery phrase: kept-out; seed phrase: elsewhere]", "expected": "recovery phrase: [REDACTED:mnemonic]; seed phrase: [REDACTED:mnemonic]]"}, + {"name": "gap review: quoted mnemonic keeps surrounding raw JSON", "input": "{\"mnemonic\":\"has a comma, and a brace }\",\"status\":\"keep\"}", "expected": "{\"mnemonic\":\"[REDACTED:mnemonic]\",\"status\":\"keep\"}"}, + {"name": "round two: rejected seed leaves the following mnemonic label visible to the scanner", "input": "seed: 42 mnemonic: my wallet backup", "expected": "seed: 42 mnemonic: [REDACTED:mnemonic]"}, + {"name": "round two: a password hit splits the mnemonic run on the first pass", "input": "password=abandon ability able about above absent absorb abstract absurd abuse access accident account", "expected": "password=[REDACTED:generic-keyword] [REDACTED:mnemonic]"}, + {"name": "round two: mnemonic preserves the closing escape run", "input": "mnemonic: \"abc\\\\\" tail", "expected": "mnemonic: \"[REDACTED:mnemonic]\\\\\" tail"}, + {"name": "round two: mnemonic query value stops before another parameter", "input": "https://example.test/?mnemonic=alpha&keep=1", "expected": "https://example.test/?mnemonic=[REDACTED:key-context]&keep=1"}, + {"name": "round two: mnemonic query value stops before the fragment", "input": "https://example.test/?keep=1&mnemonic=alpha#section", "expected": "https://example.test/?keep=1&mnemonic=[REDACTED:key-context]#section"}, + {"name": "round three: seed skips a full-tier token on the first pass", "input": "seed: npm_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expectedSync": "seed: npm_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expectedAsync": "seed: [REDACTED:npm]"}, + {"name": "round three: seed skips a standard-tier token on the first pass", "input": "seed: dr_sk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expected": "seed: [REDACTED:platform-key]"} ] } diff --git a/python/src/droidrun_redaction/spec/vectors/pii.json b/python/src/droidrun_redaction/spec/vectors/pii.json index b74c152..66343be 100644 --- a/python/src/droidrun_redaction/spec/vectors/pii.json +++ b/python/src/droidrun_redaction/spec/vectors/pii.json @@ -768,6 +768,62 @@ {"name": "review: a compact verification code before a hyphen and digits", "input": "verification code: 1234-5678", "mode": "strict", "opts": {"pii": true}, "expected": "verification code: [REDACTED:otp]-5678"}, {"name": "review: an attempt count is not an OTP", "input": "OTP was 3 attempts", "mode": "strict", "opts": {"pii": true}, "expected": "OTP was 3 attempts"}, {"name": "review: a 2FA status is not an OTP", "input": "2FA: enabled", "mode": "strict", "opts": {"pii": true}, "expected": "2FA: enabled"}, - {"name": "review: a unique-local prefix with one colon is not IPv6", "input": "fdab:1", "mode": "strict", "opts": {"pii": true}, "expected": "fdab:1"} + {"name": "review: a unique-local prefix with one colon is not IPv6", "input": "fdab:1", "mode": "strict", "opts": {"pii": true}, "expected": "fdab:1"}, + {"name": "MCP gap: spaced card", "input": "4111 1111 1111 1111", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:card]"}, + {"name": "MCP gap: compact card", "input": "card 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "card [REDACTED:card]"}, + {"name": "MCP gap: dashed card", "input": "paid with 4111-1111-1111-1111.", "mode": "strict", "opts": {"pii": true}, "expected": "paid with [REDACTED:card]."}, + {"name": "MCP gap: 13 digit card", "input": "4222222222222", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:card]"}, + {"name": "MCP gap: 19 digit card", "input": "4000000000000000006", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:card]"}, + {"name": "MCP gap: invalid Luhn", "input": "4111 1111 1111 1112; 4111111111111112", "mode": "strict", "opts": {"pii": true}, "expected": "4111 1111 1111 1112; 4111111111111112"}, + {"name": "MCP gap: overlong card-like groups", "input": "4111 1111 1111 1111 1111", "mode": "strict", "opts": {"pii": true}, "expected": "4111 1111 1111 1111 1111"}, + {"name": "MCP gap: invoice and order IDs", "input": "Invoice #4111111111111111; order: 4111-1111-1111-1111", "mode": "strict", "opts": {"pii": true}, "expected": "Invoice #4111111111111111; order: 4111-1111-1111-1111"}, + {"name": "MCP gap: valid spaced IBAN", "input": "DE89 3704 0044 0532 0130 00", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:iban]"}, + {"name": "MCP gap: valid compact IBAN", "input": "DE89370400440532013000", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:iban]"}, + {"name": "MCP gap: alphanumeric IBAN and trailing prose", "input": "Account gb82 west 1234 5698 7654 32 for testing.", "mode": "strict", "opts": {"pii": true}, "expected": "Account [REDACTED:iban] for testing."}, + {"name": "MCP gap: wrong country length", "input": "DE8937040044053201300", "mode": "strict", "opts": {"pii": true}, "expected": "DE8937040044053201300"}, + {"name": "MCP gap: bad IBAN checksum in both styles", "input": "DE88 3704 0044 0532 0130 00; DE88370400440532013000", "mode": "strict", "opts": {"pii": true}, "expected": "DE88 3704 0044 0532 0130 00; DE88370400440532013000"}, + {"name": "MCP gap: an IBAN-shaped range only suppresses overlapping phone and card hits", "input": "030 12345678; DE88 3704 0044 0532 0130 00; 4111 1111 1111 1111", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]; DE88 3704 0044 0532 0130 00; [REDACTED:card]"}, + {"name": "MCP gap: compact 00 prefix", "input": "004915123456789", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]"}, + {"name": "MCP gap: spaced 00 prefix with extension", "input": "0049 170 1234567 ext. 12", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]"}, + {"name": "MCP gap: German landline", "input": "030 12345678", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]"}, + {"name": "MCP gap: German mobile", "input": "0151 23456789", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]"}, + {"name": "MCP gap: unrecognized German-like prefix", "input": "012 12345678", "mode": "strict", "opts": {"pii": true}, "expected": "012 12345678"}, + {"name": "MCP gap: German-like version and identifiers", "input": "v030-12345678; order 030-12345678; invoice: 0151-23456789", "mode": "strict", "opts": {"pii": true}, "expected": "v030-12345678; order 030-12345678; invoice: 0151-23456789"}, + {"name": "MCP gap: too-long 00 prefix", "input": "004915123456789123", "mode": "strict", "opts": {"pii": true}, "expected": "004915123456789123"}, + {"name": "MCP gap: OTP login suffix", "input": "482913 is your login code", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] is your login code"}, + {"name": "MCP gap: OTP SMS suffix", "input": "<#> 482913 is your Instagram code", "mode": "strict", "opts": {"pii": true}, "expected": "<#> [REDACTED:otp] is your Instagram code"}, + {"name": "MCP gap: OTP prefixed SMS suffix", "input": "G-482913 is your Google verification code", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] is your Google verification code"}, + {"name": "OTP keeps a calendar-shaped G-prefixed value", "input": "G-20261202 is your Google code", "mode": "strict", "opts": {"pii": true}, "expected": "G-20261202 is your Google code"}, + {"name": "OTP keeps a calendar-shaped value with both SMS prefixes", "input": "<#> g-19991231 is your Google verification code", "mode": "strict", "opts": {"pii": true}, "expected": "<#> g-19991231 is your Google verification code"}, + {"name": "OTP keeps a calendar-shaped value after an SMS marker", "input": "<#> 20261202 is your Instagram code", "mode": "strict", "opts": {"pii": true}, "expected": "<#> 20261202 is your Instagram code"}, + {"name": "OTP masks a real code with both SMS prefixes", "input": "<#> g-482913 is your Google code", "mode": "strict", "opts": {"pii": true}, "expected": "<#> [REDACTED:otp] is your Google code"}, + {"name": "MCP gap: OTP sign-in instruction", "input": "Use 482913 to sign in to WhatsApp", "mode": "strict", "opts": {"pii": true}, "expected": "Use [REDACTED:otp] to sign in to WhatsApp"}, + {"name": "MCP gap: OTP short explicitly addressed", "input": "Your code: 4821", "mode": "strict", "opts": {"pii": true}, "expected": "Your code: [REDACTED:otp]"}, + {"name": "MCP gap: OTP short branded", "input": "Telegram code: 48291", "mode": "strict", "opts": {"pii": true}, "expected": "Telegram code: [REDACTED:otp]"}, + {"name": "MCP gap: OTP short branded with verb", "input": "Your Uber code is 4821", "mode": "strict", "opts": {"pii": true}, "expected": "Your Uber code is [REDACTED:otp]"}, + {"name": "MCP gap: OTP short grouped branded", "input": "Your WhatsApp code: 482-913", "mode": "strict", "opts": {"pii": true}, "expected": "Your WhatsApp code: [REDACTED:otp]"}, + {"name": "MCP gap: OTP alphanumeric after bare label", "input": "Code: AB12CD", "mode": "strict", "opts": {"pii": true}, "expected": "Code: [REDACTED:otp]"}, + {"name": "MCP gap: OTP Spanish label", "input": "Tu código de verificación es 482913", "mode": "strict", "opts": {"pii": true}, "expected": "Tu código de verificación es [REDACTED:otp]"}, + {"name": "MCP gap: OTP Spanish suffix", "input": "482913 es tu código de verificación", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] es tu código de verificación"}, + {"name": "MCP gap: OTP German suffix", "input": "482913 ist dein Sicherheitscode", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] ist dein Sicherheitscode"}, + {"name": "MCP gap: OTP French suffix", "input": "482913 est votre code de confirmation", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] est votre code de confirmation"}, + {"name": "MCP gap: OTP tail after a placeholder", "input": "OTP code: [REDACTED:secret]482913", "mode": "strict", "opts": {"pii": true}, "expected": "OTP code: [REDACTED:secret][REDACTED:otp]"}, + {"name": "MCP gap: OTP prose and error codes", "input": "error code 404; error code: AB12CD; error code 482913; see code: main.ts; code: README", "mode": "strict", "opts": {"pii": true}, "expected": "error code 404; error code: AB12CD; error code 482913; see code: main.ts; code: README"}, + {"name": "MCP gap: date, time, versions and port", "input": "2026-12-02 09:44:59; Your code: 2026-12-02; version 1.2.3.4; port 4821", "mode": "strict", "opts": {"pii": true}, "expected": "2026-12-02 09:44:59; Your code: 2026-12-02; version 1.2.3.4; port 4821"}, + {"name": "MCP gap: IPv6 zone bare", "input": "fe80::1%en0", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:ip]"}, + {"name": "MCP gap: keep punctuation after an IPv6 zone", "input": "Peer fe80::1%eth0.12.", "mode": "strict", "opts": {"pii": true}, "expected": "Peer [REDACTED:ip]."}, + {"name": "MCP gap: a date is not a verification code", "input": "verification code: 2026-12-02; code: 20261202 failed", "mode": "strict", "opts": {"pii": true}, "expected": "verification code: 2026-12-02; code: 20261202 failed"}, + {"name": "MCP gap: German regional landline", "input": "Office 0201 1234567", "mode": "strict", "opts": {"pii": true}, "expected": "Office [REDACTED:phone]"}, + {"name": "MCP gap: IPv6 zone in brackets with port", "input": "[fe80::1%25en0]:8080", "mode": "strict", "opts": {"pii": true}, "expected": "[[REDACTED:ip]]:8080"}, + {"name": "MCP gap: IPv6 invalid zone and IPv4 bind address", "input": "fe80::1%%en0; fe80::1%; 0.0.0.0:8080; build 1.2.3.4", "mode": "strict", "opts": {"pii": true}, "expected": "fe80::1%%en0; fe80::1%; 0.0.0.0:8080; build 1.2.3.4"}, + {"name": "MCP gap: PII remains opt-in", "input": "4111 1111 1111 1111; DE89370400440532013000; 004915123456789; Your code: 4821; fe80::1%en0", "mode": "strict", "expected": "4111 1111 1111 1111; DE89370400440532013000; 004915123456789; Your code: 4821; fe80::1%en0"}, + {"name": "gap review: valid IBAN inside a checksum-failed envelope", "input": "TR00 DE89 3704 0044 0532 0130 00", "opts": {"pii": true}, "expected": "TR00 [REDACTED:iban]"}, + {"name": "gap review: card immediately after a valid IBAN", "input": "DE89 3704 0044 0532 0130 00 4111 1111 1111 1111", "opts": {"pii": true}, "expected": "[REDACTED:iban] [REDACTED:card]"}, + {"name": "gap review: overlong numeric run after a valid IBAN stays visible", "input": "DE89 3704 0044 0532 0130 00 4111 1111 1111 1111 1234", "opts": {"pii": true}, "expected": "[REDACTED:iban] 4111 1111 1111 1111 1234"}, + {"name": "gap review: invoice number label excludes a card", "input": "Invoice number: 4111111111111111", "opts": {"pii": true}, "expected": "Invoice number: 4111111111111111"}, + {"name": "gap review: HTTP error label excludes an alphanumeric OTP", "input": "HTTP error: Code: E1024", "opts": {"pii": true}, "expected": "HTTP error: Code: E1024"}, + {"name": "round two: overlapping valid IBAN envelopes cover the entire span", "input": "ES43 DE89 3704 0044 0532 0130 00", "opts": {"pii": true}, "expected": "[REDACTED:iban]"}, + {"name": "round two: HTTP error invoice and order labels exclude numeric OTPs", "input": "HTTP error: Code: 482913; Invoice code: 482913; Order code: 482913", "opts": {"pii": true}, "expected": "HTTP error: Code: 482913; Invoice code: 482913; Order code: 482913"}, + {"name": "round two: addressed and branded numeric OTPs still mask", "input": "Your code: 482913; Telegram code: 48291", "opts": {"pii": true}, "expected": "Your code: [REDACTED:otp]; Telegram code: [REDACTED:otp]"} ] } diff --git a/python/tests/helpers.py b/python/tests/helpers.py index 78d94e6..b764711 100644 --- a/python/tests/helpers.py +++ b/python/tests/helpers.py @@ -41,8 +41,9 @@ def canonical(value: Any) -> Any: def fail_standard_rules(monkeypatch: Any, failing: Any) -> None: """Every rule list of the standard tier (each mode, with and without `pii`) holds one rule that raises.""" - broken = {options: [("jwt", failing)] for options in _detect._RULE_LISTS} - monkeypatch.setattr(_detect, "_RULE_LISTS", broken) + broken = [("jwt", failing)] + monkeypatch.setattr(_detect, "_COMPAT", broken) + monkeypatch.setattr(_detect, "_STRICT", broken) def run(value: Any, *, mode: str, opts: dict[str, Any], tier: str = "standard") -> Any: From 935129d7c9c597a9f68fc328a1664bd48016eab5 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:14:46 +0100 Subject: [PATCH 04/30] fix(redaction): MCP gap rules, part 6 (DRO-4114) --- spec/schema/rules.schema.json | 83 ++++++++++++++++++++++++++++++++- spec/vectors/key-names.json | 16 ++++++- spec/vectors/keywords.json | 32 ++++++++++++- spec/vectors/pii.json | 58 ++++++++++++++++++++++- tools/lib/attacks.ts | 9 ++++ tools/lib/spec-patterns.ts | 2 + ts/NOTICE | 30 ++++++++++++ ts/README.md | 30 +++++++++--- ts/src/algorithms/pairs.ts | 60 ++++++++++++++++-------- ts/src/algorithms/regex-rule.ts | 61 ++++++++++++++++++++++-- ts/src/full-rules.ts | 4 +- ts/src/golden.test.ts | 21 ++++++++- 12 files changed, 368 insertions(+), 38 deletions(-) diff --git a/spec/schema/rules.schema.json b/spec/schema/rules.schema.json index 1ec72a2..c4057a5 100644 --- a/spec/schema/rules.schema.json +++ b/spec/schema/rules.schema.json @@ -166,13 +166,21 @@ }, "minItems": 1 }, + "ignoreAfterLabels": { + "type": "array", + "items": {"type": "string", "pattern": "^[a-z]+( [a-z]+)+$", "maxLength": 64}, + "minItems": 1 + }, "afterGapClass": { "type": "string", "minLength": 1 }, "check": { "enum": [ - "ipv6" + "ipv6", + "ipv6-zone", + "otp-alphanumeric", + "luhn" ] }, "minColons": { @@ -187,6 +195,15 @@ "ignoreAfterClass": { "type": "string", "minLength": 1 + }, + "ignoreDate": { + "type": "boolean" + }, + "numericEdges": { + "enum": [ + "run", + "code" + ] } } }, @@ -678,6 +695,70 @@ "minItems": 1 } } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "kind", + "label", + "pattern", + "lineEnd", + "gapClass", + "ignoreBeforeClass" + ], + "properties": { + "id": { + "pattern": "^[a-z0-9-]+$", + "type": "string" + }, + "kind": { + "const": "mnemonic" + }, + "label": { + "type": "string", + "minLength": 1 + }, + "pattern": { + "type": "string", + "minLength": 1 + }, + "lineEnd": { + "type": "string", + "minLength": 1 + }, + "gapClass": { + "type": "string", + "minLength": 1 + }, + "ignoreBeforeClass": { + "type": "string", + "minLength": 1 + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "kind", + "pattern" + ], + "properties": { + "id": { + "pattern": "^[a-z0-9-]+$", + "type": "string" + }, + "kind": { + "const": "iban" + }, + "pattern": { + "type": "string", + "minLength": 1 + } + } } ] } diff --git a/spec/vectors/key-names.json b/spec/vectors/key-names.json index 1b8b91b..1a1d011 100644 --- a/spec/vectors/key-names.json +++ b/spec/vectors/key-names.json @@ -459,6 +459,20 @@ "expected": { "Bearer [REDACTED:auth-header]": 1 } - } + }, + {"name": "MCP gap: German password label", "input": "Passwort=geheim123", "mode": "strict", "expected": "Passwort=[REDACTED:generic-keyword]"}, + {"name": "MCP gap: German password in raw JSON", "input": "{\"passwort\":\"geheim123\"}", "mode": "strict", "expected": "{\"passwort\":\"[REDACTED:generic-keyword]\"}"}, + {"name": "MCP gap: German alternative label", "input": "Kennwort: geheim123", "mode": "strict", "expected": "Kennwort: [REDACTED:generic-keyword]"}, + {"name": "MCP gap: Spanish label", "input": "contraseña: geheim123", "mode": "strict", "expected": "contraseña: [REDACTED:generic-keyword]"}, + {"name": "MCP gap: canonical Unicode aliases", "input": {"CONTRASEÑA": "a", "mot de passe": "b", "senha": "c", "PAROLA D’ORDINE": "d", "ПАРОЛЬ": "e", "PasswortPolicy": "keep", "passwort_hint": "keep"}, "mode": "strict", "expected": {"CONTRASEÑA": "[REDACTED:key-context]", "mot de passe": "[REDACTED:key-context]", "senha": "[REDACTED:key-context]", "PAROLA D’ORDINE": "[REDACTED:key-context]", "ПАРОЛЬ": "[REDACTED:key-context]", "PasswortPolicy": "keep", "passwort_hint": "keep"}}, + {"name": "MCP gap: Turkish dotted capital I", "input": "ŞİFRE=geheim123", "mode": "strict", "expected": "ŞİFRE=[REDACTED:generic-keyword]"}, + {"name": "MCP gap: localized parsed key in default mode", "input": {"MOT DE PASSE": "a"}, "expected": {"MOT DE PASSE": "[REDACTED:key-context]"}}, + {"name": "MCP gap: localized unquoted text label", "input": "set MOT DE PASSE: hunter2; parola d'ordine=geheim123; ПАРОЛЬ=secret123", "mode": "strict", "expected": "set MOT DE PASSE: [REDACTED:generic-keyword]; parola d'ordine=[REDACTED:generic-keyword]; ПАРОЛЬ=[REDACTED:generic-keyword]"}, + {"name": "MCP gap: not localized key suffixes", "input": "not-passwort=keep; passwort_hint=keep; contraseñaSegura: keep", "mode": "strict", "expected": "not-passwort=keep; passwort_hint=keep; contraseñaSegura: keep"}, + {"name": "MCP gap: quoted localized key is exact", "input": "{\"x passwort\":\"visible\",\"contraseÑa\":\"mask\"}", "mode": "strict", "expected": "{\"x passwort\":\"visible\",\"contraseÑa\":\"[REDACTED:generic-keyword]\"}"}, + {"name": "gap review: Kelvin-sign key in raw JSON", "input": "{\"\u212aennwort\":\"abc\"}", "mode": "strict", "expected": "{\"\u212aennwort\":\"[REDACTED:generic-keyword]\"}"}, + {"name": "gap review: Kelvin-sign key in parsed JSON", "input": {"\u212aennwort": "abc"}, "mode": "strict", "expected": {"\u212aennwort": "[REDACTED:key-context]"}}, + {"name": "gap review: parsed diagnostic seed values", "input": {"seed": 42, "Seed": "ordinary value", "status": "keep"}, "expected": {"seed": 42, "Seed": "ordinary value", "status": "keep"}}, + {"name": "gap review: parsed recovery seed and phrases", "input": {"seed": "abandon ability able about …", "recovery phrase": "unlisted content", "seed phrase": "unlisted content"}, "expected": {"seed": "[REDACTED:key-context]", "recovery phrase": "[REDACTED:key-context]", "seed phrase": "[REDACTED:key-context]"}} ] } diff --git a/spec/vectors/keywords.json b/spec/vectors/keywords.json index bed6866..6d1a721 100644 --- a/spec/vectors/keywords.json +++ b/spec/vectors/keywords.json @@ -450,6 +450,36 @@ {"name": "review: a session start message is not a secret", "input": "session: started at 10:00", "mode": "strict", "opts": {"pii": true}, "expected": "session: started at 10:00"}, {"name": "compat: no scheme-prefixed token assignment scan", "input": "token=Basic hunter2", "mode": "compat", "opts": {"pii": true}, "expected": "token=Basic hunter2"}, {"name": "compat: no sessionid assignment scan", "input": "sessionid=x", "mode": "compat", "opts": {"pii": true}, "expected": "sessionid=x"}, - {"name": "compat: a placeholder does not consume the closing brace", "input": "{\"token\":[REDACTED:github]}", "mode": "compat", "opts": {"pii": true}, "expected": "{\"token\":[REDACTED:github]}"} + {"name": "compat: a placeholder does not consume the closing brace", "input": "{\"token\":[REDACTED:github]}", "mode": "compat", "opts": {"pii": true}, "expected": "{\"token\":[REDACTED:github]}"}, + {"name": "MCP gap: mnemonic key consumes line", "input": "mnemonic: abandon ability able about …\nnext line", "mode": "strict", "expected": "mnemonic: [REDACTED:mnemonic]\nnext line"}, + {"name": "MCP gap: seed key consumes line", "input": "seed: abandon ability able about …", "mode": "strict", "expected": "seed: [REDACTED:mnemonic]"}, + {"name": "mnemonic keeps single-quoted spaces", "input": "seed: ' '", "mode": "strict", "expected": "seed: ' '"}, + {"name": "mnemonic keeps double-quoted spaces", "input": "seed: \" \"", "mode": "strict", "expected": "seed: \" \""}, + {"name": "mnemonic keeps an unquoted blank value", "input": "mnemonic: ", "mode": "strict", "expected": "mnemonic: "}, + {"name": "MCP gap: seed JSON value stops at the closing quote", "input": "{\"seed\":\"abandon ability able about …\",\"next\":\"keep\"}", "mode": "strict", "expected": "{\"seed\":\"[REDACTED:mnemonic]\",\"next\":\"keep\"}"}, + {"name": "MCP gap: seed structured JSON key", "input": {"mnemonic": "abandon ability able about"}, "mode": "strict", "expected": {"mnemonic": "[REDACTED:key-context]"}}, + {"name": "MCP gap: keyed and bare mnemonic in default mode", "input": "MNEMONIC: some secret text\nabandon ability able about above absent absorb abstract absurd abuse access accident", "expected": "MNEMONIC: [REDACTED:mnemonic]\n[REDACTED:mnemonic]"}, + {"name": "MCP gap: 12 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: 15 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: 18 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: 21 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire across act action.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: 24 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire across act action actor actress actual.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: ordinary prose and unaccepted count", "input": "The journalist described how the committee resolved an unexpectedly complicated administrative issue.\nabandon ability able about above absent absorb abstract absurd abuse access accident account", "mode": "strict", "expected": "The journalist described how the committee resolved an unexpectedly complicated administrative issue.\nabandon ability able about above absent absorb abstract absurd abuse access accident account"}, + {"name": "MCP gap: not a seed key", "input": "random_seed: 123; seedling: apple", "mode": "strict", "expected": "random_seed: 123; seedling: apple"}, + {"name": "gap review: checksum-valid 12-word window in prose", "input": "Use abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about", "expected": "Use [REDACTED:mnemonic]"}, + {"name": "gap review: invalid checksum in every window of a long run", "input": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon", "expected": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon"}, + {"name": "gap review: diagnostic seed in compat without PII", "input": "RNG seed=1234 caused the crash", "expected": "RNG seed=1234 caused the crash"}, + {"name": "gap review: unquoted numeric seed in raw JSON", "input": "{\"seed\":42,\"status\":\"keep\"}", "mode": "strict", "expected": "{\"seed\":42,\"status\":\"keep\"}"}, + {"name": "gap review: masked seed stops at an object delimiter", "input": "{\"seed\":abandon ability able about,\"status\":\"keep\"}", "expected": "{\"seed\":[REDACTED:mnemonic],\"status\":\"keep\"}"}, + {"name": "gap review: already masked seed preserves a closing brace", "input": "seed: [REDACTED:mnemonic]}", "expected": "seed: [REDACTED:mnemonic]}"}, + {"name": "gap review: named recovery phrase allows any value", "input": "recovery phrase: kept-out; seed phrase: elsewhere]", "expected": "recovery phrase: [REDACTED:mnemonic]; seed phrase: [REDACTED:mnemonic]]"}, + {"name": "gap review: quoted mnemonic keeps surrounding raw JSON", "input": "{\"mnemonic\":\"has a comma, and a brace }\",\"status\":\"keep\"}", "expected": "{\"mnemonic\":\"[REDACTED:mnemonic]\",\"status\":\"keep\"}"}, + {"name": "round two: rejected seed leaves the following mnemonic label visible to the scanner", "input": "seed: 42 mnemonic: my wallet backup", "expected": "seed: 42 mnemonic: [REDACTED:mnemonic]"}, + {"name": "round two: a password hit splits the mnemonic run on the first pass", "input": "password=abandon ability able about above absent absorb abstract absurd abuse access accident account", "expected": "password=[REDACTED:generic-keyword] [REDACTED:mnemonic]"}, + {"name": "round two: mnemonic preserves the closing escape run", "input": "mnemonic: \"abc\\\\\" tail", "expected": "mnemonic: \"[REDACTED:mnemonic]\\\\\" tail"}, + {"name": "round two: mnemonic query value stops before another parameter", "input": "https://example.test/?mnemonic=alpha&keep=1", "expected": "https://example.test/?mnemonic=[REDACTED:key-context]&keep=1"}, + {"name": "round two: mnemonic query value stops before the fragment", "input": "https://example.test/?keep=1&mnemonic=alpha#section", "expected": "https://example.test/?keep=1&mnemonic=[REDACTED:key-context]#section"}, + {"name": "round three: seed skips a full-tier token on the first pass", "input": "seed: npm_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expectedSync": "seed: npm_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expectedAsync": "seed: [REDACTED:npm]"}, + {"name": "round three: seed skips a standard-tier token on the first pass", "input": "seed: dr_sk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expected": "seed: [REDACTED:platform-key]"} ] } diff --git a/spec/vectors/pii.json b/spec/vectors/pii.json index b74c152..66343be 100644 --- a/spec/vectors/pii.json +++ b/spec/vectors/pii.json @@ -768,6 +768,62 @@ {"name": "review: a compact verification code before a hyphen and digits", "input": "verification code: 1234-5678", "mode": "strict", "opts": {"pii": true}, "expected": "verification code: [REDACTED:otp]-5678"}, {"name": "review: an attempt count is not an OTP", "input": "OTP was 3 attempts", "mode": "strict", "opts": {"pii": true}, "expected": "OTP was 3 attempts"}, {"name": "review: a 2FA status is not an OTP", "input": "2FA: enabled", "mode": "strict", "opts": {"pii": true}, "expected": "2FA: enabled"}, - {"name": "review: a unique-local prefix with one colon is not IPv6", "input": "fdab:1", "mode": "strict", "opts": {"pii": true}, "expected": "fdab:1"} + {"name": "review: a unique-local prefix with one colon is not IPv6", "input": "fdab:1", "mode": "strict", "opts": {"pii": true}, "expected": "fdab:1"}, + {"name": "MCP gap: spaced card", "input": "4111 1111 1111 1111", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:card]"}, + {"name": "MCP gap: compact card", "input": "card 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "card [REDACTED:card]"}, + {"name": "MCP gap: dashed card", "input": "paid with 4111-1111-1111-1111.", "mode": "strict", "opts": {"pii": true}, "expected": "paid with [REDACTED:card]."}, + {"name": "MCP gap: 13 digit card", "input": "4222222222222", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:card]"}, + {"name": "MCP gap: 19 digit card", "input": "4000000000000000006", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:card]"}, + {"name": "MCP gap: invalid Luhn", "input": "4111 1111 1111 1112; 4111111111111112", "mode": "strict", "opts": {"pii": true}, "expected": "4111 1111 1111 1112; 4111111111111112"}, + {"name": "MCP gap: overlong card-like groups", "input": "4111 1111 1111 1111 1111", "mode": "strict", "opts": {"pii": true}, "expected": "4111 1111 1111 1111 1111"}, + {"name": "MCP gap: invoice and order IDs", "input": "Invoice #4111111111111111; order: 4111-1111-1111-1111", "mode": "strict", "opts": {"pii": true}, "expected": "Invoice #4111111111111111; order: 4111-1111-1111-1111"}, + {"name": "MCP gap: valid spaced IBAN", "input": "DE89 3704 0044 0532 0130 00", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:iban]"}, + {"name": "MCP gap: valid compact IBAN", "input": "DE89370400440532013000", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:iban]"}, + {"name": "MCP gap: alphanumeric IBAN and trailing prose", "input": "Account gb82 west 1234 5698 7654 32 for testing.", "mode": "strict", "opts": {"pii": true}, "expected": "Account [REDACTED:iban] for testing."}, + {"name": "MCP gap: wrong country length", "input": "DE8937040044053201300", "mode": "strict", "opts": {"pii": true}, "expected": "DE8937040044053201300"}, + {"name": "MCP gap: bad IBAN checksum in both styles", "input": "DE88 3704 0044 0532 0130 00; DE88370400440532013000", "mode": "strict", "opts": {"pii": true}, "expected": "DE88 3704 0044 0532 0130 00; DE88370400440532013000"}, + {"name": "MCP gap: an IBAN-shaped range only suppresses overlapping phone and card hits", "input": "030 12345678; DE88 3704 0044 0532 0130 00; 4111 1111 1111 1111", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]; DE88 3704 0044 0532 0130 00; [REDACTED:card]"}, + {"name": "MCP gap: compact 00 prefix", "input": "004915123456789", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]"}, + {"name": "MCP gap: spaced 00 prefix with extension", "input": "0049 170 1234567 ext. 12", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]"}, + {"name": "MCP gap: German landline", "input": "030 12345678", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]"}, + {"name": "MCP gap: German mobile", "input": "0151 23456789", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]"}, + {"name": "MCP gap: unrecognized German-like prefix", "input": "012 12345678", "mode": "strict", "opts": {"pii": true}, "expected": "012 12345678"}, + {"name": "MCP gap: German-like version and identifiers", "input": "v030-12345678; order 030-12345678; invoice: 0151-23456789", "mode": "strict", "opts": {"pii": true}, "expected": "v030-12345678; order 030-12345678; invoice: 0151-23456789"}, + {"name": "MCP gap: too-long 00 prefix", "input": "004915123456789123", "mode": "strict", "opts": {"pii": true}, "expected": "004915123456789123"}, + {"name": "MCP gap: OTP login suffix", "input": "482913 is your login code", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] is your login code"}, + {"name": "MCP gap: OTP SMS suffix", "input": "<#> 482913 is your Instagram code", "mode": "strict", "opts": {"pii": true}, "expected": "<#> [REDACTED:otp] is your Instagram code"}, + {"name": "MCP gap: OTP prefixed SMS suffix", "input": "G-482913 is your Google verification code", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] is your Google verification code"}, + {"name": "OTP keeps a calendar-shaped G-prefixed value", "input": "G-20261202 is your Google code", "mode": "strict", "opts": {"pii": true}, "expected": "G-20261202 is your Google code"}, + {"name": "OTP keeps a calendar-shaped value with both SMS prefixes", "input": "<#> g-19991231 is your Google verification code", "mode": "strict", "opts": {"pii": true}, "expected": "<#> g-19991231 is your Google verification code"}, + {"name": "OTP keeps a calendar-shaped value after an SMS marker", "input": "<#> 20261202 is your Instagram code", "mode": "strict", "opts": {"pii": true}, "expected": "<#> 20261202 is your Instagram code"}, + {"name": "OTP masks a real code with both SMS prefixes", "input": "<#> g-482913 is your Google code", "mode": "strict", "opts": {"pii": true}, "expected": "<#> [REDACTED:otp] is your Google code"}, + {"name": "MCP gap: OTP sign-in instruction", "input": "Use 482913 to sign in to WhatsApp", "mode": "strict", "opts": {"pii": true}, "expected": "Use [REDACTED:otp] to sign in to WhatsApp"}, + {"name": "MCP gap: OTP short explicitly addressed", "input": "Your code: 4821", "mode": "strict", "opts": {"pii": true}, "expected": "Your code: [REDACTED:otp]"}, + {"name": "MCP gap: OTP short branded", "input": "Telegram code: 48291", "mode": "strict", "opts": {"pii": true}, "expected": "Telegram code: [REDACTED:otp]"}, + {"name": "MCP gap: OTP short branded with verb", "input": "Your Uber code is 4821", "mode": "strict", "opts": {"pii": true}, "expected": "Your Uber code is [REDACTED:otp]"}, + {"name": "MCP gap: OTP short grouped branded", "input": "Your WhatsApp code: 482-913", "mode": "strict", "opts": {"pii": true}, "expected": "Your WhatsApp code: [REDACTED:otp]"}, + {"name": "MCP gap: OTP alphanumeric after bare label", "input": "Code: AB12CD", "mode": "strict", "opts": {"pii": true}, "expected": "Code: [REDACTED:otp]"}, + {"name": "MCP gap: OTP Spanish label", "input": "Tu código de verificación es 482913", "mode": "strict", "opts": {"pii": true}, "expected": "Tu código de verificación es [REDACTED:otp]"}, + {"name": "MCP gap: OTP Spanish suffix", "input": "482913 es tu código de verificación", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] es tu código de verificación"}, + {"name": "MCP gap: OTP German suffix", "input": "482913 ist dein Sicherheitscode", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] ist dein Sicherheitscode"}, + {"name": "MCP gap: OTP French suffix", "input": "482913 est votre code de confirmation", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] est votre code de confirmation"}, + {"name": "MCP gap: OTP tail after a placeholder", "input": "OTP code: [REDACTED:secret]482913", "mode": "strict", "opts": {"pii": true}, "expected": "OTP code: [REDACTED:secret][REDACTED:otp]"}, + {"name": "MCP gap: OTP prose and error codes", "input": "error code 404; error code: AB12CD; error code 482913; see code: main.ts; code: README", "mode": "strict", "opts": {"pii": true}, "expected": "error code 404; error code: AB12CD; error code 482913; see code: main.ts; code: README"}, + {"name": "MCP gap: date, time, versions and port", "input": "2026-12-02 09:44:59; Your code: 2026-12-02; version 1.2.3.4; port 4821", "mode": "strict", "opts": {"pii": true}, "expected": "2026-12-02 09:44:59; Your code: 2026-12-02; version 1.2.3.4; port 4821"}, + {"name": "MCP gap: IPv6 zone bare", "input": "fe80::1%en0", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:ip]"}, + {"name": "MCP gap: keep punctuation after an IPv6 zone", "input": "Peer fe80::1%eth0.12.", "mode": "strict", "opts": {"pii": true}, "expected": "Peer [REDACTED:ip]."}, + {"name": "MCP gap: a date is not a verification code", "input": "verification code: 2026-12-02; code: 20261202 failed", "mode": "strict", "opts": {"pii": true}, "expected": "verification code: 2026-12-02; code: 20261202 failed"}, + {"name": "MCP gap: German regional landline", "input": "Office 0201 1234567", "mode": "strict", "opts": {"pii": true}, "expected": "Office [REDACTED:phone]"}, + {"name": "MCP gap: IPv6 zone in brackets with port", "input": "[fe80::1%25en0]:8080", "mode": "strict", "opts": {"pii": true}, "expected": "[[REDACTED:ip]]:8080"}, + {"name": "MCP gap: IPv6 invalid zone and IPv4 bind address", "input": "fe80::1%%en0; fe80::1%; 0.0.0.0:8080; build 1.2.3.4", "mode": "strict", "opts": {"pii": true}, "expected": "fe80::1%%en0; fe80::1%; 0.0.0.0:8080; build 1.2.3.4"}, + {"name": "MCP gap: PII remains opt-in", "input": "4111 1111 1111 1111; DE89370400440532013000; 004915123456789; Your code: 4821; fe80::1%en0", "mode": "strict", "expected": "4111 1111 1111 1111; DE89370400440532013000; 004915123456789; Your code: 4821; fe80::1%en0"}, + {"name": "gap review: valid IBAN inside a checksum-failed envelope", "input": "TR00 DE89 3704 0044 0532 0130 00", "opts": {"pii": true}, "expected": "TR00 [REDACTED:iban]"}, + {"name": "gap review: card immediately after a valid IBAN", "input": "DE89 3704 0044 0532 0130 00 4111 1111 1111 1111", "opts": {"pii": true}, "expected": "[REDACTED:iban] [REDACTED:card]"}, + {"name": "gap review: overlong numeric run after a valid IBAN stays visible", "input": "DE89 3704 0044 0532 0130 00 4111 1111 1111 1111 1234", "opts": {"pii": true}, "expected": "[REDACTED:iban] 4111 1111 1111 1111 1234"}, + {"name": "gap review: invoice number label excludes a card", "input": "Invoice number: 4111111111111111", "opts": {"pii": true}, "expected": "Invoice number: 4111111111111111"}, + {"name": "gap review: HTTP error label excludes an alphanumeric OTP", "input": "HTTP error: Code: E1024", "opts": {"pii": true}, "expected": "HTTP error: Code: E1024"}, + {"name": "round two: overlapping valid IBAN envelopes cover the entire span", "input": "ES43 DE89 3704 0044 0532 0130 00", "opts": {"pii": true}, "expected": "[REDACTED:iban]"}, + {"name": "round two: HTTP error invoice and order labels exclude numeric OTPs", "input": "HTTP error: Code: 482913; Invoice code: 482913; Order code: 482913", "opts": {"pii": true}, "expected": "HTTP error: Code: 482913; Invoice code: 482913; Order code: 482913"}, + {"name": "round two: addressed and branded numeric OTPs still mask", "input": "Your code: 482913; Telegram code: 48291", "opts": {"pii": true}, "expected": "Your code: [REDACTED:otp]; Telegram code: [REDACTED:otp]"} ] } diff --git a/tools/lib/attacks.ts b/tools/lib/attacks.ts index 604bda9..d678f98 100644 --- a/tools/lib/attacks.ts +++ b/tools/lib/attacks.ts @@ -125,6 +125,15 @@ const FIXED_UNITS = [ 'code 1', 'version ', 'error code ', + 'DE00 0000 0000 0000 0000 00 ', + 'TR00 DE89 3704 0044 0532 0130 00 ', + '4111 1111 1111 1112 ', + '0049 0000 0000 0000 ', + 'fe80::1%en0.', + 'OTP code: [REDACTED:secret]482913 ', + 'mot de passe= ', + 'seed="x" ', + 'abandon ', // The full tier (SPEC 4.11 to 4.15): every algorithm gets its prefixes, its separators and the // repeated near-miss shapes that make a restart loop slow. 'ghs_1_', diff --git a/tools/lib/spec-patterns.ts b/tools/lib/spec-patterns.ts index e48614b..87a9580 100644 --- a/tools/lib/spec-patterns.ts +++ b/tools/lib/spec-patterns.ts @@ -75,10 +75,12 @@ const LITERAL_FIELDS = new Set([ 'newline', 'dash', 'check', + 'numericEdges', 'plainWords', 'queryOnlyKeys', 'ignoreSuffixes', 'ignoreAfterWords', + 'ignoreAfterLabels', 'schemeKeys', 'schemeWords', ]); diff --git a/ts/NOTICE b/ts/NOTICE index 90abba1..83aadf5 100644 --- a/ts/NOTICE +++ b/ts/NOTICE @@ -88,3 +88,33 @@ not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. ``` + +## BIP39 English wordlist (MIT) + +`mnemonic.words` in `spec/algorithms.json` reproduces the English BIP39 wordlist from +[python-mnemonic v0.21](https://github.com/trezor/python-mnemonic/blob/v0.21/src/mnemonic/wordlist/english.txt). +The [upstream MIT license](https://github.com/trezor/python-mnemonic/blob/v0.21/LICENSE) follows. + +``` +The MIT License (MIT) + +Copyright (c) 2013-2016 Pavol Rusnak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` diff --git a/ts/README.md b/ts/README.md index 8807cc9..c460b62 100644 --- a/ts/README.md +++ b/ts/README.md @@ -118,6 +118,11 @@ Everything the sync path (and, inside it, the async path) detects: (`userpassword`, `secretkey`, `accesskeyid`), or is exactly `pwd`, `otp`, `totp`, `pin`, `cvv`, `cvc`, `sig`, `jwt`, `pass`, `auth`. Words match as such or as a plural, so `secretary`, `passwordless`, `tokenizer`, `passThrough` and the Twilio `sid` stay. `isSecretKeyName(key)` is exported, and so is `keyVerdict(key)`: `'none'`, `'string'` (strings are replaced, numbers stay: `max_tokens`, `tokens`) or `'any'` (numbers too: `pin`, `password`). +- **Localized names and mnemonics**: Exact password names such as `Passwort`, `contraseña`, `mot de passe`, and + `пароль` are recognized in parsed JSON and strict text pairs. Mnemonic labels such as `mnemonic` and `seed phrase` + are recognized in both modes without `pii`. The bare `seed` key or label requires at least three leading BIP39 English words. + Maximal bare runs of exactly 12, 15, 18, 21 or 24 words are masked whole; longer, unsupported lengths are masked + only in checksum-valid windows. In `mode: 'strict'` the same key names also decide **text pairs** (`key: value`, `key=value`, `key => "value"`, `key := "value"`, also inside escaped JSON): a value under a key with an `any` verdict is redacted even when it is short @@ -129,7 +134,7 @@ of another (`auth: password: hunter2`, YAML parents) is found. Strict also redac and the whole `Bearer` credential up to whitespace or a quote (`Bearer abc!defghijklmnop`, also `Bearer "abc"`). A text or key of any length is scanned. **`strict` redacts at least everything 0.3.0 `strict` redacted**: the 0.3.0 pair rules still run (`password: required` is redacted, as before), the new pair rule is added to them; the one exception is the -separators `=>` and `:=`, where a stand-in value now stays. `compat` does none of this: its output is that of 0.2.0. +separators `=>` and `:=`, where a stand-in value now stays. `compat` does not apply the strict pair rules above. What a secret-named key does to the value below it: @@ -151,13 +156,15 @@ modes, also redacts, in prose and in JSON strings and keys: | rule id | what | stays | |---|---|---| | `email` | `person@example.com`, `A.B+tag@Example.CO.uk` | `react@18.2.0`, `icon@2x.png`, `user@localhost`, `pkg@1.2.3` | -| `phone` | `+44 20 7946 0958`, `+33.1.99.00.12.34`, `+493023125123`, `(415) 555-0123`, `415-555-0123`, `020 7946 0958`, `01 99 00 12 34` | `Request ID 1234567890`, `/devices/1234567890`, `2026-11-19 10:00:59`, `v0.3.0` | -| `ip` | IPv4 (`192.0.2.123`), IPv6 (`2001:db8::1`, `::ffff:abcd:1234`, `[fdab::cafe]:8080`); a port stays | `version 1.2.3.4`, `android 14.0.0.1`, `firmware 1.0.0.12`, `sdk 33.0.1.0`, `999.1.1.1`, `std::vector` | -| `otp` | the digits after a code noun (`Your verification code is 482913`, `OTP code: 482913`, `验证码 482913`) | `error code 5000`, `exit code 1370`, `status code 404`, `response code 200000`, `postal code 941031`, `port 8080` | +| `card` | `4111 1111 1111 1111` (13–19 digits, Luhn-valid), including `Order number: 4111111111111111` | Luhn-invalid numbers; `Invoice number: 4111111111111111` is excluded by the card rule | +| `iban` | `DE89 3704 0044 0532 0130 00`, `DE89370400440532013000` (known country length and valid checksum) | Same shape with a bad checksum | +| `phone` | `+44 20 7946 0958`, `004915123456789`, `(415) 555-0123`, `030 12345678`, `0151 23456789` | `Request ID 1234567890`, `/devices/1234567890`, `2026-11-19 10:00:59`, `v0.3.0` | +| `ip` | IPv4 (`192.0.2.123`), IPv6 (`2001:db8::1`, `fe80::1%en0`, `[fdab::cafe]:8080`); a port stays | `0.0.0.0:8080`, `version 1.2.3.4`, `android 14.0.0.1`, `999.1.1.1`, `std::vector` | +| `otp` | `Your code: 4821`, `G-482913 is your Google verification code`, `Tu código de verificación es 482913`, `Code: AB12CD` | `error code 5000`, `exit code 1370`, `status code 404`, `see code: main.ts`, `port 8080` | -The placeholders are `[REDACTED:email]`, `[REDACTED:phone]`, `[REDACTED:ip]` and `[REDACTED:otp]`. With the option a text of any +The placeholders use the rule ids in the table (for example, `[REDACTED:iban]`). With the option a text of any length is scanned (`a@b.xx`). Rules and limits (names, addresses, IDN emails, URL-encoded values and prose secrets such as -`password hunter2` are not detected) are in [`../spec/SPEC.md`](../spec/SPEC.md) sections 4.19 to 4.22 and 15. +`password hunter2` are not detected) are in [`../spec/SPEC.md`](../spec/SPEC.md) sections 4.19 to 4.24 and 15. `restoreRedacted` maps back keys redacted with the option. ### Sync API @@ -304,7 +311,16 @@ semantics are in [`../spec/SPEC.md`](../spec/SPEC.md). run (fail closed for the sync formats, documented gap for full-tier-only formats). - Short, unlabeled passwords in free text are not detected; a secret-named key provides the context to redact such a value (in `compat` only for values with evidence of being secret; in `strict` for any value, see - the key names above). A secret after a word and no separator (`the password hunter2`) is a known gap. + the key names above). `password hunter2`, `my password is hunter2`, and `login with bob / hunter2` are not detected. +- Raw text is not parsed as structured data. Secrets may remain in nested objects or arrays, next-line values, + triple-quoted strings, SQL-style doubled quotes, and unquoted multiword values such as + `password=correct horse battery staple`. Pass parsed JSON to `redactJsonValue` when available. +- URL-encoded assignments (`token%3Dhunter2`) and standalone base64 of `password=hunter2` are not decoded. + Scheme-less proxy credentials (`proxy u123:pw987@1.2.3.4:1080`) are not recognized; SOCKS URI usernames stay. + Non-ASCII addresses such as `person@例子.测试` are not recognized as emails. +- Bare mnemonic detection uses same-line BIP39 English word runs. A maximal run of exactly 12, 15, 18, 21 or + 24 words is masked whole without a checksum check, so ordinary prose can match. For longer runs of unsupported + lengths, only checksum-valid windows of those sizes are masked. - Keys are only scanned for secrets, not renamed otherwise; two keys that become the same placeholder collapse into one. - The sync path replaces a text or leaf over its limit whole; a restore cannot bring that back diff --git a/ts/src/algorithms/pairs.ts b/ts/src/algorithms/pairs.ts index 01a04a9..cd0ac17 100644 --- a/ts/src/algorithms/pairs.ts +++ b/ts/src/algorithms/pairs.ts @@ -15,10 +15,11 @@ import { hasValueEvidence, isDocPlaceholder, isTrivialValue } from './evidence.j import { guardedRunEnd, runClasses, type RunClasses } from './guarded-run.js'; import { isPlaceholderValue } from './placeholder-value.js'; import { labelStart, trimQueryValue } from './query-value.js'; -import { keyVerdict, type KeyVerdict } from '../key-names.js'; +import { exactKeyForm, isLocalizedPassword, isMnemonicKey, keyVerdict, type KeyVerdict } from '../key-names.js'; import { placeholderEndAt } from '../placeholder.js'; import type { Scanner } from './regex-rule.js'; -import { RULES_SPEC, type Rule } from '../spec.js'; +import { KEYS_SPEC, RULES_SPEC, type Rule } from '../spec.js'; +import { closingQuote } from './closing-quote.js'; type KeywordRule = Rule & { prefix: string; @@ -91,19 +92,6 @@ function realPairValues(text: string, ranges: Range[]): Range[] { }); } -/** Closing quote of a value that opened at `from`, or -1. `layers` is the number of - * escape backslashes before the opening quote (escaped JSON). */ -function closingQuote(text: string, from: number, quote: string, layers: number, limit: number): number { - for (let i = from; i < limit; i++) { - if (text[i] !== quote) continue; - let run = 0; - while (i - run - 1 >= from && text[i - run - 1] === '\\') run += 1; - const closes = layers === 0 ? run % 2 === 0 : run === layers; - if (closes) return i - run; - } - return -1; -} - /** An unterminated or over-long quoted value fails closed: redacted to the end of the text. */ export function prepareQuotedPairs(rule: QuotedRule): Scanner { const pattern = compile(rule.label, 'g'); @@ -169,18 +157,46 @@ function prepareKeptValue(rule: KeyPairsRule): KeptTest { } type KeyClasses = { gap: CharTest; quote: CharTest; key: CharTest }; +type TextKey = { range: Range; quote?: string; escaped: boolean }; const isBackslash = (unit: string): boolean => unit === '\\'; +const PASSWORD_TAILS = new Set(KEYS_SPEC.localizedPasswords.map((key) => key.split(/[ '’]/).at(-1))); /** The key that stands before the separator at `at`: spaces, an optional (escaped) quote, then up to `keyMax` * units of `keyChar`. `undefined` when no key stands there. */ -function keyBefore(text: string, at: number, classes: KeyClasses, keyMax: number): Range | undefined { +function keyBefore(text: string, at: number, classes: KeyClasses, keyMax: number): TextKey | undefined { let end = labelStart(text, at, classes.gap, Number.POSITIVE_INFINITY); - if (end > 0 && classes.quote(text[end - 1] as string)) { + const quote = end > 0 && classes.quote(text[end - 1] as string) ? text[end - 1] : undefined; + let escaped = false; + if (quote !== undefined) { + const quoteAt = end - 1; end = labelStart(text, end - 1, isBackslash, Number.POSITIVE_INFINITY); + escaped = end !== quoteAt; } const start = labelStart(text, end, classes.key, keyMax); - return start === end ? undefined : [start, end]; + return start === end ? undefined : { range: [start, end], quote, escaped }; +} + +/** Local aliases are exact within quotes and whole labels outside quotes; the last word gates the lookback. */ +function localizedPasswordBefore(text: string, key: TextKey, isKey: CharTest, keyMax: number): number | undefined { + const [start, end] = key.range; + if (key.escaped || !PASSWORD_TAILS.has(exactKeyForm(text.slice(start, end)))) return undefined; + const floor = Math.max(0, end - keyMax); + if (key.quote !== undefined) { + for (let at = end - 1; at >= floor - 1 && at >= 0; at -= 1) { + const unit = text[at]; + if (unit === key.quote) return isLocalizedPassword(text.slice(at + 1, end)) ? at + 1 : undefined; + if (unit === '\r' || unit === '\n' || unit === '\u2028' || unit === '\u2029') break; + } + return undefined; + } + let aliasStart: number | undefined; + for (let at = start; at >= floor; at -= 1) { + const before = text[at - 1]; + if (before !== undefined && (isKey(before) || before === "'" || before === '’')) continue; + if (isLocalizedPassword(text.slice(at, end))) aliasStart = at; + } + return aliasStart; } /** The end of a run is the same from every start inside it: the last run measured is remembered, so a text @@ -247,7 +263,11 @@ export function prepareKeyPairs(rule: KeyPairsRule): Scanner { const key = keyBefore(text, match.index, keyClasses, rule.keyMax); const from = pattern.lastIndex; if (key === undefined) continue; - const keyText = text.slice(key[0], key[1]); + const [startKey, endKey] = key.range; + const localized = localizedPasswordBefore(text, key, keyClasses.key, rule.keyMax); + const keyText = text.slice(localized ?? startKey, endKey); + // These exact names must not fall through to a suffix interpretation; the mnemonic scan owns seeds. + if (isMnemonicKey(keyText) || (localized === undefined && isLocalizedPassword(keyText))) continue; const verdict = keyVerdict(keyText); if (verdict === 'none') continue; const isQuoted = match[2] !== undefined; @@ -263,7 +283,7 @@ export function prepareKeyPairs(rule: KeyPairsRule): Scanner { pattern.lastIndex = match.index + 1; continue; } - const label = labelStart(text, key[0], isIdent, rule.labelLookback); + const label = labelStart(text, localized ?? startKey, isIdent, rule.labelLookback); const start = from; const stop = isQuoted ? end : queryValueEnd(text, nextAmp, label, [from, end]); const isSecret = stop > start && !isPlaceholderValue(text, start, stop); diff --git a/ts/src/algorithms/regex-rule.ts b/ts/src/algorithms/regex-rule.ts index 3c4fe6d..c72b102 100644 --- a/ts/src/algorithms/regex-rule.ts +++ b/ts/src/algorithms/regex-rule.ts @@ -25,11 +25,14 @@ type Filter = { ignoreStatusWords?: boolean; ignoreSuffixes?: string[]; ignoreAfterWords?: string[]; + ignoreAfterLabels?: string[]; afterGapClass?: string; ignoreBeforeClass?: string; ignoreAfterClass?: string; check?: string; minColons?: number; + numericEdges?: 'run' | 'code'; + ignoreDate?: boolean; }; type RegexRule = Rule & Filter & { @@ -40,19 +43,46 @@ type RegexRule = Rule & }; type CookieRule = Rule & Filter & { prefix: string; plainChar: string; escapeStop: string }; -/** The named checks a `regex` rule may ask for (SPEC 5.8); an unknown name stops the package at load. */ +/** The named checks a `regex` rule may ask for (SPEC 5.8–5.9); an unknown name stops the package at load. */ function prepareCheck(filter: Filter): (value: string) => boolean { if (filter.check === undefined) return () => true; if (filter.check === 'ipv6') return (value) => isIpv6(value, filter.minColons ?? 0); + if (filter.check === 'ipv6-zone') return (value) => isIpv6(value.slice(0, value.indexOf('%')), filter.minColons ?? 0); + if (filter.check === 'otp-alphanumeric') return (value) => /[0-9]/.test(value); + if (filter.check === 'luhn') { + return (value) => { + let sum = 0; + let doubled = false; + for (let i = value.length - 1; i >= 0; i -= 1) { + const digit = value.charCodeAt(i) - 48; + if (digit < 0 || digit > 9) continue; + const term = doubled ? 2 * digit : digit; + sum += term > 9 ? term - 9 : term; + doubled = !doubled; + } + return sum % 10 === 0; + }; + } throw new Error('unknown check in the spec'); } /** True when the word before the match is one of the listed words (SPEC 4.1 `ignoreAfterWords`). */ function prepareContext(filter: Filter): (text: string, matchStart: number) => boolean { const words = filter.ignoreAfterWords; - if (words === undefined) return () => false; + const labels = filter.ignoreAfterLabels; + if (words === undefined && labels === undefined) return () => false; const isGap = filter.afterGapClass === undefined ? () => false : charTest(filter.afterGapClass); - return (text, matchStart) => words.includes(wordBefore(text, matchStart, isGap)); + return (text, matchStart) => { + if (words?.includes(wordBefore(text, matchStart, isGap))) return true; + if (labels === undefined) return false; + let end = matchStart; + while (end > 0 && matchStart - end < 64 && /[ \t:=#]/.test(text[end - 1]!)) end -= 1; + return labels.some((label) => { + const start = end - label.length; + return start >= 0 && (start === 0 || !/[A-Za-z0-9_]/.test(text[start - 1]!)) + && foldLower(text.slice(start, end)) === label; + }); + }; } /** True when the lower-cased candidate ends with one of the listed literals (SPEC 4.1 `ignoreSuffixes`). */ @@ -78,6 +108,23 @@ function prepareEdges(filter: Filter): (text: string, matchStart: number, matchE }; } +/** Do not match the first or last group of a longer numeric identifier, date, time or version. */ +function numericFragment(text: string, start: number, end: number, mode: Filter['numericEdges']): boolean { + if (mode === undefined) return false; + const before = text[start - 1] ?? ''; + const after = text[end] ?? ''; + const digitBefore = /[0-9]/.test(text[start - 2] ?? ''); + const digitAfter = /[0-9]/.test(text[end + 1] ?? ''); + if (mode === 'run') { + return /[+.-]/.test(before) || (before === ' ' && digitBefore) || (/[ .-]/.test(after) && digitAfter); + } + return (/[-./:]/.test(before) && digitBefore) || (/[-./:]/.test(after) && digitAfter); +} + +const COMPACT_DATE = /^(?:19|20)[0-9]{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12][0-9]|3[01])$/; +const DATE_YEAR = /^(?:19|20)[0-9]{2}$/; +const DATE_TAIL = /^(?:-(?:0[1-9]|1[0-2])-|\/(?:0[1-9]|1[0-2])\/|\.(?:0[1-9]|1[0-2])\.)(?:0[1-9]|[12][0-9]|3[01])/; + function prepareFilter(filter: Filter): (text: string, candidate: Candidate) => boolean { const hasClass = filter.requireClass === undefined ? () => true : containsTest(filter.requireClass); const passesCheck = prepareCheck(filter); @@ -93,6 +140,14 @@ function prepareFilter(filter: Filter): (text: string, candidate: Candidate) => if (hasIgnoredSuffix(value)) return false; if (hasIgnoredContext(text, matchStart)) return false; if (isPiece(text, matchStart, matchEnd)) return false; + if (numericFragment(text, start, end, filter.numericEdges)) return false; + if (filter.ignoreDate === true) { + // The optional in-capture SMS prefix changes the mask, not the date test. + const code = value.replace(/^[Gg]-/, ''); + if (COMPACT_DATE.test(code) || (DATE_YEAR.test(code) && DATE_TAIL.test(text.slice(end, end + 6)))) { + return false; + } + } if (!passesCheck(value)) return false; return !(filter.dropPlaceholder === true && isPlaceholderValue(text, start, end)); }; diff --git a/ts/src/full-rules.ts b/ts/src/full-rules.ts index 84d8404..bcfd828 100644 --- a/ts/src/full-rules.ts +++ b/ts/src/full-rules.ts @@ -6,7 +6,7 @@ */ import { FULL_KINDS } from './algorithms/full-registry.js'; import { collectHits, prepareRules } from './algorithms/registry.js'; -import { dedupeRanges, type Hit } from './hits.js'; +import type { Hit } from './hits.js'; import { registerFullKeyDetectors } from './key-detectors.js'; import { ALGORITHMS_SPEC, RULES_SPEC } from './spec.js'; import { detectSyncHits, scanFloor, type DetectOpts } from './sync-rules.js'; @@ -29,7 +29,7 @@ export function withLegacyId(hit: Hit): Hit { * the standard rules, no windows (a key is at most `sync.maxKeyChars` long). */ export function detectFullTierKeyHits(key: string, opts: DetectOpts = {}): Hit[] { if (key.length < scanFloor(opts)) return []; - return dedupeRanges([...detectFullHits(key).map(withLegacyId), ...detectSyncHits(key, opts)]); + return detectSyncHits(key, opts, detectFullHits(key).map(withLegacyId)); } registerFullKeyDetectors((opts) => (key) => detectFullTierKeyHits(key, opts)); diff --git a/ts/src/golden.test.ts b/ts/src/golden.test.ts index b524bcd..4a977f4 100644 --- a/ts/src/golden.test.ts +++ b/ts/src/golden.test.ts @@ -18,7 +18,7 @@ import { readFileSync } from 'node:fs'; import { join } from 'node:path'; import { gunzipSync } from 'node:zlib'; import { runBehaviors } from '../../tools/corpus/behaviors.ts'; -import { replayCase } from '../../tools/corpus/replay.ts'; +import { replayCase, summarize } from '../../tools/corpus/replay.ts'; import type { GoldenFile } from '../../tools/corpus/types.ts'; import * as api from './index.js'; @@ -70,6 +70,8 @@ const KEY_CASES = [ /** Same key, same value; only the hit ids differ (a full-tier hit wins the tie and carries its 0.2.0 id). */ const HIT_ID_CASES = ['sample-29', 'sample-41', 'sample-44', 'sample-47', 'sample-50']; +// Repeated "tail" contains checksum-valid BIP39 windows (SPEC 4.25). +const MNEMONIC_WINDOW_CASES = [0, 1, 2, 3, 4, 5, 6].map((at) => `large-window-${at}`); /** Keys that redact to one key: the numbering rule numbers the later ones, the recorded output lost values. */ const COLLISION_CASES = [ @@ -169,13 +171,28 @@ test('every corpus case gives the recorded result, but the AWS correction and th expectCollisionCase(...pair); continue; } + if (MNEMONIC_WINDOW_CASES.includes(item.id)) { + const [[space, spaces], [token], [tail, repeats]] = item.gen!.parts as [ + [string, number], [string, number], [string, number], + ]; + expect([space, tail, repeats]).toEqual([' ', ' tail ', 20_000]); + const start = spaces + token.length + 1; + const hit: [string, number, number] = ['mnemonic', start, start + tail.length * repeats - 2]; + const prefix = ' '.repeat(spaces); + expect(now.sync).toEqual({ out: summarize(`${prefix}${token} [REDACTED:mnemonic] `), hits: [hit] }); + expect(now.async).toEqual({ + out: summarize(`${prefix}[REDACTED:npm] [REDACTED:mnemonic] `), + hits: [['@secretlint/secretlint-rule-npm', spaces, spaces + token.length], hit], + }); + continue; + } const expected = AWS_CORRECTION[item.id as keyof typeof AWS_CORRECTION]; expect(item.input).toBe(expected?.input); expect(item.async.out).toBe(expected?.recordedOut); expect(JSON.stringify(now.sync)).toBe(JSON.stringify(item.sync)); expect(now.async as unknown).toEqual({ out: expected?.out, hits: expected?.hits }); } - const listed = [...Object.keys(AWS_CORRECTION), ...HIT_ID_CASES, ...KEY_CASES, ...COLLISION_CASES]; + const listed = [...Object.keys(AWS_CORRECTION), ...HIT_ID_CASES, ...KEY_CASES, ...COLLISION_CASES, ...MNEMONIC_WINDOW_CASES]; expect([...differing].sort()).toEqual([...listed].sort()); }, 120_000); From aead5ab03248bb331f8a87408743cf4076af0748 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:14:49 +0100 Subject: [PATCH 05/30] fix(redaction): MCP gap rules, part 7 (DRO-4114) --- go/rules_iban.go | 89 + go/rules_mnemonic.go | 242 ++ go/rules_numeric.go | 65 + python/src/droidrun_redaction/_bip39.py | 23 + python/src/droidrun_redaction/_iban.py | 56 + python/src/droidrun_redaction/_mnemonic.py | 110 + ts/src/key-names.ts | 29 +- ts/src/perf.test.ts | 10 +- ts/src/redact-sync.ts | 2 +- ts/src/redact-text.ts | 4 +- ts/src/redact-value.ts | 2 +- ts/src/spec-data.generated.ts | 2475 +++++++++++++++++++- ts/src/spec.ts | 4 + ts/src/strict.ts | 3 +- ts/src/sync-rules.ts | 74 +- 15 files changed, 3165 insertions(+), 23 deletions(-) create mode 100644 go/rules_iban.go create mode 100644 go/rules_mnemonic.go create mode 100644 go/rules_numeric.go create mode 100644 python/src/droidrun_redaction/_bip39.py create mode 100644 python/src/droidrun_redaction/_iban.py create mode 100644 python/src/droidrun_redaction/_mnemonic.py diff --git a/go/rules_iban.go b/go/rules_iban.go new file mode 100644 index 0000000..a39fca2 --- /dev/null +++ b/go/rules_iban.go @@ -0,0 +1,89 @@ +package redaction + +import "encoding/json" + +type ibanRule struct { + lead *searcher + lengths map[string]int +} + +type ibanShape struct { + span + valid bool +} + +func (e *engine) newIBAN(b *builder, raw json.RawMessage) (*ibanRule, error) { + var spec struct { + Pattern string `json:"pattern"` + } + if err := decodeRule(raw, &spec); err != nil { + return nil, err + } + return &ibanRule{lead: b.searcher(spec.Pattern), lengths: e.spec.algorithms.IBANLengths}, b.err +} + +// scan returns all structural envelopes, even if the checksum fails (SPEC 4.24). +func (r *ibanRule) scan(t *text) []ibanShape { + var shapes []ibanShape + for from := 0; ; { + loc := r.lead.find(t, from) + if loc == nil { + return shapes + } + start, end := loc[0], loc[1] + from = end + if start > 0 && (t.units[start-1] == '-' || t.units[start-1] == '.') { + continue + } + country := [2]byte{byte(t.units[start]) &^ 0x20, byte(t.units[start+1]) &^ 0x20} + length := r.lengths[string(country[:])] + if length == 0 { + continue + } + spaced := end < t.length() && t.units[end] == ' ' + size := 4 + for size < length && end < t.length() { + if spaced && size%4 == 0 { + if t.units[end] != ' ' || end+1 == t.length() { + break + } + end++ + } + if unit := t.units[end]; !asciiLetters.has(unit) && !digitSet.has(unit) { + break + } + end++ + size++ + } + if size != length { + continue + } + if end < t.length() { + unit := t.units[end] + if asciiLetters.has(unit) || digitSet.has(unit) || unit == '_' { + continue + } + } + valid := validIBAN(t.units[start:end]) + shapes = append(shapes, ibanShape{span{start, end}, valid}) + } +} + +func validIBAN(shape []uint16) bool { + check := 10*(shape[2]-'0') + shape[3] - '0' + if check < 2 || check > 98 { + return false + } + remainder := 0 + for _, part := range [2][]uint16{shape[4:], shape[:4]} { + for _, unit := range part { + switch { + case digitSet.has(unit): + remainder = (10*remainder + int(unit-'0')) % 97 + case unit != ' ': + remainder = (100*remainder + int((unit|0x20)-'a') + 10) % 97 + } + } + } + return remainder == 1 +} diff --git a/go/rules_mnemonic.go b/go/rules_mnemonic.go new file mode 100644 index 0000000..68d0ed1 --- /dev/null +++ b/go/rules_mnemonic.go @@ -0,0 +1,242 @@ +package redaction + +import ( + "crypto/sha256" + "encoding/json" + "strings" +) + +type mnemonicRule struct { + id string + label *searcher + token *unitSet + lineBreak, gap *unitSet + blocksBefore *unitSet + words map[string]int + counts []int + minCount int + minWord, maxWord int + minPhrase int + placeholders *placeholders +} + +func (e *engine) newMnemonic(b *builder, raw json.RawMessage) (*mnemonicRule, error) { + var spec struct { + ID string `json:"id"` + Label string `json:"label"` + Pattern string `json:"pattern"` + LineEnd string `json:"lineEnd"` + GapClass string `json:"gapClass"` + IgnoreBeforeClass string `json:"ignoreBeforeClass"` + } + if err := decodeRule(raw, &spec); err != nil { + return nil, err + } + // This pattern tokenizes maximal identifier runs. Scan the class directly, with no + // regexp restart or submatch allocation for each word in an ordinary log line. + tokenClass, ok := strings.CutSuffix(b.pattern(spec.Pattern), "+") + if !ok { + return nil, errSpecRejected + } + data := e.spec.algorithms.Mnemonic + r := &mnemonicRule{ + id: spec.ID, + label: b.searcher(spec.Label), token: b.class(tokenClass), lineBreak: b.class(spec.LineEnd), + gap: b.class(spec.GapClass), blocksBefore: b.class(spec.IgnoreBeforeClass), + words: make(map[string]int, len(data.Words)), counts: data.Counts, minWord: unbounded, minCount: unbounded, + placeholders: e.placeholders, + } + for _, count := range data.Counts { + r.minCount = min(r.minCount, count) + } + for index, word := range data.Words { + r.words[word] = index + r.minWord = min(r.minWord, len(word)) + r.maxWord = max(r.maxWord, len(word)) + } + if len(data.Words) == 0 || len(data.Counts) == 0 { + return nil, errSpecRejected + } + r.minPhrase = r.minCount*(r.minWord+1) - 1 + return r, b.err +} + +// Only ASCII units can be tokens or gaps, so a UTF-8 byte is also safe here: +// a non-ASCII byte stops the prefix just like a non-ASCII UTF-16 unit. +func (r *mnemonicRule) beginsWithWords(length, maxPrefix int, unitAt func(int) uint16) bool { + var buffer [8]uint16 + end := min(length, maxPrefix) + at := 0 + for i := 0; i < 3; i++ { + gapStart := at + for at < end && r.gap.has(unitAt(at)) { + at++ + } + if i > 0 && at == gapStart { + return false + } + word := buffer[:0] + for at < end { + unit := unitAt(at) + if !r.token.has(unit) { + break + } + if len(word) == r.maxWord { + return false + } + word = append(word, unit) + at++ + } + // A budget boundary is not a token boundary. + if len(word) < r.minWord || (at == end && end < length) { + return false + } + if _, ok := r.words[foldString(word)]; !ok { + return false + } + } + return true +} + +func validBIP39Checksum(words []int) bool { + checksum := len(words) / 3 + bits := 11*len(words) - checksum + var entropy [32]byte + for bit := 0; bit < bits; bit++ { + entropy[bit/8] |= byte((words[bit/11]>>(10-bit%11))&1) << (7 - bit%8) + } + digest := sha256.Sum256(entropy[:bits/8]) + return int(digest[0]>>(8-checksum)) == words[len(words)-1]&((1< lineEnd { + break + } + start = next + } + if isSeed && !r.beginsWithWords(lineEnd-start, unbounded, func(at int) uint16 { return t.units[start+at] }) { + continue + } + limit := lineEnd + if loc[0] > 0 && (t.units[loc[0]-1] == '?' || t.units[loc[0]-1] == '&') { + if queryEnd < start { + queryEnd = start + for queryEnd < limit && t.units[queryEnd] != '&' && t.units[queryEnd] != '#' { + queryEnd++ + } + } + limit = queryEnd + } + close := -1 + if loc[4] >= 0 { + close = closingQuote(t.units, start, t.units[loc[4]], 0, limit) + } + end := limit + if close >= 0 { + end = close + } + if close < 0 { + for at := start; at < end; at++ { + switch t.units[at] { + case ',', '}', ']', ';': + end = at + } + } + } + if start < end && runEnd(t.units, start, r.gap, end-start) < end { + found = append(found, span{start, end}) + from = end + } + } + if t.length() < r.minPhrase { + return found + } + if len(selected) != 0 || len(found) != 0 { + units := append([]uint16(nil), t.units...) + for _, h := range selected { + clear(units[h.start:h.end]) + } + for _, s := range found { + clear(units[s.start:s.end]) + } + t = newText(units) + } + var words []int + var spans []span + flush := func() { + for _, count := range r.counts { + if len(words) == count { + found = append(found, span{spans[0].start, spans[len(spans)-1].end}) + words, spans = words[:0], spans[:0] + return + } + } + for at := 0; at+r.minCount <= len(words); at++ { + for _, count := range r.counts { + if at+count <= len(words) && validBIP39Checksum(words[at:at+count]) { + found = append(found, span{spans[at].start, spans[at+count-1].end}) + } + } + } + words, spans = words[:0], spans[:0] + } + folded := t.foldedText() + for at := 0; at < t.length(); { + if !r.token.has(t.units[at]) { + at++ + continue + } + next := runEnd(t.units, at, r.token, unbounded) + length := next - at + var index int + var listed bool + if length >= r.minWord && length <= r.maxWord { + index, listed = r.words[folded[t.byteAt(at):t.byteAt(next)]] + } + if len(spans) > 0 && (!listed || runEnd(t.units, spans[len(spans)-1].end, r.gap, at-spans[len(spans)-1].end) != at) { + flush() + } + if listed { + words = append(words, index) + spans = append(spans, span{at, next}) + } + at = next + } + flush() + return found +} diff --git a/go/rules_numeric.go b/go/rules_numeric.go new file mode 100644 index 0000000..07238b7 --- /dev/null +++ b/go/rules_numeric.go @@ -0,0 +1,65 @@ +package redaction + +import "slices" + +func luhn(value []uint16) bool { + sum, doubled := 0, false + for _, unit := range slices.Backward(value) { + if !digitSet.has(unit) { + continue + } + n := int(unit - '0') + if doubled { + n *= 2 + if n > 9 { + n -= 9 + } + } + sum += n + doubled = !doubled + } + return sum%10 == 0 +} + +func numericFragment(units []uint16, value span, mode string) bool { + var before, after uint16 + if value.start > 0 { + before = units[value.start-1] + } + if value.end < len(units) { + after = units[value.end] + } + digitBefore := digitSet.hasAt(units, value.start-2) + digitAfter := digitSet.hasAt(units, value.end+1) + if mode == "run" { + return before == '+' || before == '.' || before == '-' || (before == ' ' && digitBefore) || + ((after == ' ' || after == '.' || after == '-') && digitAfter) + } + separator := func(unit uint16) bool { return unit == '-' || unit == '.' || unit == '/' || unit == ':' } + return (separator(before) && digitBefore) || (separator(after) && digitAfter) +} + +func calendarDate(value, tail []uint16) bool { + if len(value) >= 2 && value[0]|0x20 == 'g' && value[1] == '-' { + value = value[2:] + } + if len(value) != 4 && len(value) != 8 { + return false + } + if !((value[0] == '1' && value[1] == '9') || (value[0] == '2' && value[1] == '0')) || + !digitSet.has(value[2]) || !digitSet.has(value[3]) { + return false + } + monthDay := func(month, day []uint16) bool { + if !digitSet.has(month[0]) || !digitSet.has(month[1]) || !digitSet.has(day[0]) || !digitSet.has(day[1]) { + return false + } + m, d := 10*(month[0]-'0')+month[1]-'0', 10*(day[0]-'0')+day[1]-'0' + return 1 <= m && m <= 12 && 1 <= d && d <= 31 + } + if len(value) == 8 { + return monthDay(value[4:6], value[6:8]) + } + return len(tail) >= 6 && (tail[0] == '-' || tail[0] == '/' || tail[0] == '.') && + tail[0] == tail[3] && monthDay(tail[1:3], tail[4:6]) +} diff --git a/python/src/droidrun_redaction/_bip39.py b/python/src/droidrun_redaction/_bip39.py new file mode 100644 index 0000000..0d3cf5c --- /dev/null +++ b/python/src/droidrun_redaction/_bip39.py @@ -0,0 +1,23 @@ +"""Word lookup and checksum for the pinned English BIP39 list (SPEC 4.25).""" + +import re +from hashlib import sha256 + +from ._spec import ALGORITHMS + +WORDS = {word: index for index, word in enumerate(ALGORITHMS["mnemonic"]["words"])} +_PREFIX = re.compile(r"[ \t]*([A-Za-z]{3,8})[ \t]+([A-Za-z]{3,8})[ \t]+([A-Za-z]{3,8})(?![A-Za-z0-9_])") + + +def begins_with_bip39_words(value: str, start: int = 0) -> bool: + match = _PREFIX.match(value, start) + return match is not None and all(word.lower() in WORDS for word in match.groups()) + + +def valid_bip39_checksum(words: list[int], start: int, count: int) -> bool: + bits = 0 + for index in range(start, start + count): + bits = (bits << 11) | words[index] + checksum = count // 3 + entropy = (bits >> checksum).to_bytes((count * 11 - checksum) // 8, "big") + return sha256(entropy).digest()[0] >> (8 - checksum) == bits & ((1 << checksum) - 1) diff --git a/python/src/droidrun_redaction/_iban.py b/python/src/droidrun_redaction/_iban.py new file mode 100644 index 0000000..f45f830 --- /dev/null +++ b/python/src/droidrun_redaction/_iban.py @@ -0,0 +1,56 @@ +"""IBAN shape and checksum scanner (SPEC 4.24).""" + +from collections.abc import Callable +from typing import Any + +from ._patterns import Range, compile_pattern +from ._runs import is_ascii_letter +from ._spec import ALGORITHMS + +IbanScanner = Callable[[str], list[tuple[Range, bool]]] + + +def prepare_iban(rule: dict[str, Any]) -> IbanScanner: + """Return country-length shapes and whether each passes mod-97 (SPEC 4.24).""" + lead = compile_pattern(rule["pattern"]) + lengths = ALGORITHMS["ibanLengths"] + + def scan(text: str) -> list[tuple[Range, bool]]: + shapes: list[tuple[Range, bool]] = [] + position = 0 + while (match := lead.search(text, position)) is not None: + start, end = match.span() + position = end + if start and text[start - 1] in ("-", "."): + continue + compact = match.group().upper() + length = lengths.get(compact[:2]) + if length is None: + continue + spaced = text[end : end + 1] == " " + while len(compact) < length: + if spaced and len(compact) % 4 == 0: + if text[end : end + 1] != " ": + break + end += 1 + if end >= len(text): + break + unit = text[end] + if not (is_ascii_letter(unit) or "0" <= unit <= "9"): + break + compact += unit.upper() + end += 1 + if len(compact) != length: + continue + if end < len(text) and (is_ascii_letter(text[end]) or "0" <= text[end] <= "9" or text[end] == "_"): + continue + check = int(compact[2:4]) + remainder = 0 + for unit in compact[4:] + compact[:4]: + code = ord(unit) + remainder = (100 * remainder + code - 55 if code >= 65 else 10 * remainder + code - 48) % 97 + valid = 2 <= check <= 98 and remainder == 1 + shapes.append(((start, end), valid)) + return shapes + + return scan diff --git a/python/src/droidrun_redaction/_mnemonic.py b/python/src/droidrun_redaction/_mnemonic.py new file mode 100644 index 0000000..ae0b71e --- /dev/null +++ b/python/src/droidrun_redaction/_mnemonic.py @@ -0,0 +1,110 @@ +"""Keyed and bare BIP39 mnemonic scanner (SPEC 4.25).""" + +import re +from collections.abc import Callable +from typing import Any + +from ._bip39 import WORDS as BIP39_WORDS, begins_with_bip39_words, valid_bip39_checksum +from ._patterns import Range, char_test, compile_pattern, fold_lower, run_end, run_pattern, search_from +from ._placeholder import placeholder_end_at +from ._runs import closing_quote +from ._spec import ALGORITHMS + +_MNEMONIC_DELIMITER = re.compile(r"[,}\];]") +_MNEMONIC_QUERY_END = re.compile(r"[&#]") + + +def prepare_mnemonic(rule: dict[str, Any]) -> Callable[[str, tuple[Range, ...]], list[Range]]: + """Keyed mnemonic values followed by maximal same-line BIP39 runs (SPEC 4.25).""" + label = compile_pattern(rule["label"]) + token = compile_pattern(rule["pattern"]) + newline = compile_pattern(rule["lineEnd"]) + gap = run_pattern(rule["gapClass"]) + blocks_before = char_test(rule["ignoreBeforeClass"]) + counts = frozenset(ALGORITHMS["mnemonic"]["counts"]) + min_word, max_word = min(map(len, BIP39_WORDS)), max(map(len, BIP39_WORDS)) + min_count = min(counts) + min_phrase = min_count * (min_word + 1) - 1 + + def scan(text: str, selected: tuple[Range, ...]) -> list[Range]: + ranges: list[Range] = [] + line_end = -1 + query_end = -1 + next_selected = 0 + position = 0 + while (match := search_from(label, text, position)) is not None: + position = start = match.end() + if match.start() and blocks_before(text[match.start() - 1]): + continue + if line_end < start: + line_break = newline.search(text, start) + line_end = line_break.start() if line_break is not None else len(text) + seed = fold_lower(match.group(1)) in ("seed", '"seed"', "'seed'") + while True: + next_start = placeholder_end_at(text, start) + if seed: + while next_selected < len(selected) and selected[next_selected][1] <= start: + next_selected += 1 + if next_selected < len(selected): + left, right = selected[next_selected] + if left == start and right <= line_end: + next_start = max(next_start, right) + if next_start == -1 or next_start > line_end: + break + start = next_start + if seed and not begins_with_bip39_words(text, start): + continue + limit = line_end + if match.start() and text[match.start() - 1] in "?&": + if query_end < start: + delimiter = _MNEMONIC_QUERY_END.search(text, start, line_end) + query_end = delimiter.start() if delimiter is not None else line_end + limit = query_end + quote = match.group(2) + closing = closing_quote(text, start, quote, 0, limit) if quote is not None else None + end = limit if closing is None else closing[0] - closing[1] + if closing is None and (delimiter := _MNEMONIC_DELIMITER.search(text, start, end)) is not None: + end = delimiter.start() + if start < end and run_end(gap, text, start, end - start) < end: + ranges.append((start, end)) + position = end + + if len(text) < min_phrase: + return ranges + if selected or ranges: + parts: list[str] = [] + cursor = 0 + for start, end in sorted((*selected, *ranges)): + if end <= cursor: + continue + start = max(start, cursor) + parts.extend((text[cursor:start], "\0" * (end - start))) + cursor = end + parts.append(text[cursor:]) + text = "".join(parts) + words: list[int] = [] + spans: list[Range] = [] + + def flush() -> None: + if len(words) in counts: + ranges.append((spans[0][0], spans[-1][1])) + elif len(words) > min_count: + for start in range(len(words) - min_count + 1): + for count in counts: + if start + count <= len(words) and valid_bip39_checksum(words, start, count): + ranges.append((spans[start][0], spans[start + count - 1][1])) + words.clear() + spans.clear() + + for match in token.finditer(text): + token_start, token_end = match.span() + index = BIP39_WORDS.get(fold_lower(match.group())) if min_word <= token_end - token_start <= max_word else None + if spans and (index is None or run_end(gap, text, spans[-1][1], token_start - spans[-1][1]) != token_start): + flush() + if index is not None: + words.append(index) + spans.append((token_start, token_end)) + flush() + return ranges + + return scan diff --git a/ts/src/key-names.ts b/ts/src/key-names.ts index 304c3ac..9845403 100644 --- a/ts/src/key-names.ts +++ b/ts/src/key-names.ts @@ -17,6 +17,7 @@ * Containers under a secret key are walked, never replaced wholesale. */ import { splitKeyWords } from './algorithms/key-words.js'; +import { beginsWithBip39Words } from './algorithms/bip39.js'; import { foldLower } from './portable.js'; import { buildReadPlaceholder, literalSegments, PLACEHOLDER_RE } from './placeholder.js'; import { ALGORITHMS_SPEC, KEYS_SPEC } from './spec.js'; @@ -46,6 +47,28 @@ const JOINED_SECRET_WORDS = new Set([ ...KEYS_SPEC.joinedExtra, ]); const COUNT_WORDS = new Set(KEYS_SPEC.countWords); +const LOCALIZED_PASSWORDS = new Set(KEYS_SPEC.localizedPasswords); +const MNEMONIC_KEYS = new Set(KEYS_SPEC.mnemonicKeys); +const MAX_EXACT_KEY_UNITS = 2 * Math.max(...[...LOCALIZED_PASSWORDS, ...MNEMONIC_KEYS].map((key) => key.length)); + +export function exactKeyForm(key: string): string { + // SPEC 6: longer keys cannot match, and canonical ordering can be quadratic. + if (key.length > MAX_EXACT_KEY_UNITS) return ''; + return key.normalize('NFC').replace(/[A-ZÑŁŞÖА-Яİ]/g, (char) => char === 'İ' ? 'i' : char.toLowerCase()); +} + +export function isLocalizedPassword(key: string): boolean { + return LOCALIZED_PASSWORDS.has(exactKeyForm(key)); +} + +export function isMnemonicKey(key: string): boolean { + return MNEMONIC_KEYS.has(exactKeyForm(key)); +} + +function isNewExactKey(key: string): boolean { + const form = exactKeyForm(key); + return LOCALIZED_PASSWORDS.has(form) || MNEMONIC_KEYS.has(form); +} function matchesWord(word: string | undefined, expected: string, plural: boolean): boolean { return word === expected || (plural && word === `${expected}s`); @@ -82,16 +105,18 @@ function matchKey(key: string, plural: boolean): boolean { /** True for names such as `apiKey`, `client_secret`, `DB-PASSWORD`, `x-auth-token`, * `Set-Cookie`, `Proxy-Authorization`, `cardNumber`, `MYSQL_PWD`, `pin`, `tokens`. */ export function isSecretKeyName(key: string): boolean { - return matchKey(key, true); + return isNewExactKey(key) || matchKey(key, true); } export type KeyVerdict = 'none' | 'string' | 'any'; /** What a key makes of the values below it: nothing, strings, or strings and numbers. */ -export function keyVerdict(rawKey: string): KeyVerdict { +export function keyVerdict(rawKey: string, value?: unknown): KeyVerdict { // A key that was redacted (it held a secret) is classified without its placeholders, // so a second pass gives the same verdict as the first. const key = rawKey.includes('[REDACTED') ? literalSegments(rawKey).join(' ') : rawKey; + if (key.length === 4 && foldLower(key) === 'seed' && typeof value === 'string' && beginsWithBip39Words(value)) return 'string'; + if (isNewExactKey(key)) return 'any'; if (!matchKey(key, true)) return 'none'; if (!matchKey(key, false)) return 'string'; return splitKeyWords(key).some((word) => COUNT_WORDS.has(word)) ? 'string' : 'any'; diff --git a/ts/src/perf.test.ts b/ts/src/perf.test.ts index a748490..9b5201e 100644 --- a/ts/src/perf.test.ts +++ b/ts/src/perf.test.ts @@ -9,7 +9,7 @@ * The median of five runs is compared, not the best or the worst. */ import { expect, test } from 'bun:test'; -import { redactJsonValue, redactJsonValueSync } from './index.js'; +import { isSecretKeyName, redactJsonValue, redactJsonValueSync } from './index.js'; import { buildActions } from './perf.fixture.js'; const ITEMS = 1_000; @@ -59,3 +59,11 @@ test('the fixture really holds secrets and both paths remove them', async () => expect(text).toContain('[REDACTED:'); } }); + +test('rejects a long non-alias key without expensive canonical ordering', () => { + // The second combining-mark run sorts before the first in NFC. + const key = 'x' + '\u0315'.repeat(20_000) + '\u0300'.repeat(20_000); + const started = performance.now(); + expect(isSecretKeyName(key)).toBe(false); + expect(performance.now() - started).toBeLessThan(1_000); +}, 15_000); diff --git a/ts/src/redact-sync.ts b/ts/src/redact-sync.ts index 7dedca3..3b15c85 100644 --- a/ts/src/redact-sync.ts +++ b/ts/src/redact-sync.ts @@ -140,7 +140,7 @@ function walkEntries( placeKey(out, placer, outKey, outKey !== key, child); continue; } - const childVerdict = strongerVerdict(verdict, keyVerdict(key)); + const childVerdict = strongerVerdict(verdict, keyVerdict(key, child)); placeKey(out, placer, outKey, outKey !== key, walk(child, depth + 1, childVerdict, state)); } return out; diff --git a/ts/src/redact-text.ts b/ts/src/redact-text.ts index f9ef70c..f023c3c 100644 --- a/ts/src/redact-text.ts +++ b/ts/src/redact-text.ts @@ -35,7 +35,7 @@ export type RedactTextOpts = { /** Use the 0.1.1 placeholder `[REDACTED::]` for matches of at least * 16 characters. Default: `[REDACTED:]`, which exposes nothing of the secret. */ last4?: boolean; - /** Also redact emails, phone numbers, IP addresses and OTP codes in prose (the `pii` rule group of the + /** Also redact emails, card numbers, IBANs, phones, IP addresses and OTP codes in prose (the `pii` group of the * spec). Default false. */ pii?: boolean; /** Overrides the detector. */ @@ -71,7 +71,7 @@ export async function detectSecrets(text: string, opts: RedactTextOpts = {}): Pr } const scanned = capped ? text.slice(0, MAX_TOTAL_SCAN_LEN) : text; const detect = { mode: opts.mode, pii: opts.pii }; - return dedupeRanges([...scanWindows(scanned).map(withLegacyId), ...detectSyncHits(text, detect)]); + return detectSyncHits(text, detect, scanWindows(scanned).map(withLegacyId)); } /** The full-tier rules over `text` (already capped), in windows when long. */ diff --git a/ts/src/redact-value.ts b/ts/src/redact-value.ts index 3b23aff..a34564c 100644 --- a/ts/src/redact-value.ts +++ b/ts/src/redact-value.ts @@ -177,7 +177,7 @@ async function visitEntries( placeKey(out, placer, outKey, changed, child); continue; } - const childVerdict = strongerVerdict(verdict, keyVerdict(key)); + const childVerdict = strongerVerdict(verdict, keyVerdict(key, child)); placeKey(out, placer, outKey, changed, await visit(child, stats, opts, childVerdict)); } return out; diff --git a/ts/src/spec-data.generated.ts b/ts/src/spec-data.generated.ts index edf08cc..3c6ba35 100644 --- a/ts/src/spec-data.generated.ts +++ b/ts/src/spec-data.generated.ts @@ -1,5 +1,5 @@ // Generated by tools/sync-spec.ts from spec/*.json — do not edit. -export const SPEC_HASH = '99806c43cc0ea49beccff2e5a79b76b7ef0ca959fa308c8a4e5c7f5a1ef15e1d'; +export const SPEC_HASH = '91bc1cc4d6ea2af92a56aa7fab8c48eefac29847ad536bb715f22d3e7efea011'; export const RULES_DATA: unknown = { "specVersion": 1, @@ -41,6 +41,127 @@ export const RULES_DATA: unknown = { "DQ_UNIT": "(?:[^\"\\\\\r\n]|\\\\[^\r\n])", "SQ_UNIT": "(?:[^'\\\\\r\n]|\\\\[^\r\n])", "BARE_VALUE": "[^{{WS}},;\"'{}\\[\\]\\\\]+", + "MNEMONIC_KEY": { + "join": " ", + "words": [ + [ + "mnemonic", + "phrase" + ], + [ + "recovery", + "phrase" + ], + [ + "seed", + "phrase" + ], + [ + "mnemonic" + ], + [ + "seed" + ] + ] + }, + "OTP_BRAND": { + "join": "", + "words": [ + [ + "google" + ], + [ + "instagram" + ], + [ + "telegram" + ], + [ + "uber" + ], + [ + "whatsapp" + ] + ] + }, + "OTP_YOUR": { + "join": "", + "words": [ + [ + "your" + ] + ] + }, + "OTP_SUFFIX_EN": { + "join": " ", + "words": [ + [ + "is", + "your" + ] + ] + }, + "OTP_SUFFIX_DE": { + "join": " ", + "words": [ + [ + "ist", + "dein" + ], + [ + "ist", + "ihr" + ] + ] + }, + "OTP_SUFFIX_FR": { + "join": " ", + "words": [ + [ + "est", + "votre" + ], + [ + "est", + "ton" + ] + ] + }, + "OTP_SUFFIX_ES": { + "join": " ", + "words": [ + [ + "es", + "tu" + ], + [ + "es", + "su" + ] + ] + }, + "OTP_USE": { + "join": "", + "words": [ + [ + "use" + ] + ] + }, + "OTP_SIGN_IN": { + "join": " ", + "words": [ + [ + "to", + "sign", + "in" + ] + ] + }, + "OTP_SPANISH": "[cC][\u00f3\u00d3oO][dD][iI][gG][oO] [dD][eE] [vV][eE][rR][iI][fF][iI][cC][aA][cC][iI][\u00f3\u00d3oO][nN]", + "OTP_SPANISH_JOIN": "[ \t:=]{1,3}(?:[eE][sS][ \t]{1,3})?", + "OTP_CODE_DIGITS": "(?:[0-9]{3}[ -][0-9]{3}|[0-9]{4,8})", + "OTP_OLD_MARKER": "\\[REDACTED(?::[^\\[\\]:{{WS}}]{1,128}(?::[^\\[\\]]{0,4})?)?\\]", "PHONE_EXT": "(?:[ \t]{1,4}(?:[eE][xX][tT]\\.?|[xX])[ \t]{0,4}[0-9]{1,8}\\b)?", "OCTET": "(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])", "OTP_JOIN": "[{{WS}}:=\uff1a]{0,3}(?:(?:{{OTP_IS}}|[\u4e3a\u662f\u306f])[{{WS}}:\uff1a]{0,3})?", @@ -460,6 +581,15 @@ export const RULES_DATA: unknown = { "nestedLimit": 4096, "decodeBudget": 1000000, "dropPlaceholder": true + }, + { + "id": "mnemonic", + "kind": "mnemonic", + "label": "(\"{{MNEMONIC_KEY}}\"|'{{MNEMONIC_KEY}}'|\\b{{MNEMONIC_KEY}})[ \t]*(?:=>|:=|[:=])[ \t]*([\"'])?", + "pattern": "[A-Za-z0-9_]+", + "lineEnd": "[\r\n\u2028\u2029]", + "gapClass": "[ \t]", + "ignoreBeforeClass": "[A-Za-z0-9_.\\-]" } ], "statusWords": [ @@ -521,7 +651,7 @@ export const RULES_DATA: unknown = { "escapeStop": "[\\\\\"']", "identChar": "[A-Za-z0-9_%-]", "labelLookback": 64, - "keyChar": "[A-Za-z0-9_-]", + "keyChar": "[A-Za-z0-9_\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff\u0100-\u017e\u0300-\u036f\u0410-\u044f\u0401\u0451\u212a-]", "keyMax": 64, "gapClass": "[{{WS}}]", "quoteChar": "[\"']", @@ -670,6 +800,75 @@ export const RULES_DATA: unknown = { ".cpp" ] }, + { + "id": "iban", + "kind": "iban", + "pattern": "\\b[A-Za-z]{2}[0-9]{2}" + }, + { + "id": "card", + "kind": "regex", + "pattern": "\\b[1-9](?:[ -]?[0-9]){12,18}\\b", + "check": "luhn", + "numericEdges": "run", + "ignoreAfterWords": [ + "order", + "invoice", + "version", + "build", + "timestamp", + "port" + ], + "ignoreAfterLabels": [ + "invoice number" + ], + "afterGapClass": "[ \t:=#]" + }, + { + "id": "phone", + "kind": "regex", + "pattern": "\\b00[1-9](?:[ .-]?[0-9]){7,14}\\b{{PHONE_EXT}}", + "numericEdges": "run", + "ignoreAfterWords": [ + "order", + "invoice", + "version", + "build", + "timestamp", + "port" + ], + "afterGapClass": "[ \t:=#]" + }, + { + "id": "phone", + "kind": "regex", + "pattern": "\\b(?:0(?:30|40|69|89)|0(?:2[0-9]|3[3-9]|4[1-9]|5[0-9]|6[0-8]|7[0-9]|8[0-8]|9[0-9])[0-9]{1,2})[ -][1-9][0-9]{5,8}\\b{{PHONE_EXT}}", + "numericEdges": "run", + "ignoreAfterWords": [ + "order", + "invoice", + "version", + "build", + "timestamp", + "port" + ], + "afterGapClass": "[ \t:=#]" + }, + { + "id": "phone", + "kind": "regex", + "pattern": "\\b(?:015[0-9]|01[67][0-9])[ -][0-9]{7,8}\\b{{PHONE_EXT}}", + "numericEdges": "run", + "ignoreAfterWords": [ + "order", + "invoice", + "version", + "build", + "timestamp", + "port" + ], + "afterGapClass": "[ \t:=#]" + }, { "id": "phone", "kind": "regex", @@ -725,10 +924,22 @@ export const RULES_DATA: unknown = { "kind": "regex", "pattern": "\\b0[0-9][ .-][0-9]{2}[ .-][0-9]{2}[ .-][0-9]{2}[ .-][0-9]{2}\\b{{PHONE_EXT}}" }, + { + "id": "ip", + "kind": "regex", + "pattern": "(?:\\b[0-9A-Fa-f]{1,4}:|::)[0-9A-Fa-f:]{0,38}%[A-Za-z0-9_~-](?:[A-Za-z0-9_~.-]{0,62}[A-Za-z0-9_~-])?", + "check": "ipv6-zone", + "minColons": 2, + "ignoreBeforeClass": "[0-9A-Za-z_:%]", + "ignoreAfterClass": "[0-9A-Za-z_~%-]" + }, { "id": "ip", "kind": "regex", "pattern": "\\b{{OCTET}}\\.{{OCTET}}\\.{{OCTET}}\\.{{OCTET}}\\b", + "ignoreEquals": [ + "0.0.0.0" + ], "ignoreAfterWords": [ "v", "version", @@ -771,12 +982,14 @@ export const RULES_DATA: unknown = { { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}){{OTP_JOIN}}([0-9]{4,8})\\b", "group": 1 }, { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "(?:\\b(?:{{OTP_NOUN}}|2[fF][aA])|{{OTP_NOUN_CJK}}){{OTP_JOIN_PLUS}}([0-9]{3}[ -][0-9]{3})\\b", "group": 1, "ignoreAfterClass": "[-0-9]" @@ -784,6 +997,7 @@ export const RULES_DATA: unknown = { { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "(?:(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}){{OTP_WAS}}|\\b2[fF][aA]{{OTP_JOIN_PLUS}})([0-9]{4,8})\\b", "group": 1, "ignoreAfterClass": "[-0-9]" @@ -791,8 +1005,12 @@ export const RULES_DATA: unknown = { { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}{{OTP_JOIN_PLUS}}([0-9]{6,8})\\b", "group": 1, + "ignoreAfterLabels": [ + "http error" + ], "ignoreAfterWords": [ "error", "exit", @@ -801,9 +1019,89 @@ export const RULES_DATA: unknown = { "postal", "zip", "area", - "country" + "country", + "invoice", + "order" ], "afterGapClass": "[{{WS}}]" + }, + { + "id": "otp", + "kind": "regex", + "ignoreDate": true, + "pattern": "\\b{{OTP_YOUR}} {{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}({{OTP_CODE_DIGITS}})\\b", + "group": 1, + "numericEdges": "code" + }, + { + "id": "otp", + "kind": "regex", + "ignoreDate": true, + "pattern": "\\b(?:{{OTP_YOUR}} )?{{OTP_BRAND}} {{OTP_BARE}}{{OTP_JOIN_PLUS}}({{OTP_CODE_DIGITS}})\\b", + "group": 1, + "numericEdges": "code" + }, + { + "id": "otp", + "kind": "regex", + "ignoreDate": true, + "pattern": "\\b{{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}([A-Z0-9]{4,8})\\b", + "group": 1, + "requireClass": "[A-Z]", + "numericEdges": "code", + "ignoreAfterWords": [ + "error", + "exit", + "status", + "response", + "postal", + "zip", + "area", + "country", + "order", + "invoice", + "see", + "source", + "product" + ], + "ignoreAfterLabels": [ + "http error" + ], + "afterGapClass": "[{{WS}}]", + "check": "otp-alphanumeric" + }, + { + "id": "otp", + "kind": "regex", + "ignoreDate": true, + "pattern": "\\b{{OTP_SPANISH}}{{OTP_SPANISH_JOIN}}({{OTP_CODE_DIGITS}})\\b", + "group": 1, + "numericEdges": "code" + }, + { + "id": "otp", + "kind": "regex", + "ignoreDate": true, + "pattern": "(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}|\\b{{OTP_SPANISH}}){{OTP_JOIN_PLUS}}{{OTP_OLD_MARKER}}({{OTP_CODE_DIGITS}})\\b", + "group": 1, + "numericEdges": "code" + }, + { + "id": "otp", + "kind": "regex", + "ignoreDate": true, + "pattern": "\\b((?:[gG]-)?{{OTP_CODE_DIGITS}}) (?:{{OTP_SUFFIX_EN}} (?:(?:{{OTP_BRAND}} )?{{OTP_NOUN}}|{{OTP_BRAND}} {{OTP_BARE}})|{{OTP_SUFFIX_DE}} {{OTP_NOUN}}|{{OTP_SUFFIX_FR}} {{OTP_NOUN}}|{{OTP_SUFFIX_ES}} {{OTP_SPANISH}})\\b", + "group": 1, + "numericEdges": "code", + "ignoreBeforeClass": "[-.]" + }, + { + "id": "otp", + "kind": "regex", + "ignoreDate": true, + "pattern": "\\b{{OTP_USE}} ({{OTP_CODE_DIGITS}}) {{OTP_SIGN_IN}}\\b", + "group": 1, + "numericEdges": "code" } ], "full": [ @@ -1574,6 +1872,27 @@ export const RULES_DATA: unknown = { export const KEYS_DATA: unknown = { "specVersion": 1, "description": "Key-name word lists of the key-name matcher (SPEC.md section 6).", + "localizedPasswords": [ + "passwort", + "kennwort", + "contrase\u00f1a", + "mot de passe", + "mdp", + "senha", + "parola d'ordine", + "parola d\u2019ordine", + "\u043f\u0430\u0440\u043e\u043b\u044c", + "wachtwoord", + "has\u0142o", + "\u015fifre", + "l\u00f6senord" + ], + "mnemonicKeys": [ + "mnemonic", + "mnemonic phrase", + "recovery phrase", + "seed phrase" + ], "structuralSkipKeys": [ "type", "id" @@ -1845,6 +2164,2156 @@ export const ALGORITHMS_DATA: unknown = { "maxDepth": 64, "maxNodes": 500000 }, + "ibanLengths": { + "AD": 24, + "AE": 23, + "AL": 28, + "AT": 20, + "AZ": 28, + "BA": 20, + "BE": 16, + "BG": 22, + "BH": 22, + "BI": 27, + "BR": 29, + "BY": 28, + "CH": 21, + "CR": 22, + "CY": 28, + "CZ": 24, + "DE": 22, + "DJ": 27, + "DK": 18, + "DO": 28, + "EE": 20, + "EG": 29, + "ES": 24, + "FI": 18, + "FK": 18, + "FO": 18, + "FR": 27, + "GB": 22, + "GE": 22, + "GI": 23, + "GL": 18, + "GR": 27, + "GT": 28, + "HN": 28, + "HR": 21, + "HU": 28, + "IE": 22, + "IL": 23, + "IQ": 23, + "IS": 26, + "IT": 27, + "JO": 30, + "KW": 30, + "KZ": 20, + "LB": 28, + "LC": 32, + "LI": 21, + "LT": 20, + "LU": 20, + "LV": 21, + "LY": 25, + "MC": 27, + "MD": 24, + "ME": 22, + "MK": 19, + "MN": 20, + "MR": 27, + "MT": 31, + "MU": 30, + "NI": 28, + "NL": 18, + "NO": 15, + "OM": 23, + "PK": 24, + "PL": 28, + "PS": 29, + "PT": 25, + "QA": 29, + "RO": 24, + "RS": 22, + "RU": 33, + "SA": 24, + "SC": 31, + "SD": 18, + "SE": 24, + "SI": 19, + "SK": 24, + "SM": 27, + "SO": 23, + "ST": 25, + "SV": 28, + "TL": 23, + "TN": 24, + "TR": 26, + "UA": 29, + "VA": 22, + "VG": 24, + "XK": 20, + "YE": 30 + }, + "mnemonic": { + "counts": [ + 12, + 15, + 18, + 21, + 24 + ], + "words": [ + "abandon", + "ability", + "able", + "about", + "above", + "absent", + "absorb", + "abstract", + "absurd", + "abuse", + "access", + "accident", + "account", + "accuse", + "achieve", + "acid", + "acoustic", + "acquire", + "across", + "act", + "action", + "actor", + "actress", + "actual", + "adapt", + "add", + "addict", + "address", + "adjust", + "admit", + "adult", + "advance", + "advice", + "aerobic", + "affair", + "afford", + "afraid", + "again", + "age", + "agent", + "agree", + "ahead", + "aim", + "air", + "airport", + "aisle", + "alarm", + "album", + "alcohol", + "alert", + "alien", + "all", + "alley", + "allow", + "almost", + "alone", + "alpha", + "already", + "also", + "alter", + "always", + "amateur", + "amazing", + "among", + "amount", + "amused", + "analyst", + "anchor", + "ancient", + "anger", + "angle", + "angry", + "animal", + "ankle", + "announce", + "annual", + "another", + "answer", + "antenna", + "antique", + "anxiety", + "any", + "apart", + "apology", + "appear", + "apple", + "approve", + "april", + "arch", + "arctic", + "area", + "arena", + "argue", + "arm", + "armed", + "armor", + "army", + "around", + "arrange", + "arrest", + "arrive", + "arrow", + "art", + "artefact", + "artist", + "artwork", + "ask", + "aspect", + "assault", + "asset", + "assist", + "assume", + "asthma", + "athlete", + "atom", + "attack", + "attend", + "attitude", + "attract", + "auction", + "audit", + "august", + "aunt", + "author", + "auto", + "autumn", + "average", + "avocado", + "avoid", + "awake", + "aware", + "away", + "awesome", + "awful", + "awkward", + "axis", + "baby", + "bachelor", + "bacon", + "badge", + "bag", + "balance", + "balcony", + "ball", + "bamboo", + "banana", + "banner", + "bar", + "barely", + "bargain", + "barrel", + "base", + "basic", + "basket", + "battle", + "beach", + "bean", + "beauty", + "because", + "become", + "beef", + "before", + "begin", + "behave", + "behind", + "believe", + "below", + "belt", + "bench", + "benefit", + "best", + "betray", + "better", + "between", + "beyond", + "bicycle", + "bid", + "bike", + "bind", + "biology", + "bird", + "birth", + "bitter", + "black", + "blade", + "blame", + "blanket", + "blast", + "bleak", + "bless", + "blind", + "blood", + "blossom", + "blouse", + "blue", + "blur", + "blush", + "board", + "boat", + "body", + "boil", + "bomb", + "bone", + "bonus", + "book", + "boost", + "border", + "boring", + "borrow", + "boss", + "bottom", + "bounce", + "box", + "boy", + "bracket", + "brain", + "brand", + "brass", + "brave", + "bread", + "breeze", + "brick", + "bridge", + "brief", + "bright", + "bring", + "brisk", + "broccoli", + "broken", + "bronze", + "broom", + "brother", + "brown", + "brush", + "bubble", + "buddy", + "budget", + "buffalo", + "build", + "bulb", + "bulk", + "bullet", + "bundle", + "bunker", + "burden", + "burger", + "burst", + "bus", + "business", + "busy", + "butter", + "buyer", + "buzz", + "cabbage", + "cabin", + "cable", + "cactus", + "cage", + "cake", + "call", + "calm", + "camera", + "camp", + "can", + "canal", + "cancel", + "candy", + "cannon", + "canoe", + "canvas", + "canyon", + "capable", + "capital", + "captain", + "car", + "carbon", + "card", + "cargo", + "carpet", + "carry", + "cart", + "case", + "cash", + "casino", + "castle", + "casual", + "cat", + "catalog", + "catch", + "category", + "cattle", + "caught", + "cause", + "caution", + "cave", + "ceiling", + "celery", + "cement", + "census", + "century", + "cereal", + "certain", + "chair", + "chalk", + "champion", + "change", + "chaos", + "chapter", + "charge", + "chase", + "chat", + "cheap", + "check", + "cheese", + "chef", + "cherry", + "chest", + "chicken", + "chief", + "child", + "chimney", + "choice", + "choose", + "chronic", + "chuckle", + "chunk", + "churn", + "cigar", + "cinnamon", + "circle", + "citizen", + "city", + "civil", + "claim", + "clap", + "clarify", + "claw", + "clay", + "clean", + "clerk", + "clever", + "click", + "client", + "cliff", + "climb", + "clinic", + "clip", + "clock", + "clog", + "close", + "cloth", + "cloud", + "clown", + "club", + "clump", + "cluster", + "clutch", + "coach", + "coast", + "coconut", + "code", + "coffee", + "coil", + "coin", + "collect", + "color", + "column", + "combine", + "come", + "comfort", + "comic", + "common", + "company", + "concert", + "conduct", + "confirm", + "congress", + "connect", + "consider", + "control", + "convince", + "cook", + "cool", + "copper", + "copy", + "coral", + "core", + "corn", + "correct", + "cost", + "cotton", + "couch", + "country", + "couple", + "course", + "cousin", + "cover", + "coyote", + "crack", + "cradle", + "craft", + "cram", + "crane", + "crash", + "crater", + "crawl", + "crazy", + "cream", + "credit", + "creek", + "crew", + "cricket", + "crime", + "crisp", + "critic", + "crop", + "cross", + "crouch", + "crowd", + "crucial", + "cruel", + "cruise", + "crumble", + "crunch", + "crush", + "cry", + "crystal", + "cube", + "culture", + "cup", + "cupboard", + "curious", + "current", + "curtain", + "curve", + "cushion", + "custom", + "cute", + "cycle", + "dad", + "damage", + "damp", + "dance", + "danger", + "daring", + "dash", + "daughter", + "dawn", + "day", + "deal", + "debate", + "debris", + "decade", + "december", + "decide", + "decline", + "decorate", + "decrease", + "deer", + "defense", + "define", + "defy", + "degree", + "delay", + "deliver", + "demand", + "demise", + "denial", + "dentist", + "deny", + "depart", + "depend", + "deposit", + "depth", + "deputy", + "derive", + "describe", + "desert", + "design", + "desk", + "despair", + "destroy", + "detail", + "detect", + "develop", + "device", + "devote", + "diagram", + "dial", + "diamond", + "diary", + "dice", + "diesel", + "diet", + "differ", + "digital", + "dignity", + "dilemma", + "dinner", + "dinosaur", + "direct", + "dirt", + "disagree", + "discover", + "disease", + "dish", + "dismiss", + "disorder", + "display", + "distance", + "divert", + "divide", + "divorce", + "dizzy", + "doctor", + "document", + "dog", + "doll", + "dolphin", + "domain", + "donate", + "donkey", + "donor", + "door", + "dose", + "double", + "dove", + "draft", + "dragon", + "drama", + "drastic", + "draw", + "dream", + "dress", + "drift", + "drill", + "drink", + "drip", + "drive", + "drop", + "drum", + "dry", + "duck", + "dumb", + "dune", + "during", + "dust", + "dutch", + "duty", + "dwarf", + "dynamic", + "eager", + "eagle", + "early", + "earn", + "earth", + "easily", + "east", + "easy", + "echo", + "ecology", + "economy", + "edge", + "edit", + "educate", + "effort", + "egg", + "eight", + "either", + "elbow", + "elder", + "electric", + "elegant", + "element", + "elephant", + "elevator", + "elite", + "else", + "embark", + "embody", + "embrace", + "emerge", + "emotion", + "employ", + "empower", + "empty", + "enable", + "enact", + "end", + "endless", + "endorse", + "enemy", + "energy", + "enforce", + "engage", + "engine", + "enhance", + "enjoy", + "enlist", + "enough", + "enrich", + "enroll", + "ensure", + "enter", + "entire", + "entry", + "envelope", + "episode", + "equal", + "equip", + "era", + "erase", + "erode", + "erosion", + "error", + "erupt", + "escape", + "essay", + "essence", + "estate", + "eternal", + "ethics", + "evidence", + "evil", + "evoke", + "evolve", + "exact", + "example", + "excess", + "exchange", + "excite", + "exclude", + "excuse", + "execute", + "exercise", + "exhaust", + "exhibit", + "exile", + "exist", + "exit", + "exotic", + "expand", + "expect", + "expire", + "explain", + "expose", + "express", + "extend", + "extra", + "eye", + "eyebrow", + "fabric", + "face", + "faculty", + "fade", + "faint", + "faith", + "fall", + "false", + "fame", + "family", + "famous", + "fan", + "fancy", + "fantasy", + "farm", + "fashion", + "fat", + "fatal", + "father", + "fatigue", + "fault", + "favorite", + "feature", + "february", + "federal", + "fee", + "feed", + "feel", + "female", + "fence", + "festival", + "fetch", + "fever", + "few", + "fiber", + "fiction", + "field", + "figure", + "file", + "film", + "filter", + "final", + "find", + "fine", + "finger", + "finish", + "fire", + "firm", + "first", + "fiscal", + "fish", + "fit", + "fitness", + "fix", + "flag", + "flame", + "flash", + "flat", + "flavor", + "flee", + "flight", + "flip", + "float", + "flock", + "floor", + "flower", + "fluid", + "flush", + "fly", + "foam", + "focus", + "fog", + "foil", + "fold", + "follow", + "food", + "foot", + "force", + "forest", + "forget", + "fork", + "fortune", + "forum", + "forward", + "fossil", + "foster", + "found", + "fox", + "fragile", + "frame", + "frequent", + "fresh", + "friend", + "fringe", + "frog", + "front", + "frost", + "frown", + "frozen", + "fruit", + "fuel", + "fun", + "funny", + "furnace", + "fury", + "future", + "gadget", + "gain", + "galaxy", + "gallery", + "game", + "gap", + "garage", + "garbage", + "garden", + "garlic", + "garment", + "gas", + "gasp", + "gate", + "gather", + "gauge", + "gaze", + "general", + "genius", + "genre", + "gentle", + "genuine", + "gesture", + "ghost", + "giant", + "gift", + "giggle", + "ginger", + "giraffe", + "girl", + "give", + "glad", + "glance", + "glare", + "glass", + "glide", + "glimpse", + "globe", + "gloom", + "glory", + "glove", + "glow", + "glue", + "goat", + "goddess", + "gold", + "good", + "goose", + "gorilla", + "gospel", + "gossip", + "govern", + "gown", + "grab", + "grace", + "grain", + "grant", + "grape", + "grass", + "gravity", + "great", + "green", + "grid", + "grief", + "grit", + "grocery", + "group", + "grow", + "grunt", + "guard", + "guess", + "guide", + "guilt", + "guitar", + "gun", + "gym", + "habit", + "hair", + "half", + "hammer", + "hamster", + "hand", + "happy", + "harbor", + "hard", + "harsh", + "harvest", + "hat", + "have", + "hawk", + "hazard", + "head", + "health", + "heart", + "heavy", + "hedgehog", + "height", + "hello", + "helmet", + "help", + "hen", + "hero", + "hidden", + "high", + "hill", + "hint", + "hip", + "hire", + "history", + "hobby", + "hockey", + "hold", + "hole", + "holiday", + "hollow", + "home", + "honey", + "hood", + "hope", + "horn", + "horror", + "horse", + "hospital", + "host", + "hotel", + "hour", + "hover", + "hub", + "huge", + "human", + "humble", + "humor", + "hundred", + "hungry", + "hunt", + "hurdle", + "hurry", + "hurt", + "husband", + "hybrid", + "ice", + "icon", + "idea", + "identify", + "idle", + "ignore", + "ill", + "illegal", + "illness", + "image", + "imitate", + "immense", + "immune", + "impact", + "impose", + "improve", + "impulse", + "inch", + "include", + "income", + "increase", + "index", + "indicate", + "indoor", + "industry", + "infant", + "inflict", + "inform", + "inhale", + "inherit", + "initial", + "inject", + "injury", + "inmate", + "inner", + "innocent", + "input", + "inquiry", + "insane", + "insect", + "inside", + "inspire", + "install", + "intact", + "interest", + "into", + "invest", + "invite", + "involve", + "iron", + "island", + "isolate", + "issue", + "item", + "ivory", + "jacket", + "jaguar", + "jar", + "jazz", + "jealous", + "jeans", + "jelly", + "jewel", + "job", + "join", + "joke", + "journey", + "joy", + "judge", + "juice", + "jump", + "jungle", + "junior", + "junk", + "just", + "kangaroo", + "keen", + "keep", + "ketchup", + "key", + "kick", + "kid", + "kidney", + "kind", + "kingdom", + "kiss", + "kit", + "kitchen", + "kite", + "kitten", + "kiwi", + "knee", + "knife", + "knock", + "know", + "lab", + "label", + "labor", + "ladder", + "lady", + "lake", + "lamp", + "language", + "laptop", + "large", + "later", + "latin", + "laugh", + "laundry", + "lava", + "law", + "lawn", + "lawsuit", + "layer", + "lazy", + "leader", + "leaf", + "learn", + "leave", + "lecture", + "left", + "leg", + "legal", + "legend", + "leisure", + "lemon", + "lend", + "length", + "lens", + "leopard", + "lesson", + "letter", + "level", + "liar", + "liberty", + "library", + "license", + "life", + "lift", + "light", + "like", + "limb", + "limit", + "link", + "lion", + "liquid", + "list", + "little", + "live", + "lizard", + "load", + "loan", + "lobster", + "local", + "lock", + "logic", + "lonely", + "long", + "loop", + "lottery", + "loud", + "lounge", + "love", + "loyal", + "lucky", + "luggage", + "lumber", + "lunar", + "lunch", + "luxury", + "lyrics", + "machine", + "mad", + "magic", + "magnet", + "maid", + "mail", + "main", + "major", + "make", + "mammal", + "man", + "manage", + "mandate", + "mango", + "mansion", + "manual", + "maple", + "marble", + "march", + "margin", + "marine", + "market", + "marriage", + "mask", + "mass", + "master", + "match", + "material", + "math", + "matrix", + "matter", + "maximum", + "maze", + "meadow", + "mean", + "measure", + "meat", + "mechanic", + "medal", + "media", + "melody", + "melt", + "member", + "memory", + "mention", + "menu", + "mercy", + "merge", + "merit", + "merry", + "mesh", + "message", + "metal", + "method", + "middle", + "midnight", + "milk", + "million", + "mimic", + "mind", + "minimum", + "minor", + "minute", + "miracle", + "mirror", + "misery", + "miss", + "mistake", + "mix", + "mixed", + "mixture", + "mobile", + "model", + "modify", + "mom", + "moment", + "monitor", + "monkey", + "monster", + "month", + "moon", + "moral", + "more", + "morning", + "mosquito", + "mother", + "motion", + "motor", + "mountain", + "mouse", + "move", + "movie", + "much", + "muffin", + "mule", + "multiply", + "muscle", + "museum", + "mushroom", + "music", + "must", + "mutual", + "myself", + "mystery", + "myth", + "naive", + "name", + "napkin", + "narrow", + "nasty", + "nation", + "nature", + "near", + "neck", + "need", + "negative", + "neglect", + "neither", + "nephew", + "nerve", + "nest", + "net", + "network", + "neutral", + "never", + "news", + "next", + "nice", + "night", + "noble", + "noise", + "nominee", + "noodle", + "normal", + "north", + "nose", + "notable", + "note", + "nothing", + "notice", + "novel", + "now", + "nuclear", + "number", + "nurse", + "nut", + "oak", + "obey", + "object", + "oblige", + "obscure", + "observe", + "obtain", + "obvious", + "occur", + "ocean", + "october", + "odor", + "off", + "offer", + "office", + "often", + "oil", + "okay", + "old", + "olive", + "olympic", + "omit", + "once", + "one", + "onion", + "online", + "only", + "open", + "opera", + "opinion", + "oppose", + "option", + "orange", + "orbit", + "orchard", + "order", + "ordinary", + "organ", + "orient", + "original", + "orphan", + "ostrich", + "other", + "outdoor", + "outer", + "output", + "outside", + "oval", + "oven", + "over", + "own", + "owner", + "oxygen", + "oyster", + "ozone", + "pact", + "paddle", + "page", + "pair", + "palace", + "palm", + "panda", + "panel", + "panic", + "panther", + "paper", + "parade", + "parent", + "park", + "parrot", + "party", + "pass", + "patch", + "path", + "patient", + "patrol", + "pattern", + "pause", + "pave", + "payment", + "peace", + "peanut", + "pear", + "peasant", + "pelican", + "pen", + "penalty", + "pencil", + "people", + "pepper", + "perfect", + "permit", + "person", + "pet", + "phone", + "photo", + "phrase", + "physical", + "piano", + "picnic", + "picture", + "piece", + "pig", + "pigeon", + "pill", + "pilot", + "pink", + "pioneer", + "pipe", + "pistol", + "pitch", + "pizza", + "place", + "planet", + "plastic", + "plate", + "play", + "please", + "pledge", + "pluck", + "plug", + "plunge", + "poem", + "poet", + "point", + "polar", + "pole", + "police", + "pond", + "pony", + "pool", + "popular", + "portion", + "position", + "possible", + "post", + "potato", + "pottery", + "poverty", + "powder", + "power", + "practice", + "praise", + "predict", + "prefer", + "prepare", + "present", + "pretty", + "prevent", + "price", + "pride", + "primary", + "print", + "priority", + "prison", + "private", + "prize", + "problem", + "process", + "produce", + "profit", + "program", + "project", + "promote", + "proof", + "property", + "prosper", + "protect", + "proud", + "provide", + "public", + "pudding", + "pull", + "pulp", + "pulse", + "pumpkin", + "punch", + "pupil", + "puppy", + "purchase", + "purity", + "purpose", + "purse", + "push", + "put", + "puzzle", + "pyramid", + "quality", + "quantum", + "quarter", + "question", + "quick", + "quit", + "quiz", + "quote", + "rabbit", + "raccoon", + "race", + "rack", + "radar", + "radio", + "rail", + "rain", + "raise", + "rally", + "ramp", + "ranch", + "random", + "range", + "rapid", + "rare", + "rate", + "rather", + "raven", + "raw", + "razor", + "ready", + "real", + "reason", + "rebel", + "rebuild", + "recall", + "receive", + "recipe", + "record", + "recycle", + "reduce", + "reflect", + "reform", + "refuse", + "region", + "regret", + "regular", + "reject", + "relax", + "release", + "relief", + "rely", + "remain", + "remember", + "remind", + "remove", + "render", + "renew", + "rent", + "reopen", + "repair", + "repeat", + "replace", + "report", + "require", + "rescue", + "resemble", + "resist", + "resource", + "response", + "result", + "retire", + "retreat", + "return", + "reunion", + "reveal", + "review", + "reward", + "rhythm", + "rib", + "ribbon", + "rice", + "rich", + "ride", + "ridge", + "rifle", + "right", + "rigid", + "ring", + "riot", + "ripple", + "risk", + "ritual", + "rival", + "river", + "road", + "roast", + "robot", + "robust", + "rocket", + "romance", + "roof", + "rookie", + "room", + "rose", + "rotate", + "rough", + "round", + "route", + "royal", + "rubber", + "rude", + "rug", + "rule", + "run", + "runway", + "rural", + "sad", + "saddle", + "sadness", + "safe", + "sail", + "salad", + "salmon", + "salon", + "salt", + "salute", + "same", + "sample", + "sand", + "satisfy", + "satoshi", + "sauce", + "sausage", + "save", + "say", + "scale", + "scan", + "scare", + "scatter", + "scene", + "scheme", + "school", + "science", + "scissors", + "scorpion", + "scout", + "scrap", + "screen", + "script", + "scrub", + "sea", + "search", + "season", + "seat", + "second", + "secret", + "section", + "security", + "seed", + "seek", + "segment", + "select", + "sell", + "seminar", + "senior", + "sense", + "sentence", + "series", + "service", + "session", + "settle", + "setup", + "seven", + "shadow", + "shaft", + "shallow", + "share", + "shed", + "shell", + "sheriff", + "shield", + "shift", + "shine", + "ship", + "shiver", + "shock", + "shoe", + "shoot", + "shop", + "short", + "shoulder", + "shove", + "shrimp", + "shrug", + "shuffle", + "shy", + "sibling", + "sick", + "side", + "siege", + "sight", + "sign", + "silent", + "silk", + "silly", + "silver", + "similar", + "simple", + "since", + "sing", + "siren", + "sister", + "situate", + "six", + "size", + "skate", + "sketch", + "ski", + "skill", + "skin", + "skirt", + "skull", + "slab", + "slam", + "sleep", + "slender", + "slice", + "slide", + "slight", + "slim", + "slogan", + "slot", + "slow", + "slush", + "small", + "smart", + "smile", + "smoke", + "smooth", + "snack", + "snake", + "snap", + "sniff", + "snow", + "soap", + "soccer", + "social", + "sock", + "soda", + "soft", + "solar", + "soldier", + "solid", + "solution", + "solve", + "someone", + "song", + "soon", + "sorry", + "sort", + "soul", + "sound", + "soup", + "source", + "south", + "space", + "spare", + "spatial", + "spawn", + "speak", + "special", + "speed", + "spell", + "spend", + "sphere", + "spice", + "spider", + "spike", + "spin", + "spirit", + "split", + "spoil", + "sponsor", + "spoon", + "sport", + "spot", + "spray", + "spread", + "spring", + "spy", + "square", + "squeeze", + "squirrel", + "stable", + "stadium", + "staff", + "stage", + "stairs", + "stamp", + "stand", + "start", + "state", + "stay", + "steak", + "steel", + "stem", + "step", + "stereo", + "stick", + "still", + "sting", + "stock", + "stomach", + "stone", + "stool", + "story", + "stove", + "strategy", + "street", + "strike", + "strong", + "struggle", + "student", + "stuff", + "stumble", + "style", + "subject", + "submit", + "subway", + "success", + "such", + "sudden", + "suffer", + "sugar", + "suggest", + "suit", + "summer", + "sun", + "sunny", + "sunset", + "super", + "supply", + "supreme", + "sure", + "surface", + "surge", + "surprise", + "surround", + "survey", + "suspect", + "sustain", + "swallow", + "swamp", + "swap", + "swarm", + "swear", + "sweet", + "swift", + "swim", + "swing", + "switch", + "sword", + "symbol", + "symptom", + "syrup", + "system", + "table", + "tackle", + "tag", + "tail", + "talent", + "talk", + "tank", + "tape", + "target", + "task", + "taste", + "tattoo", + "taxi", + "teach", + "team", + "tell", + "ten", + "tenant", + "tennis", + "tent", + "term", + "test", + "text", + "thank", + "that", + "theme", + "then", + "theory", + "there", + "they", + "thing", + "this", + "thought", + "three", + "thrive", + "throw", + "thumb", + "thunder", + "ticket", + "tide", + "tiger", + "tilt", + "timber", + "time", + "tiny", + "tip", + "tired", + "tissue", + "title", + "toast", + "tobacco", + "today", + "toddler", + "toe", + "together", + "toilet", + "token", + "tomato", + "tomorrow", + "tone", + "tongue", + "tonight", + "tool", + "tooth", + "top", + "topic", + "topple", + "torch", + "tornado", + "tortoise", + "toss", + "total", + "tourist", + "toward", + "tower", + "town", + "toy", + "track", + "trade", + "traffic", + "tragic", + "train", + "transfer", + "trap", + "trash", + "travel", + "tray", + "treat", + "tree", + "trend", + "trial", + "tribe", + "trick", + "trigger", + "trim", + "trip", + "trophy", + "trouble", + "truck", + "true", + "truly", + "trumpet", + "trust", + "truth", + "try", + "tube", + "tuition", + "tumble", + "tuna", + "tunnel", + "turkey", + "turn", + "turtle", + "twelve", + "twenty", + "twice", + "twin", + "twist", + "two", + "type", + "typical", + "ugly", + "umbrella", + "unable", + "unaware", + "uncle", + "uncover", + "under", + "undo", + "unfair", + "unfold", + "unhappy", + "uniform", + "unique", + "unit", + "universe", + "unknown", + "unlock", + "until", + "unusual", + "unveil", + "update", + "upgrade", + "uphold", + "upon", + "upper", + "upset", + "urban", + "urge", + "usage", + "use", + "used", + "useful", + "useless", + "usual", + "utility", + "vacant", + "vacuum", + "vague", + "valid", + "valley", + "valve", + "van", + "vanish", + "vapor", + "various", + "vast", + "vault", + "vehicle", + "velvet", + "vendor", + "venture", + "venue", + "verb", + "verify", + "version", + "very", + "vessel", + "veteran", + "viable", + "vibrant", + "vicious", + "victory", + "video", + "view", + "village", + "vintage", + "violin", + "virtual", + "virus", + "visa", + "visit", + "visual", + "vital", + "vivid", + "vocal", + "voice", + "void", + "volcano", + "volume", + "vote", + "voyage", + "wage", + "wagon", + "wait", + "walk", + "wall", + "walnut", + "want", + "warfare", + "warm", + "warrior", + "wash", + "wasp", + "waste", + "water", + "wave", + "way", + "wealth", + "weapon", + "wear", + "weasel", + "weather", + "web", + "wedding", + "weekend", + "weird", + "welcome", + "west", + "wet", + "whale", + "what", + "wheat", + "wheel", + "when", + "where", + "whip", + "whisper", + "wide", + "width", + "wife", + "wild", + "will", + "win", + "window", + "wine", + "wing", + "wink", + "winner", + "winter", + "wire", + "wisdom", + "wise", + "wish", + "witness", + "wolf", + "woman", + "wonder", + "wood", + "wool", + "word", + "work", + "world", + "worry", + "worth", + "wrap", + "wreck", + "wrestle", + "wrist", + "write", + "wrong", + "yard", + "year", + "yellow", + "you", + "young", + "youth", + "zebra", + "zero", + "zone", + "zoo" + ] + }, "letters": { "unicodeVersion": "15.0.0", "ranges": "41-5a,61-7a,aa,b5,ba,c0-d6,d8-f6,f8-2c1,2c6-2d1,2e0-2e4,2ec,2ee,370-374,376-377,37a-37d,37f,386,388-38a,38c,38e-3a1,3a3-3f5,3f7-481,48a-52f,531-556,559,560-588,5d0-5ea,5ef-5f2,620-64a,66e-66f,671-6d3,6d5,6e5-6e6,6ee-6ef,6fa-6fc,6ff,710,712-72f,74d-7a5,7b1,7ca-7ea,7f4-7f5,7fa,800-815,81a,824,828,840-858,860-86a,870-887,889-88e,8a0-8c9,904-939,93d,950,958-961,971-980,985-98c,98f-990,993-9a8,9aa-9b0,9b2,9b6-9b9,9bd,9ce,9dc-9dd,9df-9e1,9f0-9f1,9fc,a05-a0a,a0f-a10,a13-a28,a2a-a30,a32-a33,a35-a36,a38-a39,a59-a5c,a5e,a72-a74,a85-a8d,a8f-a91,a93-aa8,aaa-ab0,ab2-ab3,ab5-ab9,abd,ad0,ae0-ae1,af9,b05-b0c,b0f-b10,b13-b28,b2a-b30,b32-b33,b35-b39,b3d,b5c-b5d,b5f-b61,b71,b83,b85-b8a,b8e-b90,b92-b95,b99-b9a,b9c,b9e-b9f,ba3-ba4,ba8-baa,bae-bb9,bd0,c05-c0c,c0e-c10,c12-c28,c2a-c39,c3d,c58-c5a,c5d,c60-c61,c80,c85-c8c,c8e-c90,c92-ca8,caa-cb3,cb5-cb9,cbd,cdd-cde,ce0-ce1,cf1-cf2,d04-d0c,d0e-d10,d12-d3a,d3d,d4e,d54-d56,d5f-d61,d7a-d7f,d85-d96,d9a-db1,db3-dbb,dbd,dc0-dc6,e01-e30,e32-e33,e40-e46,e81-e82,e84,e86-e8a,e8c-ea3,ea5,ea7-eb0,eb2-eb3,ebd,ec0-ec4,ec6,edc-edf,f00,f40-f47,f49-f6c,f88-f8c,1000-102a,103f,1050-1055,105a-105d,1061,1065-1066,106e-1070,1075-1081,108e,10a0-10c5,10c7,10cd,10d0-10fa,10fc-1248,124a-124d,1250-1256,1258,125a-125d,1260-1288,128a-128d,1290-12b0,12b2-12b5,12b8-12be,12c0,12c2-12c5,12c8-12d6,12d8-1310,1312-1315,1318-135a,1380-138f,13a0-13f5,13f8-13fd,1401-166c,166f-167f,1681-169a,16a0-16ea,16f1-16f8,1700-1711,171f-1731,1740-1751,1760-176c,176e-1770,1780-17b3,17d7,17dc,1820-1878,1880-1884,1887-18a8,18aa,18b0-18f5,1900-191e,1950-196d,1970-1974,1980-19ab,19b0-19c9,1a00-1a16,1a20-1a54,1aa7,1b05-1b33,1b45-1b4c,1b83-1ba0,1bae-1baf,1bba-1be5,1c00-1c23,1c4d-1c4f,1c5a-1c7d,1c80-1c88,1c90-1cba,1cbd-1cbf,1ce9-1cec,1cee-1cf3,1cf5-1cf6,1cfa,1d00-1dbf,1e00-1f15,1f18-1f1d,1f20-1f45,1f48-1f4d,1f50-1f57,1f59,1f5b,1f5d,1f5f-1f7d,1f80-1fb4,1fb6-1fbc,1fbe,1fc2-1fc4,1fc6-1fcc,1fd0-1fd3,1fd6-1fdb,1fe0-1fec,1ff2-1ff4,1ff6-1ffc,2071,207f,2090-209c,2102,2107,210a-2113,2115,2119-211d,2124,2126,2128,212a-212d,212f-2139,213c-213f,2145-2149,214e,2183-2184,2c00-2ce4,2ceb-2cee,2cf2-2cf3,2d00-2d25,2d27,2d2d,2d30-2d67,2d6f,2d80-2d96,2da0-2da6,2da8-2dae,2db0-2db6,2db8-2dbe,2dc0-2dc6,2dc8-2dce,2dd0-2dd6,2dd8-2dde,2e2f,3005-3006,3031-3035,303b-303c,3041-3096,309d-309f,30a1-30fa,30fc-30ff,3105-312f,3131-318e,31a0-31bf,31f0-31ff,3400-4dbf,4e00-a48c,a4d0-a4fd,a500-a60c,a610-a61f,a62a-a62b,a640-a66e,a67f-a69d,a6a0-a6e5,a717-a71f,a722-a788,a78b-a7ca,a7d0-a7d1,a7d3,a7d5-a7d9,a7f2-a801,a803-a805,a807-a80a,a80c-a822,a840-a873,a882-a8b3,a8f2-a8f7,a8fb,a8fd-a8fe,a90a-a925,a930-a946,a960-a97c,a984-a9b2,a9cf,a9e0-a9e4,a9e6-a9ef,a9fa-a9fe,aa00-aa28,aa40-aa42,aa44-aa4b,aa60-aa76,aa7a,aa7e-aaaf,aab1,aab5-aab6,aab9-aabd,aac0,aac2,aadb-aadd,aae0-aaea,aaf2-aaf4,ab01-ab06,ab09-ab0e,ab11-ab16,ab20-ab26,ab28-ab2e,ab30-ab5a,ab5c-ab69,ab70-abe2,ac00-d7a3,d7b0-d7c6,d7cb-d7fb,f900-fa6d,fa70-fad9,fb00-fb06,fb13-fb17,fb1d,fb1f-fb28,fb2a-fb36,fb38-fb3c,fb3e,fb40-fb41,fb43-fb44,fb46-fbb1,fbd3-fd3d,fd50-fd8f,fd92-fdc7,fdf0-fdfb,fe70-fe74,fe76-fefc,ff21-ff3a,ff41-ff5a,ff66-ffbe,ffc2-ffc7,ffca-ffcf,ffd2-ffd7,ffda-ffdc,10000-1000b,1000d-10026,10028-1003a,1003c-1003d,1003f-1004d,10050-1005d,10080-100fa,10280-1029c,102a0-102d0,10300-1031f,1032d-10340,10342-10349,10350-10375,10380-1039d,103a0-103c3,103c8-103cf,10400-1049d,104b0-104d3,104d8-104fb,10500-10527,10530-10563,10570-1057a,1057c-1058a,1058c-10592,10594-10595,10597-105a1,105a3-105b1,105b3-105b9,105bb-105bc,10600-10736,10740-10755,10760-10767,10780-10785,10787-107b0,107b2-107ba,10800-10805,10808,1080a-10835,10837-10838,1083c,1083f-10855,10860-10876,10880-1089e,108e0-108f2,108f4-108f5,10900-10915,10920-10939,10980-109b7,109be-109bf,10a00,10a10-10a13,10a15-10a17,10a19-10a35,10a60-10a7c,10a80-10a9c,10ac0-10ac7,10ac9-10ae4,10b00-10b35,10b40-10b55,10b60-10b72,10b80-10b91,10c00-10c48,10c80-10cb2,10cc0-10cf2,10d00-10d23,10e80-10ea9,10eb0-10eb1,10f00-10f1c,10f27,10f30-10f45,10f70-10f81,10fb0-10fc4,10fe0-10ff6,11003-11037,11071-11072,11075,11083-110af,110d0-110e8,11103-11126,11144,11147,11150-11172,11176,11183-111b2,111c1-111c4,111da,111dc,11200-11211,11213-1122b,1123f-11240,11280-11286,11288,1128a-1128d,1128f-1129d,1129f-112a8,112b0-112de,11305-1130c,1130f-11310,11313-11328,1132a-11330,11332-11333,11335-11339,1133d,11350,1135d-11361,11400-11434,11447-1144a,1145f-11461,11480-114af,114c4-114c5,114c7,11580-115ae,115d8-115db,11600-1162f,11644,11680-116aa,116b8,11700-1171a,11740-11746,11800-1182b,118a0-118df,118ff-11906,11909,1190c-11913,11915-11916,11918-1192f,1193f,11941,119a0-119a7,119aa-119d0,119e1,119e3,11a00,11a0b-11a32,11a3a,11a50,11a5c-11a89,11a9d,11ab0-11af8,11c00-11c08,11c0a-11c2e,11c40,11c72-11c8f,11d00-11d06,11d08-11d09,11d0b-11d30,11d46,11d60-11d65,11d67-11d68,11d6a-11d89,11d98,11ee0-11ef2,11f02,11f04-11f10,11f12-11f33,11fb0,12000-12399,12480-12543,12f90-12ff0,13000-1342f,13441-13446,14400-14646,16800-16a38,16a40-16a5e,16a70-16abe,16ad0-16aed,16b00-16b2f,16b40-16b43,16b63-16b77,16b7d-16b8f,16e40-16e7f,16f00-16f4a,16f50,16f93-16f9f,16fe0-16fe1,16fe3,17000-187f7,18800-18cd5,18d00-18d08,1aff0-1aff3,1aff5-1affb,1affd-1affe,1b000-1b122,1b132,1b150-1b152,1b155,1b164-1b167,1b170-1b2fb,1bc00-1bc6a,1bc70-1bc7c,1bc80-1bc88,1bc90-1bc99,1d400-1d454,1d456-1d49c,1d49e-1d49f,1d4a2,1d4a5-1d4a6,1d4a9-1d4ac,1d4ae-1d4b9,1d4bb,1d4bd-1d4c3,1d4c5-1d505,1d507-1d50a,1d50d-1d514,1d516-1d51c,1d51e-1d539,1d53b-1d53e,1d540-1d544,1d546,1d54a-1d550,1d552-1d6a5,1d6a8-1d6c0,1d6c2-1d6da,1d6dc-1d6fa,1d6fc-1d714,1d716-1d734,1d736-1d74e,1d750-1d76e,1d770-1d788,1d78a-1d7a8,1d7aa-1d7c2,1d7c4-1d7cb,1df00-1df1e,1df25-1df2a,1e030-1e06d,1e100-1e12c,1e137-1e13d,1e14e,1e290-1e2ad,1e2c0-1e2eb,1e4d0-1e4eb,1e7e0-1e7e6,1e7e8-1e7eb,1e7ed-1e7ee,1e7f0-1e7fe,1e800-1e8c4,1e900-1e943,1e94b,1ee00-1ee03,1ee05-1ee1f,1ee21-1ee22,1ee24,1ee27,1ee29-1ee32,1ee34-1ee37,1ee39,1ee3b,1ee42,1ee47,1ee49,1ee4b,1ee4d-1ee4f,1ee51-1ee52,1ee54,1ee57,1ee59,1ee5b,1ee5d,1ee5f,1ee61-1ee62,1ee64,1ee67-1ee6a,1ee6c-1ee72,1ee74-1ee77,1ee79-1ee7c,1ee7e,1ee80-1ee89,1ee8b-1ee9b,1eea1-1eea3,1eea5-1eea9,1eeab-1eebb,20000-2a6df,2a700-2b739,2b740-2b81d,2b820-2cea1,2ceb0-2ebe0,2f800-2fa1d,30000-3134a,31350-323af" diff --git a/ts/src/spec.ts b/ts/src/spec.ts index 756bcb1..2f6d734 100644 --- a/ts/src/spec.ts +++ b/ts/src/spec.ts @@ -26,6 +26,8 @@ export type RulesSpec = { }; export type KeysSpec = { specVersion: number; + localizedPasswords: string[]; + mnemonicKeys: string[]; structuralSkipKeys: string[]; secretWords: string[][]; extraSequences: string[][]; @@ -55,6 +57,8 @@ export type AlgorithmsSpec = { full: { scanWindow: number; scanOverlap: number; scanCap: number }; strict: { maxChars: number; maxDepth: number; maxNodes: number }; letters: { unicodeVersion: string; ranges: string }; + ibanLengths: Record; + mnemonic: { counts: number[]; words: string[] }; }; const SPEC_SUPPORTED_VERSION = 1; diff --git a/ts/src/strict.ts b/ts/src/strict.ts index 9f320db..39c7716 100644 --- a/ts/src/strict.ts +++ b/ts/src/strict.ts @@ -259,7 +259,7 @@ export function* strictWalk( } continue; } - const childVerdict = strongerVerdict(top.verdict, keyVerdict(key)); + const childVerdict = strongerVerdict(top.verdict, keyVerdict(key, child)); pending = { value: child, verdict: childVerdict, depth: top.depth + 1 }; } } @@ -280,4 +280,3 @@ export async function runStrictAsync( while (step.done !== true) step = walk.next(await scan(step.value)); return step.value; } - diff --git a/ts/src/sync-rules.ts b/ts/src/sync-rules.ts index 9d76f92..8528a9a 100644 --- a/ts/src/sync-rules.ts +++ b/ts/src/sync-rules.ts @@ -1,5 +1,5 @@ /** - * sync-rules.ts — the deterministic, regex-only rule set, and the ONE rule + * sync-rules.ts — the deterministic rule set, and the ONE rule * source of both entry points (the async path adds the full-tier rules of * `full-rules.ts` on top). The rules, their order and their parameters are the spec's * (`spec/rules.json`: `pipeline`, edited by `strict` in strict mode, then `pii` when asked for); this @@ -8,9 +8,12 @@ * Every rule is linear-time or bounded per candidate. Only ranges leave this * module; it never logs or returns matched text. */ +import { prepareIban, type IbanShape } from './algorithms/iban.js'; +import { prepareMnemonic } from './algorithms/mnemonic.js'; import { collectHits, prepareRules, type PreparedRule } from './algorithms/registry.js'; import { dedupeRanges, type Hit } from './hits.js'; import type { RedactMode } from './mode.js'; +import type { Range } from './portable.js'; import { ALGORITHMS_SPEC, RULES_SPEC, strictRules } from './spec.js'; /** What decides the rule list of a scan: the failure mode and the opt-in `pii` group. */ @@ -24,19 +27,68 @@ export function scanFloor(opts: DetectOpts): number { return opts.mode === 'strict' || opts.pii === true ? 0 : COMPAT_MIN_LENGTH; } -const PII = prepareRules(RULES_SPEC.pii); -const COMPAT = prepareRules(RULES_SPEC.pipeline); -const STRICT = prepareRules(strictRules(RULES_SPEC.pipeline)); -const RULE_LISTS: Record = { - compat: { plain: COMPAT, withPii: [...COMPAT, ...PII] }, - strict: { plain: STRICT, withPii: [...STRICT, ...PII] }, -}; +type PiiRule = PreparedRule | { ruleId: string; scanIban: ReturnType }; + +const PII = RULES_SPEC.pii.flatMap((rule) => + rule.kind === 'iban' + ? [{ ruleId: rule.id, scanIban: prepareIban(rule as Parameters[0]) }] + : prepareRules([rule]), +); +const mnemonicRules = RULES_SPEC.pipeline.filter((rule) => rule.kind === 'mnemonic'); +const mnemonic = mnemonicRules[0]; +if (mnemonic === undefined || mnemonicRules.length !== 1) throw new Error('redaction spec needs exactly one mnemonic rule'); +const MNEMONIC_ID = mnemonic.id; +const scanMnemonic = prepareMnemonic(mnemonic as Parameters[0]); +const standard = RULES_SPEC.pipeline.filter((rule) => rule.kind !== 'mnemonic'); +const COMPAT = prepareRules(standard); +const STRICT = prepareRules(strictRules(standard)); +const RULE_LISTS: Record = { compat: COMPAT, strict: STRICT }; + +function collectPiiHits(text: string): Hit[] { + const hits: Hit[] = []; + let shapes: IbanShape[] = []; + const whole: Range[] = [[0, text.length]]; + let segments = whole; + for (const rule of PII) { + if ('scanIban' in rule) { + shapes = rule.scanIban(text); + let start = 0; + segments = []; + for (const { range, valid } of shapes) { + if (!valid) continue; + hits.push({ ruleId: rule.ruleId, range }); + if (start < range[0]) segments.push([start, range[0]]); + start = Math.max(start, range[1]); + } + if (start < text.length) segments.push([start, text.length]); + continue; + } + const numeric = rule.ruleId === 'phone' || rule.ruleId === 'card'; + let nextShape = 0; + for (const [offset, limit] of numeric ? segments : whole) { + for (const [start, end] of rule.scan(text.slice(offset, limit))) { + const range: Range = [offset + start, offset + end]; + if (numeric) { + // Both the scanner and the IBAN envelopes run in ascending start order. + let shape = shapes[nextShape]; + while (shape !== undefined && shape.range[1] <= range[0]) shape = shapes[++nextShape]; + if (shape !== undefined && shape.range[0] < range[1]) continue; + } + hits.push({ ruleId: rule.ruleId, range }); + } + } + } + return hits; +} /** Every secret range the deterministic rules find in `text`, overlapping * ranges merged. Earlier rules win equal starts (the merged hit keeps the first * rule's id). */ -export function detectSyncHits(text: string, opts: DetectOpts = {}): Hit[] { +export function detectSyncHits(text: string, opts: DetectOpts = {}, full: readonly Hit[] = []): Hit[] { if (text.length < scanFloor(opts)) return []; - const lists = RULE_LISTS[opts.mode ?? 'compat']; - return dedupeRanges(collectHits(opts.pii === true ? lists.withPii : lists.plain, text)); + const hits = collectHits(RULE_LISTS[opts.mode ?? 'compat'], text); + const pii = opts.pii === true ? collectPiiHits(text) : []; + const selected = dedupeRanges([...full, ...hits, ...pii]).map((hit) => hit.range); + const mnemonicHits = scanMnemonic(text, selected).map((range) => ({ ruleId: MNEMONIC_ID, range })); + return dedupeRanges([...full, ...hits, ...mnemonicHits, ...pii]); } From 72b707cba2590c6c272171453137134b2b96f758 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:14:53 +0100 Subject: [PATCH 06/30] fix(redaction): MCP gap rules, part 8 (DRO-4114) --- ts/src/algorithms/bip39.ts | 57 ++++++++++++++ ts/src/algorithms/closing-quote.ts | 12 +++ ts/src/algorithms/iban.ts | 49 ++++++++++++ ts/src/algorithms/mnemonic.ts | 116 +++++++++++++++++++++++++++++ 4 files changed, 234 insertions(+) create mode 100644 ts/src/algorithms/bip39.ts create mode 100644 ts/src/algorithms/closing-quote.ts create mode 100644 ts/src/algorithms/iban.ts create mode 100644 ts/src/algorithms/mnemonic.ts diff --git a/ts/src/algorithms/bip39.ts b/ts/src/algorithms/bip39.ts new file mode 100644 index 0000000..f5ea5a9 --- /dev/null +++ b/ts/src/algorithms/bip39.ts @@ -0,0 +1,57 @@ +import { foldLower } from '../portable.js'; +import { ALGORITHMS_SPEC } from '../spec.js'; + +const WORDS = new Map(ALGORITHMS_SPEC.mnemonic.words.map((word, index) => [word, index])); +const PREFIX = /[ \t]*([A-Za-z]{3,8})[ \t]+([A-Za-z]{3,8})[ \t]+([A-Za-z]{3,8})(?![A-Za-z0-9_])/y; + +export function bip39Word(word: string): number | undefined { + return WORDS.get(foldLower(word)); +} + +export function beginsWithBip39Words(value: string, start = 0): boolean { + PREFIX.lastIndex = start; + const match = PREFIX.exec(value); + return match !== null && match.slice(1).every((word) => bip39Word(word) !== undefined); +} + +// FIPS 180-4 SHA-256 round constants. BIP39 entropy (16–32 bytes) fits one padded block. +const ROUND = [ + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2, +]; +const rotate = (value: number, by: number): number => (value >>> by) | (value << (32 - by)); + +/** A window of a supported BIP39 size; words are their zero-based 11-bit indices. */ +export function validBip39Checksum(words: readonly number[], from: number, count: number, block: Uint32Array): boolean { + block.fill(0, 0, 16); + const checksumBits = count / 3; + const entropyBits = count * 11 - checksumBits; + for (let bit = 0; bit < entropyBits; bit += 1) { + const index = words[from + Math.floor(bit / 11)]!; + block[bit >>> 5]! |= ((index >>> (10 - bit % 11)) & 1) << (31 - (bit & 31)); + } + block[entropyBits >>> 5]! |= 1 << (31 - (entropyBits & 31)); + block[15] = entropyBits; + for (let i = 16; i < 64; i += 1) { + const x = block[i - 15]!; + const y = block[i - 2]!; + const s0 = rotate(x, 7) ^ rotate(x, 18) ^ (x >>> 3); + const s1 = rotate(y, 17) ^ rotate(y, 19) ^ (y >>> 10); + block[i] = block[i - 16]! + s0 + block[i - 7]! + s1; + } + let a = 0x6a09e667, b = 0xbb67ae85, c = 0x3c6ef372, d = 0xa54ff53a; + let e = 0x510e527f, f = 0x9b05688c, g = 0x1f83d9ab, h = 0x5be0cd19; + for (let i = 0; i < 64; i += 1) { + const t1 = h + (rotate(e, 6) ^ rotate(e, 11) ^ rotate(e, 25)) + ((e & f) ^ (~e & g)) + ROUND[i]! + block[i]!; + const t2 = (rotate(a, 2) ^ rotate(a, 13) ^ rotate(a, 22)) + ((a & b) ^ (a & c) ^ (b & c)); + h = g; g = f; f = e; e = (d + t1) | 0; + d = c; c = b; b = a; a = (t1 + t2) | 0; + } + return ((a + 0x6a09e667) >>> (32 - checksumBits)) === (words[from + count - 1]! & ((1 << checksumBits) - 1)); +} diff --git a/ts/src/algorithms/closing-quote.ts b/ts/src/algorithms/closing-quote.ts new file mode 100644 index 0000000..fefee87 --- /dev/null +++ b/ts/src/algorithms/closing-quote.ts @@ -0,0 +1,12 @@ +/** Closing quote of a value that opened at `from`, or -1. `layers` is the number of + * escape backslashes before the opening quote (escaped JSON). */ +export function closingQuote(text: string, from: number, quote: string, layers: number, limit: number): number { + for (let i = from; i < limit; i++) { + if (text[i] !== quote) continue; + let run = 0; + while (i - run - 1 >= from && text[i - run - 1] === '\\') run += 1; + const closes = layers === 0 ? run % 2 === 0 : run === layers; + if (closes) return i - run; + } + return -1; +} diff --git a/ts/src/algorithms/iban.ts b/ts/src/algorithms/iban.ts new file mode 100644 index 0000000..4ebe0bb --- /dev/null +++ b/ts/src/algorithms/iban.ts @@ -0,0 +1,49 @@ +import { compile, type Range } from '../portable.js'; +import { ALGORITHMS_SPEC, type Rule } from '../spec.js'; + +type IbanRule = Rule & { pattern: string }; +export type IbanShape = { range: Range; valid: boolean }; + +const ALNUM = /[A-Za-z0-9]/; +const WORD = /[A-Za-z0-9_]/; + +export function prepareIban(rule: IbanRule): (text: string) => IbanShape[] { + const lead = compile(rule.pattern, 'g'); + const lengths = ALGORITHMS_SPEC.ibanLengths; + return (text) => { + const shaped: IbanShape[] = []; + lead.lastIndex = 0; + for (let match = lead.exec(text); match !== null; match = lead.exec(text)) { + const start = match.index; + const before = text[start - 1]; + if (before === '-' || before === '.') continue; + let end = lead.lastIndex; + let compact = match[0].toUpperCase(); + const length = lengths[compact.slice(0, 2)]; + if (length === undefined) continue; + const spaced = text[end] === ' '; + while (compact.length < length) { + if (spaced && compact.length % 4 === 0) { + if (text[end] !== ' ') break; + end += 1; + } + const unit = text[end]; + if (unit === undefined || !ALNUM.test(unit)) break; + compact += unit.toUpperCase(); + end += 1; + } + if (compact.length !== length || WORD.test(text[end] ?? '')) continue; + const check = Number(compact.slice(2, 4)); + let remainder = 0; + for (const unit of compact.slice(4) + compact.slice(0, 4)) { + const digit = unit.charCodeAt(0); + remainder = digit >= 65 + ? (100 * remainder + digit - 55) % 97 + : (10 * remainder + digit - 48) % 97; + } + const valid = check >= 2 && check <= 98 && remainder === 1; + shaped.push({ range: [start, end], valid }); + } + return shaped; + }; +} diff --git a/ts/src/algorithms/mnemonic.ts b/ts/src/algorithms/mnemonic.ts new file mode 100644 index 0000000..183fca6 --- /dev/null +++ b/ts/src/algorithms/mnemonic.ts @@ -0,0 +1,116 @@ +import { placeholderEndAt } from '../placeholder.js'; +import { charTest, compile, foldLower, runEnd, type Range } from '../portable.js'; +import { ALGORITHMS_SPEC, type Rule } from '../spec.js'; +import { beginsWithBip39Words, bip39Word, validBip39Checksum } from './bip39.js'; +import { closingQuote } from './closing-quote.js'; + +type MnemonicRule = Rule & { label: string; pattern: string; lineEnd: string; gapClass: string; ignoreBeforeClass: string }; + +const COUNTS = new Set(ALGORITHMS_SPEC.mnemonic.counts); +const MIN_WORD = Math.min(...ALGORITHMS_SPEC.mnemonic.words.map((word) => word.length)); +const MIN_COUNT = Math.min(...COUNTS); +const MIN_PHRASE = MIN_COUNT * (MIN_WORD + 1) - 1; + +export function prepareMnemonic(rule: MnemonicRule) { + const label = compile(rule.label, 'g'); + const token = compile(rule.pattern, 'g'); + const newline = compile(rule.lineEnd, 'g'); + const isGap = charTest(rule.gapClass); + const blocksBefore = charTest(rule.ignoreBeforeClass); + + return (text: string, selected: readonly Readonly[]): Range[] => { + const ranges: Range[] = []; + let lineEnd = -1; + let queryEnd = -1; + let nextSelected = 0; + let match: RegExpExecArray | null; + label.lastIndex = 0; + while ((match = label.exec(text)) !== null) { + if (match.index > 0 && blocksBefore(text[match.index - 1] as string)) continue; + let start = label.lastIndex; + if (lineEnd < start) { + newline.lastIndex = start; + lineEnd = newline.exec(text)?.index ?? text.length; + } + const seed = /^(?:seed|"seed"|'seed')$/.test(foldLower(match[1]!)); + while (true) { + let next = placeholderEndAt(text, start); + if (seed) { + while (selected[nextSelected] !== undefined && selected[nextSelected]![1] <= start) nextSelected++; + const span = selected[nextSelected]; + if (span?.[0] === start && span[1] <= lineEnd) next = Math.max(next, span[1]); + } + if (next === -1 || next > lineEnd) break; + start = next; + } + if (seed && !beginsWithBip39Words(text, start)) continue; + const before = text[match.index - 1]; + const query = before === '?' || before === '&'; + const quote = match[2]; + let limit = lineEnd; + if (query) { + if (queryEnd < start) { + queryEnd = start; + while (queryEnd < limit && text[queryEnd] !== '&' && text[queryEnd] !== '#') queryEnd++; + } + limit = queryEnd; + } + const close = quote === undefined ? -1 : closingQuote(text, start, quote, 0, limit); + let end = close === -1 ? limit : close; + if (close === -1) { + for (let at = start; at < end; at += 1) { + if (',}];'.includes(text[at]!)) { end = at; break; } + } + } + if (start < end && runEnd(text, start, isGap, end - start) < end) { + ranges.push([start, end]); + label.lastIndex = end; + } + } + if (text.length < MIN_PHRASE) return ranges; + + // A non-token, non-gap unit models a replacement without moving any offsets. + if (selected.length || ranges.length) { + const parts: string[] = []; + let cursor = 0; + for (const [start, end] of [...selected, ...ranges].sort((a, b) => a[0] - b[0])) { + if (end <= cursor) continue; + const from = Math.max(cursor, start); + parts.push(text.slice(cursor, from), '\0'.repeat(end - from)); + cursor = end; + } + parts.push(text.slice(cursor)); + text = parts.join(''); + } + + const words: number[] = []; + const spans: Range[] = []; + let block: Uint32Array | undefined; + function flush(): void { + if (COUNTS.has(words.length)) ranges.push([spans[0]![0], spans[words.length - 1]![1]]); + else if (words.length > MIN_COUNT) { + block ??= new Uint32Array(64); + for (let start = 0; start + MIN_COUNT <= words.length; start += 1) { + for (const count of COUNTS) { + if (start + count <= words.length && validBip39Checksum(words, start, count, block)) { + ranges.push([spans[start]![0], spans[start + count - 1]![1]]); + } + } + } + } + words.length = spans.length = 0; + } + token.lastIndex = 0; + while ((match = token.exec(text)) !== null) { + const word = match[0]; + const index = word.length >= MIN_WORD && word.length <= 8 ? bip39Word(word) : undefined; + const end = spans.at(-1)?.[1]; + if (end !== undefined && (index === undefined || runEnd(text, end, isGap) !== match.index)) flush(); + if (index === undefined) continue; + words.push(index); + spans.push([match.index, token.lastIndex]); + } + flush(); + return ranges; + }; +} From e76e1f5079592e5c3dbf887e73f17cb0e3b32c0a Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:16:26 +0100 Subject: [PATCH 07/30] fix(redaction): MCP gap rules, part 9 (DRO-4114) --- go/spec/keys.json | 2 ++ go/spec/rules.json | 43 ++++++++++++++++++++++++++++++---- go/spec/vectors/key-names.json | 16 ++++++++++++- go/spec/vectors/keywords.json | 32 ++++++++++++++++++++++++- 4 files changed, 87 insertions(+), 6 deletions(-) diff --git a/go/spec/keys.json b/go/spec/keys.json index 55bffcc..5afe62c 100644 --- a/go/spec/keys.json +++ b/go/spec/keys.json @@ -1,6 +1,8 @@ { "specVersion": 1, "description": "Key-name word lists of the key-name matcher (SPEC.md section 6).", + "localizedPasswords": ["passwort", "kennwort", "contraseña", "mot de passe", "mdp", "senha", "parola d'ordine", "parola d’ordine", "пароль", "wachtwoord", "hasło", "şifre", "lösenord"], + "mnemonicKeys": ["mnemonic", "mnemonic phrase", "recovery phrase", "seed phrase"], "structuralSkipKeys": [ "type", "id" diff --git a/go/spec/rules.json b/go/spec/rules.json index 285d217..6d9d043 100644 --- a/go/spec/rules.json +++ b/go/spec/rules.json @@ -16,6 +16,19 @@ "DQ_UNIT": "(?:[^\"\\\\\r\n]|\\\\[^\r\n])", "SQ_UNIT": "(?:[^'\\\\\r\n]|\\\\[^\r\n])", "BARE_VALUE": "[^{{WS}},;\"'{}\\[\\]\\\\]+", + "MNEMONIC_KEY": {"join": " ", "words": [["mnemonic", "phrase"], ["recovery", "phrase"], ["seed", "phrase"], ["mnemonic"], ["seed"]]}, + "OTP_BRAND": {"join": "", "words": [["google"], ["instagram"], ["telegram"], ["uber"], ["whatsapp"]]}, + "OTP_YOUR": {"join": "", "words": [["your"]]}, + "OTP_SUFFIX_EN": {"join": " ", "words": [["is", "your"]]}, + "OTP_SUFFIX_DE": {"join": " ", "words": [["ist", "dein"], ["ist", "ihr"]]}, + "OTP_SUFFIX_FR": {"join": " ", "words": [["est", "votre"], ["est", "ton"]]}, + "OTP_SUFFIX_ES": {"join": " ", "words": [["es", "tu"], ["es", "su"]]}, + "OTP_USE": {"join": "", "words": [["use"]]}, + "OTP_SIGN_IN": {"join": " ", "words": [["to", "sign", "in"]]}, + "OTP_SPANISH": "[cC][óÓoO][dD][iI][gG][oO] [dD][eE] [vV][eE][rR][iI][fF][iI][cC][aA][cC][iI][óÓoO][nN]", + "OTP_SPANISH_JOIN": "[ \t:=]{1,3}(?:[eE][sS][ \t]{1,3})?", + "OTP_CODE_DIGITS": "(?:[0-9]{3}[ -][0-9]{3}|[0-9]{4,8})", + "OTP_OLD_MARKER": "\\[REDACTED(?::[^\\[\\]:{{WS}}]{1,128}(?::[^\\[\\]]{0,4})?)?\\]", "PHONE_EXT": "(?:[ \t]{1,4}(?:[eE][xX][tT]\\.?|[xX])[ \t]{0,4}[0-9]{1,8}\\b)?", "OCTET": "(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])", "OTP_JOIN": "[{{WS}}:=:]{0,3}(?:(?:{{OTP_IS}}|[为是は])[{{WS}}::]{0,3})?", @@ -435,7 +448,8 @@ "nestedLimit": 4096, "decodeBudget": 1000000, "dropPlaceholder": true - } + }, + {"id": "mnemonic", "kind": "mnemonic", "label": "(\"{{MNEMONIC_KEY}}\"|'{{MNEMONIC_KEY}}'|\\b{{MNEMONIC_KEY}})[ \t]*(?:=>|:=|[:=])[ \t]*([\"'])?", "pattern": "[A-Za-z0-9_]+", "lineEnd": "[\r\n\u2028\u2029]", "gapClass": "[ \t]", "ignoreBeforeClass": "[A-Za-z0-9_.\\-]"} ], "statusWords": ["expired", "required", "failed", "missing", "invalid", "true", "false", "null", "none"], "strict": [ @@ -486,7 +500,7 @@ "escapeStop": "[\\\\\"']", "identChar": "[A-Za-z0-9_%-]", "labelLookback": 64, - "keyChar": "[A-Za-z0-9_-]", + "keyChar": "[A-Za-z0-9_À-ÖØ-öø-ÿĀ-ž̀-ͯА-яЁёK-]", "keyMax": 64, "gapClass": "[{{WS}}]", "quoteChar": "[\"']", @@ -567,6 +581,11 @@ ".cpp" ] }, + {"id": "iban", "kind": "iban", "pattern": "\\b[A-Za-z]{2}[0-9]{2}"}, + {"id": "card", "kind": "regex", "pattern": "\\b[1-9](?:[ -]?[0-9]){12,18}\\b", "check": "luhn", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "ignoreAfterLabels": ["invoice number"], "afterGapClass": "[ \t:=#]"}, + {"id": "phone", "kind": "regex", "pattern": "\\b00[1-9](?:[ .-]?[0-9]){7,14}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, + {"id": "phone", "kind": "regex", "pattern": "\\b(?:0(?:30|40|69|89)|0(?:2[0-9]|3[3-9]|4[1-9]|5[0-9]|6[0-8]|7[0-9]|8[0-8]|9[0-9])[0-9]{1,2})[ -][1-9][0-9]{5,8}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, + {"id": "phone", "kind": "regex", "pattern": "\\b(?:015[0-9]|01[67][0-9])[ -][0-9]{7,8}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, { "id": "phone", "kind": "regex", @@ -622,10 +641,12 @@ "kind": "regex", "pattern": "\\b0[0-9][ .-][0-9]{2}[ .-][0-9]{2}[ .-][0-9]{2}[ .-][0-9]{2}\\b{{PHONE_EXT}}" }, + {"id": "ip", "kind": "regex", "pattern": "(?:\\b[0-9A-Fa-f]{1,4}:|::)[0-9A-Fa-f:]{0,38}%[A-Za-z0-9_~-](?:[A-Za-z0-9_~.-]{0,62}[A-Za-z0-9_~-])?", "check": "ipv6-zone", "minColons": 2, "ignoreBeforeClass": "[0-9A-Za-z_:%]", "ignoreAfterClass": "[0-9A-Za-z_~%-]"}, { "id": "ip", "kind": "regex", "pattern": "\\b{{OCTET}}\\.{{OCTET}}\\.{{OCTET}}\\.{{OCTET}}\\b", + "ignoreEquals": ["0.0.0.0"], "ignoreAfterWords": [ "v", "version", @@ -668,12 +689,14 @@ { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}){{OTP_JOIN}}([0-9]{4,8})\\b", "group": 1 }, { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "(?:\\b(?:{{OTP_NOUN}}|2[fF][aA])|{{OTP_NOUN_CJK}}){{OTP_JOIN_PLUS}}([0-9]{3}[ -][0-9]{3})\\b", "group": 1, "ignoreAfterClass": "[-0-9]" @@ -681,6 +704,7 @@ { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "(?:(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}){{OTP_WAS}}|\\b2[fF][aA]{{OTP_JOIN_PLUS}})([0-9]{4,8})\\b", "group": 1, "ignoreAfterClass": "[-0-9]" @@ -688,8 +712,10 @@ { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}{{OTP_JOIN_PLUS}}([0-9]{6,8})\\b", "group": 1, + "ignoreAfterLabels": ["http error"], "ignoreAfterWords": [ "error", "exit", @@ -698,10 +724,19 @@ "postal", "zip", "area", - "country" + "country", + "invoice", + "order" ], "afterGapClass": "[{{WS}}]" - } + }, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_YOUR}} {{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b(?:{{OTP_YOUR}} )?{{OTP_BRAND}} {{OTP_BARE}}{{OTP_JOIN_PLUS}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}([A-Z0-9]{4,8})\\b", "group": 1, "requireClass": "[A-Z]", "numericEdges": "code", "ignoreAfterWords": ["error", "exit", "status", "response", "postal", "zip", "area", "country", "order", "invoice", "see", "source", "product"], "ignoreAfterLabels": ["http error"], "afterGapClass": "[{{WS}}]", "check": "otp-alphanumeric"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_SPANISH}}{{OTP_SPANISH_JOIN}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}|\\b{{OTP_SPANISH}}){{OTP_JOIN_PLUS}}{{OTP_OLD_MARKER}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b((?:[gG]-)?{{OTP_CODE_DIGITS}}) (?:{{OTP_SUFFIX_EN}} (?:(?:{{OTP_BRAND}} )?{{OTP_NOUN}}|{{OTP_BRAND}} {{OTP_BARE}})|{{OTP_SUFFIX_DE}} {{OTP_NOUN}}|{{OTP_SUFFIX_FR}} {{OTP_NOUN}}|{{OTP_SUFFIX_ES}} {{OTP_SPANISH}})\\b", "group": 1, "numericEdges": "code", "ignoreBeforeClass": "[-.]"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_USE}} ({{OTP_CODE_DIGITS}}) {{OTP_SIGN_IN}}\\b", "group": 1, "numericEdges": "code"} ], "full": [ { diff --git a/go/spec/vectors/key-names.json b/go/spec/vectors/key-names.json index 1b8b91b..1a1d011 100644 --- a/go/spec/vectors/key-names.json +++ b/go/spec/vectors/key-names.json @@ -459,6 +459,20 @@ "expected": { "Bearer [REDACTED:auth-header]": 1 } - } + }, + {"name": "MCP gap: German password label", "input": "Passwort=geheim123", "mode": "strict", "expected": "Passwort=[REDACTED:generic-keyword]"}, + {"name": "MCP gap: German password in raw JSON", "input": "{\"passwort\":\"geheim123\"}", "mode": "strict", "expected": "{\"passwort\":\"[REDACTED:generic-keyword]\"}"}, + {"name": "MCP gap: German alternative label", "input": "Kennwort: geheim123", "mode": "strict", "expected": "Kennwort: [REDACTED:generic-keyword]"}, + {"name": "MCP gap: Spanish label", "input": "contraseña: geheim123", "mode": "strict", "expected": "contraseña: [REDACTED:generic-keyword]"}, + {"name": "MCP gap: canonical Unicode aliases", "input": {"CONTRASEÑA": "a", "mot de passe": "b", "senha": "c", "PAROLA D’ORDINE": "d", "ПАРОЛЬ": "e", "PasswortPolicy": "keep", "passwort_hint": "keep"}, "mode": "strict", "expected": {"CONTRASEÑA": "[REDACTED:key-context]", "mot de passe": "[REDACTED:key-context]", "senha": "[REDACTED:key-context]", "PAROLA D’ORDINE": "[REDACTED:key-context]", "ПАРОЛЬ": "[REDACTED:key-context]", "PasswortPolicy": "keep", "passwort_hint": "keep"}}, + {"name": "MCP gap: Turkish dotted capital I", "input": "ŞİFRE=geheim123", "mode": "strict", "expected": "ŞİFRE=[REDACTED:generic-keyword]"}, + {"name": "MCP gap: localized parsed key in default mode", "input": {"MOT DE PASSE": "a"}, "expected": {"MOT DE PASSE": "[REDACTED:key-context]"}}, + {"name": "MCP gap: localized unquoted text label", "input": "set MOT DE PASSE: hunter2; parola d'ordine=geheim123; ПАРОЛЬ=secret123", "mode": "strict", "expected": "set MOT DE PASSE: [REDACTED:generic-keyword]; parola d'ordine=[REDACTED:generic-keyword]; ПАРОЛЬ=[REDACTED:generic-keyword]"}, + {"name": "MCP gap: not localized key suffixes", "input": "not-passwort=keep; passwort_hint=keep; contraseñaSegura: keep", "mode": "strict", "expected": "not-passwort=keep; passwort_hint=keep; contraseñaSegura: keep"}, + {"name": "MCP gap: quoted localized key is exact", "input": "{\"x passwort\":\"visible\",\"contraseÑa\":\"mask\"}", "mode": "strict", "expected": "{\"x passwort\":\"visible\",\"contraseÑa\":\"[REDACTED:generic-keyword]\"}"}, + {"name": "gap review: Kelvin-sign key in raw JSON", "input": "{\"\u212aennwort\":\"abc\"}", "mode": "strict", "expected": "{\"\u212aennwort\":\"[REDACTED:generic-keyword]\"}"}, + {"name": "gap review: Kelvin-sign key in parsed JSON", "input": {"\u212aennwort": "abc"}, "mode": "strict", "expected": {"\u212aennwort": "[REDACTED:key-context]"}}, + {"name": "gap review: parsed diagnostic seed values", "input": {"seed": 42, "Seed": "ordinary value", "status": "keep"}, "expected": {"seed": 42, "Seed": "ordinary value", "status": "keep"}}, + {"name": "gap review: parsed recovery seed and phrases", "input": {"seed": "abandon ability able about …", "recovery phrase": "unlisted content", "seed phrase": "unlisted content"}, "expected": {"seed": "[REDACTED:key-context]", "recovery phrase": "[REDACTED:key-context]", "seed phrase": "[REDACTED:key-context]"}} ] } diff --git a/go/spec/vectors/keywords.json b/go/spec/vectors/keywords.json index bed6866..6d1a721 100644 --- a/go/spec/vectors/keywords.json +++ b/go/spec/vectors/keywords.json @@ -450,6 +450,36 @@ {"name": "review: a session start message is not a secret", "input": "session: started at 10:00", "mode": "strict", "opts": {"pii": true}, "expected": "session: started at 10:00"}, {"name": "compat: no scheme-prefixed token assignment scan", "input": "token=Basic hunter2", "mode": "compat", "opts": {"pii": true}, "expected": "token=Basic hunter2"}, {"name": "compat: no sessionid assignment scan", "input": "sessionid=x", "mode": "compat", "opts": {"pii": true}, "expected": "sessionid=x"}, - {"name": "compat: a placeholder does not consume the closing brace", "input": "{\"token\":[REDACTED:github]}", "mode": "compat", "opts": {"pii": true}, "expected": "{\"token\":[REDACTED:github]}"} + {"name": "compat: a placeholder does not consume the closing brace", "input": "{\"token\":[REDACTED:github]}", "mode": "compat", "opts": {"pii": true}, "expected": "{\"token\":[REDACTED:github]}"}, + {"name": "MCP gap: mnemonic key consumes line", "input": "mnemonic: abandon ability able about …\nnext line", "mode": "strict", "expected": "mnemonic: [REDACTED:mnemonic]\nnext line"}, + {"name": "MCP gap: seed key consumes line", "input": "seed: abandon ability able about …", "mode": "strict", "expected": "seed: [REDACTED:mnemonic]"}, + {"name": "mnemonic keeps single-quoted spaces", "input": "seed: ' '", "mode": "strict", "expected": "seed: ' '"}, + {"name": "mnemonic keeps double-quoted spaces", "input": "seed: \" \"", "mode": "strict", "expected": "seed: \" \""}, + {"name": "mnemonic keeps an unquoted blank value", "input": "mnemonic: ", "mode": "strict", "expected": "mnemonic: "}, + {"name": "MCP gap: seed JSON value stops at the closing quote", "input": "{\"seed\":\"abandon ability able about …\",\"next\":\"keep\"}", "mode": "strict", "expected": "{\"seed\":\"[REDACTED:mnemonic]\",\"next\":\"keep\"}"}, + {"name": "MCP gap: seed structured JSON key", "input": {"mnemonic": "abandon ability able about"}, "mode": "strict", "expected": {"mnemonic": "[REDACTED:key-context]"}}, + {"name": "MCP gap: keyed and bare mnemonic in default mode", "input": "MNEMONIC: some secret text\nabandon ability able about above absent absorb abstract absurd abuse access accident", "expected": "MNEMONIC: [REDACTED:mnemonic]\n[REDACTED:mnemonic]"}, + {"name": "MCP gap: 12 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: 15 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: 18 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: 21 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire across act action.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: 24 BIP39 words", "input": "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire across act action actor actress actual.", "mode": "strict", "expected": "[REDACTED:mnemonic]."}, + {"name": "MCP gap: ordinary prose and unaccepted count", "input": "The journalist described how the committee resolved an unexpectedly complicated administrative issue.\nabandon ability able about above absent absorb abstract absurd abuse access accident account", "mode": "strict", "expected": "The journalist described how the committee resolved an unexpectedly complicated administrative issue.\nabandon ability able about above absent absorb abstract absurd abuse access accident account"}, + {"name": "MCP gap: not a seed key", "input": "random_seed: 123; seedling: apple", "mode": "strict", "expected": "random_seed: 123; seedling: apple"}, + {"name": "gap review: checksum-valid 12-word window in prose", "input": "Use abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about", "expected": "Use [REDACTED:mnemonic]"}, + {"name": "gap review: invalid checksum in every window of a long run", "input": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon", "expected": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon"}, + {"name": "gap review: diagnostic seed in compat without PII", "input": "RNG seed=1234 caused the crash", "expected": "RNG seed=1234 caused the crash"}, + {"name": "gap review: unquoted numeric seed in raw JSON", "input": "{\"seed\":42,\"status\":\"keep\"}", "mode": "strict", "expected": "{\"seed\":42,\"status\":\"keep\"}"}, + {"name": "gap review: masked seed stops at an object delimiter", "input": "{\"seed\":abandon ability able about,\"status\":\"keep\"}", "expected": "{\"seed\":[REDACTED:mnemonic],\"status\":\"keep\"}"}, + {"name": "gap review: already masked seed preserves a closing brace", "input": "seed: [REDACTED:mnemonic]}", "expected": "seed: [REDACTED:mnemonic]}"}, + {"name": "gap review: named recovery phrase allows any value", "input": "recovery phrase: kept-out; seed phrase: elsewhere]", "expected": "recovery phrase: [REDACTED:mnemonic]; seed phrase: [REDACTED:mnemonic]]"}, + {"name": "gap review: quoted mnemonic keeps surrounding raw JSON", "input": "{\"mnemonic\":\"has a comma, and a brace }\",\"status\":\"keep\"}", "expected": "{\"mnemonic\":\"[REDACTED:mnemonic]\",\"status\":\"keep\"}"}, + {"name": "round two: rejected seed leaves the following mnemonic label visible to the scanner", "input": "seed: 42 mnemonic: my wallet backup", "expected": "seed: 42 mnemonic: [REDACTED:mnemonic]"}, + {"name": "round two: a password hit splits the mnemonic run on the first pass", "input": "password=abandon ability able about above absent absorb abstract absurd abuse access accident account", "expected": "password=[REDACTED:generic-keyword] [REDACTED:mnemonic]"}, + {"name": "round two: mnemonic preserves the closing escape run", "input": "mnemonic: \"abc\\\\\" tail", "expected": "mnemonic: \"[REDACTED:mnemonic]\\\\\" tail"}, + {"name": "round two: mnemonic query value stops before another parameter", "input": "https://example.test/?mnemonic=alpha&keep=1", "expected": "https://example.test/?mnemonic=[REDACTED:key-context]&keep=1"}, + {"name": "round two: mnemonic query value stops before the fragment", "input": "https://example.test/?keep=1&mnemonic=alpha#section", "expected": "https://example.test/?keep=1&mnemonic=[REDACTED:key-context]#section"}, + {"name": "round three: seed skips a full-tier token on the first pass", "input": "seed: npm_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expectedSync": "seed: npm_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expectedAsync": "seed: [REDACTED:npm]"}, + {"name": "round three: seed skips a standard-tier token on the first pass", "input": "seed: dr_sk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expected": "seed: [REDACTED:platform-key]"} ] } From eaa2fadb28f9c0895bfb667224d4784642c01057 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:16:33 +0100 Subject: [PATCH 08/30] fix(redaction): MCP gap rules, part 12 (DRO-4114) --- spec/rules.json | 43 +++++++++++++++++++++++++--- spec/schema/algorithms.schema.json | 45 +++++++++++++++++++++++++++++- spec/schema/keys.schema.json | 24 +++++++++++++++- 3 files changed, 106 insertions(+), 6 deletions(-) diff --git a/spec/rules.json b/spec/rules.json index 285d217..6d9d043 100644 --- a/spec/rules.json +++ b/spec/rules.json @@ -16,6 +16,19 @@ "DQ_UNIT": "(?:[^\"\\\\\r\n]|\\\\[^\r\n])", "SQ_UNIT": "(?:[^'\\\\\r\n]|\\\\[^\r\n])", "BARE_VALUE": "[^{{WS}},;\"'{}\\[\\]\\\\]+", + "MNEMONIC_KEY": {"join": " ", "words": [["mnemonic", "phrase"], ["recovery", "phrase"], ["seed", "phrase"], ["mnemonic"], ["seed"]]}, + "OTP_BRAND": {"join": "", "words": [["google"], ["instagram"], ["telegram"], ["uber"], ["whatsapp"]]}, + "OTP_YOUR": {"join": "", "words": [["your"]]}, + "OTP_SUFFIX_EN": {"join": " ", "words": [["is", "your"]]}, + "OTP_SUFFIX_DE": {"join": " ", "words": [["ist", "dein"], ["ist", "ihr"]]}, + "OTP_SUFFIX_FR": {"join": " ", "words": [["est", "votre"], ["est", "ton"]]}, + "OTP_SUFFIX_ES": {"join": " ", "words": [["es", "tu"], ["es", "su"]]}, + "OTP_USE": {"join": "", "words": [["use"]]}, + "OTP_SIGN_IN": {"join": " ", "words": [["to", "sign", "in"]]}, + "OTP_SPANISH": "[cC][óÓoO][dD][iI][gG][oO] [dD][eE] [vV][eE][rR][iI][fF][iI][cC][aA][cC][iI][óÓoO][nN]", + "OTP_SPANISH_JOIN": "[ \t:=]{1,3}(?:[eE][sS][ \t]{1,3})?", + "OTP_CODE_DIGITS": "(?:[0-9]{3}[ -][0-9]{3}|[0-9]{4,8})", + "OTP_OLD_MARKER": "\\[REDACTED(?::[^\\[\\]:{{WS}}]{1,128}(?::[^\\[\\]]{0,4})?)?\\]", "PHONE_EXT": "(?:[ \t]{1,4}(?:[eE][xX][tT]\\.?|[xX])[ \t]{0,4}[0-9]{1,8}\\b)?", "OCTET": "(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])", "OTP_JOIN": "[{{WS}}:=:]{0,3}(?:(?:{{OTP_IS}}|[为是は])[{{WS}}::]{0,3})?", @@ -435,7 +448,8 @@ "nestedLimit": 4096, "decodeBudget": 1000000, "dropPlaceholder": true - } + }, + {"id": "mnemonic", "kind": "mnemonic", "label": "(\"{{MNEMONIC_KEY}}\"|'{{MNEMONIC_KEY}}'|\\b{{MNEMONIC_KEY}})[ \t]*(?:=>|:=|[:=])[ \t]*([\"'])?", "pattern": "[A-Za-z0-9_]+", "lineEnd": "[\r\n\u2028\u2029]", "gapClass": "[ \t]", "ignoreBeforeClass": "[A-Za-z0-9_.\\-]"} ], "statusWords": ["expired", "required", "failed", "missing", "invalid", "true", "false", "null", "none"], "strict": [ @@ -486,7 +500,7 @@ "escapeStop": "[\\\\\"']", "identChar": "[A-Za-z0-9_%-]", "labelLookback": 64, - "keyChar": "[A-Za-z0-9_-]", + "keyChar": "[A-Za-z0-9_À-ÖØ-öø-ÿĀ-ž̀-ͯА-яЁёK-]", "keyMax": 64, "gapClass": "[{{WS}}]", "quoteChar": "[\"']", @@ -567,6 +581,11 @@ ".cpp" ] }, + {"id": "iban", "kind": "iban", "pattern": "\\b[A-Za-z]{2}[0-9]{2}"}, + {"id": "card", "kind": "regex", "pattern": "\\b[1-9](?:[ -]?[0-9]){12,18}\\b", "check": "luhn", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "ignoreAfterLabels": ["invoice number"], "afterGapClass": "[ \t:=#]"}, + {"id": "phone", "kind": "regex", "pattern": "\\b00[1-9](?:[ .-]?[0-9]){7,14}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, + {"id": "phone", "kind": "regex", "pattern": "\\b(?:0(?:30|40|69|89)|0(?:2[0-9]|3[3-9]|4[1-9]|5[0-9]|6[0-8]|7[0-9]|8[0-8]|9[0-9])[0-9]{1,2})[ -][1-9][0-9]{5,8}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, + {"id": "phone", "kind": "regex", "pattern": "\\b(?:015[0-9]|01[67][0-9])[ -][0-9]{7,8}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, { "id": "phone", "kind": "regex", @@ -622,10 +641,12 @@ "kind": "regex", "pattern": "\\b0[0-9][ .-][0-9]{2}[ .-][0-9]{2}[ .-][0-9]{2}[ .-][0-9]{2}\\b{{PHONE_EXT}}" }, + {"id": "ip", "kind": "regex", "pattern": "(?:\\b[0-9A-Fa-f]{1,4}:|::)[0-9A-Fa-f:]{0,38}%[A-Za-z0-9_~-](?:[A-Za-z0-9_~.-]{0,62}[A-Za-z0-9_~-])?", "check": "ipv6-zone", "minColons": 2, "ignoreBeforeClass": "[0-9A-Za-z_:%]", "ignoreAfterClass": "[0-9A-Za-z_~%-]"}, { "id": "ip", "kind": "regex", "pattern": "\\b{{OCTET}}\\.{{OCTET}}\\.{{OCTET}}\\.{{OCTET}}\\b", + "ignoreEquals": ["0.0.0.0"], "ignoreAfterWords": [ "v", "version", @@ -668,12 +689,14 @@ { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}){{OTP_JOIN}}([0-9]{4,8})\\b", "group": 1 }, { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "(?:\\b(?:{{OTP_NOUN}}|2[fF][aA])|{{OTP_NOUN_CJK}}){{OTP_JOIN_PLUS}}([0-9]{3}[ -][0-9]{3})\\b", "group": 1, "ignoreAfterClass": "[-0-9]" @@ -681,6 +704,7 @@ { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "(?:(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}){{OTP_WAS}}|\\b2[fF][aA]{{OTP_JOIN_PLUS}})([0-9]{4,8})\\b", "group": 1, "ignoreAfterClass": "[-0-9]" @@ -688,8 +712,10 @@ { "id": "otp", "kind": "regex", + "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}{{OTP_JOIN_PLUS}}([0-9]{6,8})\\b", "group": 1, + "ignoreAfterLabels": ["http error"], "ignoreAfterWords": [ "error", "exit", @@ -698,10 +724,19 @@ "postal", "zip", "area", - "country" + "country", + "invoice", + "order" ], "afterGapClass": "[{{WS}}]" - } + }, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_YOUR}} {{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b(?:{{OTP_YOUR}} )?{{OTP_BRAND}} {{OTP_BARE}}{{OTP_JOIN_PLUS}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}([A-Z0-9]{4,8})\\b", "group": 1, "requireClass": "[A-Z]", "numericEdges": "code", "ignoreAfterWords": ["error", "exit", "status", "response", "postal", "zip", "area", "country", "order", "invoice", "see", "source", "product"], "ignoreAfterLabels": ["http error"], "afterGapClass": "[{{WS}}]", "check": "otp-alphanumeric"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_SPANISH}}{{OTP_SPANISH_JOIN}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}|\\b{{OTP_SPANISH}}){{OTP_JOIN_PLUS}}{{OTP_OLD_MARKER}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b((?:[gG]-)?{{OTP_CODE_DIGITS}}) (?:{{OTP_SUFFIX_EN}} (?:(?:{{OTP_BRAND}} )?{{OTP_NOUN}}|{{OTP_BRAND}} {{OTP_BARE}})|{{OTP_SUFFIX_DE}} {{OTP_NOUN}}|{{OTP_SUFFIX_FR}} {{OTP_NOUN}}|{{OTP_SUFFIX_ES}} {{OTP_SPANISH}})\\b", "group": 1, "numericEdges": "code", "ignoreBeforeClass": "[-.]"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_USE}} ({{OTP_CODE_DIGITS}}) {{OTP_SIGN_IN}}\\b", "group": 1, "numericEdges": "code"} ], "full": [ { diff --git a/spec/schema/algorithms.schema.json b/spec/schema/algorithms.schema.json index 5f55685..3cc9efd 100644 --- a/spec/schema/algorithms.schema.json +++ b/spec/schema/algorithms.schema.json @@ -14,7 +14,9 @@ "sync", "full", "strict", - "letters" + "letters", + "ibanLengths", + "mnemonic" ], "properties": { "specVersion": { @@ -317,6 +319,47 @@ "pattern": "^[0-9a-f]+(-[0-9a-f]+)?(,[0-9a-f]+(-[0-9a-f]+)?)*$" } } + }, + "ibanLengths": { + "type": "object", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^[A-Z]{2}$": { + "type": "integer", + "minimum": 15, + "maximum": 34 + } + } + }, + "mnemonic": { + "type": "object", + "additionalProperties": false, + "required": [ + "counts", + "words" + ], + "properties": { + "counts": { + "const": [ + 12, + 15, + 18, + 21, + 24 + ] + }, + "words": { + "type": "array", + "minItems": 2048, + "maxItems": 2048, + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[a-z]{3,8}$" + } + } + } } } } diff --git a/spec/schema/keys.schema.json b/spec/schema/keys.schema.json index d983ec2..30aeccf 100644 --- a/spec/schema/keys.schema.json +++ b/spec/schema/keys.schema.json @@ -13,7 +13,9 @@ "suffixWords", "prefixWords", "passLastWord", - "countWords" + "countWords", + "localizedPasswords", + "mnemonicKeys" ], "properties": { "specVersion": { @@ -98,6 +100,26 @@ "minLength": 1 }, "minItems": 1 + }, + "localizedPasswords": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + "mnemonicKeys": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } } } } From 67f7a2377a194a51a5fad5b747550fd1595133a1 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:16:38 +0100 Subject: [PATCH 09/30] fix(redaction): MCP gap rules, part 13 (DRO-4114) --- spec/SPEC.md | 250 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 200 insertions(+), 50 deletions(-) diff --git a/spec/SPEC.md b/spec/SPEC.md index 7c6e887..0a4b2f9 100644 --- a/spec/SPEC.md +++ b/spec/SPEC.md @@ -10,7 +10,7 @@ vectors alone, without reading the TypeScript. Words in capitals (MUST, MUST NOT, MAY) are used in the RFC 2119 sense. Contents: 1 Scope and units, 2 Portable grammar, 3 Spec files and macros, 4 Detection (4.1 to 4.10 standard -tier, 4.11 to 4.17 full tier, 4.18 to 4.22 strict pairs and the `pii` group), 5 Shared algorithms, 6 Key names, 7 Placeholders, hits and splicing, 8 JSON +tier, 4.11 to 4.17 full tier, 4.18 strict pairs, 4.19 to 4.24 the `pii` group, 4.25 mnemonics), 5 Shared algorithms, 6 Key names, 7 Placeholders, hits and splicing, 8 JSON contract, 9 Tiers and modes, 10 ReDoS rules, 11 Metadata, 12 Spec integrity, 13 TypeScript extensions, 14 Conformance vectors, 15 Known portability risks. @@ -85,7 +85,7 @@ The linter checks **every** regex-bearing field of a rule, found by name: `patte hold exactly one character class; `id`, `kind`, `lead`, `leads`, `separator`, `footerMarker`, `requireLiteral`, `lit`, `alt`, `tails`, `magic`, `ignoreEquals`, `userIgnoreContains`, `passwordIgnoreContains`, `passwordIgnoreEquals`, `stripLiteral`, -`newline`, `dash`, `underscore`, `check`, `plainWords`, `queryOnlyKeys`, `mode`, `ignoreSuffixes`, `ignoreAfterWords`, +`newline`, `dash`, `underscore`, `check`, `plainWords`, `queryOnlyKeys`, `mode`, `ignoreSuffixes`, `ignoreAfterWords`, `ignoreAfterLabels`, `schemeWords`, `schemeKeys` are literal text. The check looks into nested objects and lists (the `parts` of a token). A string field with another name is an error, so a new field cannot escape the checks. @@ -118,7 +118,7 @@ refuse to load. `spec/schema/*.schema.json` are JSON Schemas for the files. - `pipeline`: the ordered rule list of the standard tier in `compat` mode (sections 4.1 to 4.10); it is the v0.2.0 contract and holds no rule of `strict` or `pii`. - `strict`: the edits that turn the `pipeline` into the rule list of `strict` mode, a list of objects (section 4.10). -- `pii`: the ordered rules of the opt-in `pii` group (sections 4.19 to 4.22). +- `pii`: the ordered rules of the opt-in `pii` group (sections 4.19 to 4.24). - `full`: the ordered rule list of the full tier, the ported secretlint preset (sections 4.11 to 4.17). **Expansion.** Every string that is a pattern or a class is expanded before use: each `{{NAME}}` @@ -147,13 +147,16 @@ of section 5.6); they are named where they are used. ## 4. Detection -Sections 4.1 to 4.10 and 4.18 are the standard tier (4.18 only in `strict`), 4.11 to 4.17 the full tier, 4.19 to -4.22 the opt-in `pii` group. `detect(text, mode, pii)` returns the merged hits of the standard tier, with `mode` (`compat` or `strict`, -section 9) and `pii` (boolean, default false, section 9.5). +Sections 4.1 to 4.10 and 4.25 define the standard tier, plus 4.18 in `strict`. Sections 4.11 to 4.17 define the full tier; +4.19 to 4.24 define the opt-in `pii` group. `detect(text, mode, pii)` returns the merged hits of the standard tier, +with `mode` (`compat` or `strict`, section 9) and `pii` (boolean, default false, section 9.5). 1. Let `hits` be empty. For each rule of the rule list of `mode` (4.10) in order, then, when `pii` is true, for each rule of `pii` in order, run the rule kind below on the whole text. It returns ranges in the order given by its kind. Append `(rule.id, start, end)` for each range to `hits`. Several entries may share an id. + Drop PII `phone` and `card` hits that overlap an IBAN-shaped range as specified in 4.24; do not drop standard or full-tier hits. + For mnemonic word runs, use the other selected ranges as boundaries (4.25), including PII and, in full-tier + detection, full-tier hits. This does not change hit precedence on equal starts. 2. Return `merge(hits)` (section 7). In `compat` without `pii` the rules never see a text shorter than `text.minScanLength` (8): `redact` returns it @@ -170,8 +173,8 @@ Rule kinds. `P` is the expanded pattern text; `scan(P)` is the global search of ### 4.1 `regex` Fields: `pattern`, optional `group` (default 0), `notBefore`, `notAfter`, `requireClass`, -`requireLiteral`, `dropPlaceholder`, `ignoreEquals`, `ignoreStatusWords`, `ignoreSuffixes`, `ignoreAfterWords` with `afterGapClass`, -`ignoreBeforeClass`, `ignoreAfterClass`, `check` with `minColons`. +`requireLiteral`, `dropPlaceholder`, `ignoreEquals`, `ignoreStatusWords`, `ignoreSuffixes`, `ignoreAfterWords` with `afterGapClass`, `ignoreAfterLabels`, +`ignoreBeforeClass`, `ignoreAfterClass`, `numericEdges`, `ignoreDate`, `check` with `minColons`. 1. Find matches of `pattern` left to right. The candidate range is the whole match, or the span of capture group `group`. @@ -186,9 +189,12 @@ Fields: `pattern`, optional `group` (default 0), `notBefore`, `notAfter`, `requi sensitive); `ignoreStatusWords`: `lower(candidate)` is not in `rules.json`'s shared `statusWords` list (4.18); `ignoreSuffixes`: `lower(candidate)` does not end with one of the listed literals (the file extensions after the host of an email); `ignoreAfterWords`: the **word before the match** (below) is not one of - the listed words; `ignoreBeforeClass` / `ignoreAfterClass`: the unit before the **whole match** is not in the class, + the listed words; `ignoreAfterLabels`: skip up to 64 ASCII space, tab, colon, equals or hash units before + the whole match. Reject if a listed compound label ends there (ASCII case-insensitive, literal internal + spaces, preceded by start of text or a non-`[A-Za-z0-9_]` unit); `ignoreBeforeClass` / `ignoreAfterClass`: the unit before the **whole match** is not in the class, and the unit after it is not in the class (the match is not a piece of something longer; unlike `notBefore` and - `notAfter` they apply to a pattern of any length, and a dropped match is consumed); `check`: the named check of 5.8 accepts the candidate (`minColons` is its argument). An unknown + `notAfter` they apply to a pattern of any length, and a dropped match is consumed); `numericEdges` and `ignoreDate`: apply the numeric fragment and date guards of 5.9; `check`: the named check of 5.8 or 5.9 accepts + the candidate (`minColons` is the IPv6 argument). An unknown `check` name stops the package at load time. A candidate that fails a filter is dropped (the search is not restarted: the match was consumed). @@ -386,10 +392,12 @@ After the scan drop ranges that are empty or an `isPlaceholderValue` (`dropPlace keep the first rule's id (section 7): `jwt`, `gcp-api-key`, `xai-api-key`, `platform-token`, `platform-key`, `github`, `aws`, `slack`, `stripe`, `private-key`, `openai`, `url-credentials`, `cookie`, `auth-header`, then `generic-keyword` (keyword pairs, quoted pairs, unquoted pairs in -that order), then `key-context` (query values). +that order), then `key-context` (query values), then `mnemonic` (4.25). -**The rule list of a mode.** The list of `compat` is `pipeline`, with every field as written (the v0.2.0 contract, -section 9). The list of `strict` is built from it by the edits of `rules.json` `strict`, applied in order. An edit is an +**The rule list of a mode.** `pipeline` must contain exactly one rule of kind `mnemonic`. Select it by kind, +prepare it once for both modes, and give it the precedence listed above regardless of its position in `pipeline`. +Run it with the other selected ranges as specified in 4.25. For the other rules, `compat` uses `pipeline` as +written (section 9) and `strict` applies the edits in `rules.json` `strict`, in order. An edit is an object with `id` and/or `kind`: it matches every entry of the list whose `id` and `kind` equal those given (the list as the earlier edits left it); an edit that matches no entry stops the package at load time, and `tools/lint-spec` checks it. An edit has `set` (an object whose fields replace the fields of every matched entry) or `add` (a rule @@ -618,11 +626,22 @@ Scan `label` from position 0. For each match `m` (start `ms`, end `from`): at `from`, the start of the value, so that a pair inside the value (`auth: password: hunter2`, `Cookie: secret="x"`) is found too: its own range is inside or next to the outer one and the merge unions them. +Localized password names (section 6) are recognized by strict `key-pairs`. Locate the key as above using +`keyChar`, which includes the supported Latin/Cyrillic characters and combining marks. Try the alias lookup only +if the initial key token, normalized as in section 6, equals the last component of an alias split on ASCII +space, `'`, or `’`. If the closing quote has any immediately preceding backslashes, skip the alias lookup. +Otherwise, for a quoted key, look left to the nearest identical quote, stopping at a line break or after +`keyMax` content units. Compare all the content between the quotes, never a suffix of it. For an unquoted key, +try starts from the initial token start back through `keyMax` units before the key end. A start must be at the +start of text or preceded by a unit outside `keyChar` that is neither `'` nor `’`. Take the longest exact +normalized alias; internal spaces and apostrophes must match. If alias lookup fails, do not classify the +initial token as an alias on its own. This lookback leaves the scanned text and its offsets unchanged. + ### 4.19 The `pii` group and `email` -The opt-in group of section 9.5: the rules of `pii`, run after the rules of the mode, in this order: `email`, `phone`, -`ip`, `otp`. They are `regex` rules (4.1) with the filters of 4.1; placeholders are `[REDACTED:email]`, -`[REDACTED:phone]`, `[REDACTED:ip]`, `[REDACTED:otp]` (section 7). Their hits go into the same merge as the secret rules: +The opt-in group of section 9.5: the rules of `pii`, run after the rules of the mode, in this order: `email`, `iban`, +`card`, `phone`, `ip`, `otp`. Except for `iban` (4.24), they are `regex` rules with the filters of 4.1. Their hits +use those ids in placeholders and go into the same merge as the secret rules: where a PII range touches a secret range the group keeps the id of the earlier start (so `https://u:pass@host.example` with the option on becomes `https://u:[REDACTED:url-credentials]`, the host included: the email rule covers `pass@host.example`). @@ -656,8 +675,20 @@ The five original patterns (1–5) scan without extensions, independently of the extension-aware match overlaps a second phone number, both ranges are merged (section 7), so the tail of the second number does not remain visible. -A run of digits **without a separator** and without a `+` is never a number (`Request ID 1234567890`, -`/devices/1234567890`), nor are dates and times (`2026-11-19 10:00:59`), nor versions (`v0.3.0`). +Three additional entries scan before the five original patterns: + +- International `00`, a nonzero digit, and 7–14 more digits. A single space, dot or hyphen may precede + each of the additional digits; the `00` and first digit must be contiguous. This checks the E.164 length, + not country-code allocation. The optional `PHONE_EXT` applies. +- German landline: `030`, `040`, `069`, `089`, or a regional prefix of 4–5 digits (the explicit alternatives + in the rule), a single space or hyphen, + then 6–9 contiguous subscriber digits starting nonzero. This is a conservative shape, not an area-code registry. +- German mobile: `015` and one digit, or `016`/`017` and one digit, a single space or hyphen, then 7–8 contiguous + subscriber digits. Both German entries also accept `PHONE_EXT`. + +These three entries use `numericEdges: run` and the preceding-word exclusions in `rules.json` (`order`, `invoice`, +`version`, `build`, `timestamp`, `port`). Compact national numbers are still not found. Dates, times and +versions such as `2026-11-19 10:00:59` and `v0.3.0` are not new phone forms. ### 4.21 `ip` @@ -666,7 +697,7 @@ The range is the address only (a port stays: `192.0.2.123:8080` gives `[REDACTED 1. **IPv4**, RFC 791 dotted quad: four decimal octets 0 to 255 without leading zeros between word boundaries, and `ignoreAfterWords` `v`, `version`, `build`, `android`, `ios`, `firmware`, `sdk`, `os`, `kernel` with `afterGapClass` of whitespace, `:` and `=`: a version context keeps the text (`version 1.2.3.4`, `android 14.0.0.1`). `v1.2.3.4` has no word boundary and - `999.1.1.1` no octet, so neither matches. + `999.1.1.1` no octet, so neither matches. The IPv4 wildcard bind address `0.0.0.0` stays. 2. **IPv6, bare**: a run of 4 to 45 units of `[0-9A-Fa-f:]` that ends with a hexadecimal digit or with `::`, whose neighbours are not part of something longer (`ignoreBeforeClass` `[0-9A-Za-z_:]`, `ignoreAfterClass` `[0-9A-Za-z_]`: a colon before the run is part of it, so `::ffff:abcd:1234` and `2001:db8:1::` are whole), and that passes the check @@ -678,13 +709,19 @@ The range is the address only (a port stays: `192.0.2.123:8080` gives `[REDACTED 4. **Bare unique-local IPv6**: for `fc00::/7`, permit two colons as in `fdab::` and `fdab::cafe`. Validate the complete candidate and reject pieces of identifiers or bracketed addresses. -The standards are RFC 4291 section 2.2 (text forms) and RFC 5952. A zone id (`%eth0`) and an IPv4 tail -(`::ffff:1.2.3.4`) are not part of the IPv6 forms; the IPv4 tail is found by the IPv4 entry. +5. **IPv6 with a zone**: the separate entry before IPv4 requires `::` or a word boundary and 1–4 hex digits + followed by `:`; then up to 38 hex/colon units, `%`, and 1–64 zone units (ASCII letters, digits, `_`, `~`, `-`, and `.` only between other zone units). The `ipv6-zone` check splits at the first + `%` and validates the address part using `ipv6` with `minColons: 2`. The zone is included verbatim (also URI `%25` + spelling, without percent decoding); brackets and a following `:port` stay. The entry rejects pieces of larger + identifiers according to its edge classes. An IPv4 tail (`::ffff:1.2.3.4`) is still not part of IPv6; the IPv4 + entry may find the dotted quad. + +The IPv6 standards are RFC 4291 section 2.2 (text forms), RFC 5952, and RFC 4007 (zone IDs). ### 4.22 `otp` -The standards are RFC 4226 and RFC 6238 (codes of 6 to 8 digits). The range is the digits (`group` 1); the noun stays. -Four entries: +The standards are RFC 4226 and RFC 6238 (codes of 6 to 8 digits). The range is capture group 1; the noun stays. +The original four entries: 1. **An explicit noun**, 4 to 8 digits: the macro `OTP_NOUN` (`OTP`, `OTP code`, `passcode`, `verification code`, `security code`, `confirmation code`, `auth code`, `authentication code`, `login code`, `MFA code`, `2FA code`, @@ -698,11 +735,98 @@ Four entries: 3. **Additional compact forms**, 4 to 8 digits after an explicit noun joined by `was`, or after bare `2FA` with either join. Reject a match followed by a digit or hyphen, so `OTP was 2026-2027` and `2FA: 2026-2027` stay. 4. **The bare noun `code`**, 6 to 8 digits with either join (`your code is 123456`; `your code is 4821` stays), unless the word before it - (4.1) is `error`, `exit`, `status`, `response`, `postal`, `zip`, `area` or `country` (`ignoreAfterWords`, `afterGapClass` - whitespace): `error code 123456`, `exit code 1370`, `response code 200000`, `postal code 941031` stay. - -The digits end at a word boundary: a longer run is not a code. Numbers under a key (`max_tokens: 5`, `port 8080`) are not -OTP codes; a code under a key such as `otp` is the JSON key rule's business (section 6), with or without the option. + (4.1) is `error`, `exit`, `status`, `response`, `postal`, `zip`, `area`, `country`, `invoice` or `order` + (`ignoreAfterWords`, `afterGapClass` whitespace), or it follows `http error` (`ignoreAfterLabels`). For example, + `HTTP error: Code: 482913`, `Invoice code: 482913` and `Order code: 482913` stay. + +The additional entries use `numericEdges: code` (5.9) and the literal bounded contexts in `rules.json`: + +- `Your code:` (the colon is required for 4–5 digits), or `code` after a listed brand, with optional `Your`. + The brand entry uses the existing join. Spanish `código de verificación` accepts `es` in its join. +- Bare `Code:` may precede 4–8 uppercase ASCII letters/digits, with at least one of each. The prior-word denylist + excludes error/status, postal/area, order/invoice, and weak prose contexts such as `see code` and `source code`. +- An explicit OTP label and join followed by an existing standard/legacy marker may have a code glued to the + marker. Only the trailing code is masked. The marker form caps the id at 128 units and its optional suffix at 4. +- A code before `is your` + explicit noun (with optional listed brand), or `is your` + listed brand + `code`; + the statically listed German, French, and Spanish equivalents also work. This entry includes an optional + `G-` or `g-` in the capture; an SMS marker such as `<#> ` is outside the match and stays visible. + `Use to sign in` is a separate explicit instruction form; the service need not be named. + +Unless noted otherwise, extended codes are 4–8 digits or two three-digit groups joined by one space or hyphen. +All matches end on a word boundary on their value or following phrase. All OTP entries exclude calendar-shaped numbers (5.9). +Bare digits and ordinary error/status +codes are not OTPs. A code under a parsed `otp` key is the key rule's business, with or without `pii` (section 6). + +### 4.23 `card` + +A bare candidate has 13–19 ASCII digits, starting nonzero, optionally separated by one ASCII space or hyphen. The nonzero lead prevents treating international `00` phones as cards. +Use `numericEdges: run`, the preceding-word exclusions in the rule, and the `luhn` check (5.9). Only the candidate +is masked. Card numbers are financial PII, so this is opt-in like other bare identifiers. + +### 4.24 `iban` + +Use the ISO 13616 country lengths pinned in `algorithms.json` (`ibanLengths`; codes and lengths from the +[IBAN registry](https://www.swift.com/standards/data-standards/iban-international-bank-account-number) as of May 2026). +Scan the `iban` rule's four-unit lead: ASCII word boundary, two ASCII letters and two +ASCII digits. The unit before the lead cannot be `-` or `.`. Uppercase the two ASCII letters to look up the exact +compact length `n`; if there is none, skip this lead. If the next unit is ASCII space, require exactly one ASCII +space before each successive group of four alphanumeric units (the final group may be shorter, according to `n`). +Otherwise consume `n - 4` contiguous ASCII alphanumeric units. Require end of text or a unit outside `[A-Za-z0-9_]` after +the last unit. After each lead, resume immediately after its four units, regardless of checksum: a valid IBAN +can start inside another envelope, even one that is also valid. Merge overlapping valid hits (section 7). +These are bounded reads (at most 34 alphanumerics plus seven separators before the +last group, or eight with a one/two-unit final group). Uppercase ASCII letters and remove the grouping spaces; +move the first four compact units to the end. Feed digits as themselves and letters `A`–`Z` as `10`–`35` (two +base-10 digits) into a running mod-97 remainder, initially zero. Report an `iban` hit for the full range only +when the original two check digits are in `02`–`98` and the remainder is 1. This does not validate national BBANs. + +Every structurally shaped range, whether or not it passes mod-97, excludes overlapping `phone` and `card` hits +from the **PII rule group only**, before merging. This prevents a broken checksum from turning an IBAN into +partial phone/card redaction. Scan phone and card rules separately in the nonempty text segments outside +validated IBANs, as if each segment were its own text; translate ranges back to the original offsets. In +particular, digits at the end of a validated IBAN do not count as part of the numeric run following it. +The numeric guard still applies within each segment. Reject remaining hits that overlap any envelope, even +one with a bad checksum. Envelopes can overlap; in ascending start order discard envelopes ending at or before +the current hit's start, and reject if the first remaining envelope starts before the hit's end. This is a +linear sweep over ascending hits per rule. + +### 4.25 `mnemonic` + +A mnemonic is a credential, not ordinary PII; both entries of this rule run in the standard tier in both modes. +First scan `label` left to right with its `ignoreBeforeClass` guard. The complete bare or quoted label +(`mnemonic`, `mnemonic phrase`, `recovery phrase`, `seed phrase`, or `seed`) is ASCII-case-insensitive and +admits horizontal space, `=>`, `:=`, `:` or `=`, further horizontal space, and an optional opening single/double +quote. The value starts after the match. A label immediately after `?` or `&` is in query context; do not cross +the next `&` or `#` in that context. Stop before the unescaped matching closing quote (4.7 with zero escape +layers), preserving any even run of backslashes before it, if it occurs before the line or query value ends. +Otherwise stop before the first structural delimiter +(`,`, `}`, `]`, `;`) or line end (CR/LF/U+2028/U+2029), whichever comes first. The label consumes initial +horizontal space outside quotes. Preserve contiguous placeholders at the value start: advance past them +before looking for structural delimiters. For bare `seed`, also advance past merged ranges already selected +by other rules that begin at the current value start and end on the same line, just as for placeholders. +Apply the normal hit merge (section 7) if the selected range touches the resulting mnemonic range. +If the remaining value is empty or entirely horizontal space, do +not emit a hit. For the label `seed` alone, also require that, after optional ASCII spaces/tabs, the value +starts with at least three complete BIP39 tokens (defined below) separated by ASCII spaces/tabs. A number or +an ordinary seed value is not a mnemonic. Otherwise emit the remaining range, preserving the delimiters. +Resume at the value end if a hit was emitted; otherwise resume immediately after the label match. +Remember the next line end until the value starts past it so the line is not searched repeatedly. +The strict generic `key-pairs` entry leaves these exact mnemonic labels to this rule. + +Then use `pattern` to tokenize maximal ASCII identifier runs, treating units covered by keyed mnemonic hits or +other selected hits as neither token nor gap units. A token qualifies when its ASCII-lowercased form +is in `algorithms.json` → `mnemonic.words`, the BIP39 English wordlist. Adjacent qualifying tokens separated by +one or more `gapClass` units (space or tab, never a line break) form a run. For each **maximal** run whose count +is one of `mnemonic.counts` (12, 15, 18, 21, 24), report the whole run even if its checksum is invalid. For a run +whose count is not supported but exceeds the shortest supported length, evaluate every contiguous window of +each supported length that fits. For a window of `n` words, concatenate their zero-based wordlist indices as +11-bit unsigned integers, most significant bit first. The first `11*n - n/3` bits are entropy bytes, and the +last `n/3` bits must equal the first `n/3` bits of SHA-256 of those entropy bytes. Emit only checksum-valid +windows, from the first token start to the last token end, without surrounding punctuation or space. There are +at most five bounded windows per word, so the scan is linear. Keep keyed hits first on equal starts and otherwise +use the usual merge (section 7). The unconditional labels use the ordinary parsed JSON key verdict (section 6); +the exact ASCII-case-insensitive `seed` key gets a string-only verdict when its string value meets the same +three-word prefix test. ## 5. Shared algorithms @@ -821,6 +945,22 @@ digits. Two parts: each side is empty (no groups) or a list of groups separated digits (so `:::` or a leading single colon is false); true when the groups of both sides together are fewer than 8 (`::` stands for at least one group of zeros, RFC 4291). +### 5.9 Numeric candidate filters + +- `luhn`: remove spaces and hyphens. Starting at the rightmost digit, add each digit, doubling every second + digit and subtracting 9 from doubles over 9. The sum must be divisible by 10. +- `otp-alphanumeric`: an uppercase alphanumeric candidate additionally contains at least one ASCII digit. +- `numericEdges: run`: before the **range**, reject a preceding `+`, `-`, or `.`, or a single ASCII space with + an ASCII digit before it. After the range, reject any one of space, hyphen or dot followed immediately by a digit. + When a phone match includes an extension, its range includes the extension for this guard. +- `ignoreDate`: for this test only, remove an initial `G-` or `g-` from the capture, if present. Any SMS marker + outside the capture (such as `<#> `) is irrelevant. Reject if the resulting text is exactly `YYYYMMDD`, or + if it is exactly `YYYY` and the six units immediately after the original capture are `-MM-DD`, `/MM/DD` or + `.MM.DD`. `YYYY` is 1900–2099, `MM` is 01–12, and `DD` is 01–31 (no month/day interaction). This test + does not alter the capture or its edges: a non-date OTP still masks the in-capture prefix. +- `numericEdges: code`: at either edge of the **capture** (not the whole context match), reject any adjacent + `-`, `.`, `/` or `:` with an ASCII digit on the other side. Trailing punctuation not followed by a digit stays. + ## 6. Key names Which object keys name a secret. One predicate for every walker. Data: `keys.json`. @@ -844,6 +984,13 @@ words, its words concatenated, plus `joinedExtra`. `matchKey(key, plural)`: +0. For the new exact names only, skip this step if the key exceeds twice the longest name in + `localizedPasswords` or `mnemonicKeys` (in UTF-16 units). Each character of the pinned aliases has at + most two units in canonical decomposition, including uppercase `İ` that maps to `i`. A longer key + cannot match; do not normalize it, because canonical ordering of long combining-mark runs can be quadratic. + Otherwise take `NFC(key)`, lower-case ASCII `A–Z`, `Ñ`, `Ł`, `Ş`, `Ö`, and Cyrillic `А–Я`, + and map `İ` to `i`. Compare against `localizedPasswords` and `mnemonicKeys` as exact, singular names. No whitespace or punctuation is removed, + and the original key is never changed. Existing ASCII word/compact rules are unchanged. 1. `compact` = `key` lower-cased (the `lower` of section 3, plus U+0130 `İ` mapped to `i`) with every unit outside `a-z 0-9` removed. If `compact` is in `exactKeys`, true. 2. `w = words(key)`. If the last word equals `passLastWord` (`pass`), true. @@ -876,7 +1023,10 @@ keys are walked. `string`, `any`) is the value-shape rule behind `max_tokens` staying visible while `pin` and `password` numbers are replaced; a caller that redacts structured data of its own (headers, form fields) needs it, so a language MUST NOT hide it behind the JSON walker. Names follow the language (`keyVerdict`, `key_verdict`, `KeyVerdict`); -the results are the strings `none`, `string`, `any`. +the results are the strings `none`, `string`, `any`. These name-only APIs do not infer a verdict from the value. +A field API that redacts by key and value (such as Go's `RedactField`) uses the same value-aware `seed` +verdict as the JSON walker (4.25): a string with at least three leading BIP39 words gets `string`, whereas +an ordinary or numeric seed does not get a verdict from its key. ## 7. Placeholders, hits and splicing @@ -998,9 +1148,10 @@ mode and the boolean option `pii` (default false, 9.5). **Modes**: -- `compat` (TypeScript default). The rule list is the `compat` list of 4.10. With `pii` off, output follows v0.2.0 - (pinned by the golden corpus) except when the shared placeholder guard in 4.6 preserves a closing brace: - `{"token":[REDACTED:github]}` stays unchanged. The standard tier fails closed. The full tier fails +- `compat` (TypeScript default). The rule list is the `compat` list of 4.10. With `pii` off, prior formats retain + their v0.2.0 outputs (pinned by the golden corpus), except for the shared placeholder guard in 4.6: + `{"token":[REDACTED:github]}` stays unchanged. Mnemonics (4.25) and the exact localized names of section 6 add + coverage in this mode too. The standard tier fails closed. The full tier fails open: when its rules fail it falls back to the standard rules, and a text beyond the scan cap is scanned by the standard rules only. - `strict` (Python and Go default; an option in TypeScript). **No path returns text that was not scanned.** @@ -1094,9 +1245,9 @@ Everything else (order, verdicts, number handling, key redaction) is as in 9.2. ### 9.5 The `pii` option `pii` (boolean, default false) is an option of every entry point, both tiers and both modes. When it is true, `detect` -(4.) runs the rules of `pii` (4.19 to 4.22) after the rules of the mode, and everything else is as without it: the +(4.) runs the rules of `pii` (4.19 to 4.24) after the rules of the mode, and everything else is as without it: the same merge and splice (section 7), the same limits, the keys of a JSON value scanned with the same `detect` (8), and -in `strict` the same walk (9.3). It adds the rule ids `email`, `phone`, `ip` and `otp`, and nothing else changes; +in `strict` the same walk (9.3). It adds the rule ids `email`, `iban`, `card`, `phone`, `ip` and `otp`, and nothing else changes; with the option false the output is byte-identical to the output of a version without the option. The option is passed to the leaf scan of the full tier too (9.4: its hits are merged with the full-tier hits). It is **not** a mode and not a tier: the same `pii: true` works in `compat` and in `strict`. Out of scope: names, postal addresses and any @@ -1254,23 +1405,22 @@ These are limits of what the rules find, not portability risks. A vector pins wh that expects the miss, so closing one later changes no existing vector. - **Secrets in prose**: a secret that stands after a word and no separator is not found (`the password hunter2 was - rejected`). `key-pairs` and the keyword rules need `:`, `=` or `=>`. -- **Internationalised email addresses**: `email` is ASCII (local part and host). An address with a non-ASCII letter or in - Punycode form with a Unicode local part is not found. + rejected`, `my password is hunter2`, `login with bob / hunter2`). `key-pairs` and the keyword rules + need `:`, `=` or `=>`. A URL-encoded assignment such as `token%3Dhunter2` is not decoded. +- **Internationalised email addresses**: `email` is ASCII (local part and host). An address with a non-ASCII letter + (`person@例子.测试`) or in Punycode form with a Unicode local part is not found. - **URL-encoded values**: `person%40example.com`, `%2B441234567890` and a code inside an encoded query value are not decoded by the `pii` rules (the `key-context` rule decodes only the names of query parameters and one level of a nested query, 4.9). - **Email local parts** longer than 64 units: the match starts 64 units before the `@`; what stands before is left. -- **Phone numbers**: only the `+` form, NANP forms and two national forms (4.20) are found; a number without separators - and without a `+` is not, and a `+` number that is longer than 15 digits is not, unless it has a parenthesized area part - (`+123 (1234) 1234567890123` is found). Combining a parenthesized trunk prefix - with double spaces can still miss (`+44 (0) 20 7946 0958 ext. 12`). -- **IPv4** needs four groups with word boundaries: the first four groups of a five-group version string (`1.2.3.4.5`) - are an address, and a version is kept only after the words of 4.21. **IPv6** with two colons is found in brackets or, - for unique-local addresses in `fc00::/7`, bare. Bare `fe80::1`, `fe80::1%eth0` and `::1` still miss; zone IDs and IPv4 tails are not - part of the IPv6 match. -- **OTP codes** need a supported noun and join (4.22). Digits alone in a table cell, codes under unsupported nouns, - and grouped codes after only the bare noun `code` are not found. +- **Phone numbers**: supported forms are in 4.20; compact national numbers (`4155550123`) and shapes outside + those bounds still miss. Combining a parenthesized trunk prefix with double spaces may miss. +- **IPv4** needs four groups with word boundaries: some version strings still look like addresses. Bare + `fe80::1` and `::1` without brackets or zones still miss; IPv4 tails are not part of the IPv6 match. +- **OTP codes** need a supported context (4.22). Digits alone in a table cell and unsupported words or brands miss. +- **Credential URIs and encoding**: scheme-less proxy `proxy u123:pw987@1.2.3.4:1080` is not a credential URI; + SOCKS URI usernames are kept even when the password and host are masked. Standalone base64 of `password=hunter2` + (`cGFzc3dvcmQ9aHVudGVyMg==`) is not decoded. - **Bearer credentials** may stop at an escaped quote (`Bearer "abc\"def"`), or look like a kept prose word (`Authorization: Bearer tokens`). - **Structured or multiword values in text** can remain partly or wholly visible. Examples: nested objects @@ -1278,14 +1428,14 @@ that expects the miss, so closing one later changes no existing vector. (`password=[x,hunter2] tail`), and values starting on the next line (`{"token":\n {"value": "hunter2"}}`, `{"token":\n "abc"}`, `{"password":\n "x"}`, `{"sessionid":\n "hunter2"}`, where `\n` represents a line break). SQL-style doubled quotes (`password: 'it''s secret'`, `client.auth='it''s hunter2'`) and unquoted multiword passwords - (`DB_PASSWORD: correct horse battery staple`) can also leave a visible suffix. Redact parsed JSON for structured data. + (`DB_PASSWORD: correct horse battery staple`, `password=correct horse battery staple`) can also leave a visible suffix. + `token = """` followed by a value and closing triple quotes on other lines is not interpreted. Redact parsed JSON for structured data. - **Key verdicts in text** (4.18) are those of JSON keys, so a design token such as `spacing_token: 16px` is redacted in `strict`, as `{"spacing_token": "16px"}` is in JSON. - **Known over-redactions** (kept on purpose, not fixed here): `git@github.com:org/repo` is an email; `offset +10000000` is a phone number (a `+` and 8 digits); the Bearer credential of `strict` takes everything up to whitespace or a quote, so `Bearer abc)` takes the parenthesis. -- **Known misses** (also not fixed here): `0049 170 1234567` (`00` prefix); - `config['password'] = 'x'` (the key is in quotes and brackets); a YAML block scalar (`password: |` and +- **Known misses** (also not fixed here): `config['password'] = 'x'` (the key is in quotes and brackets); a YAML block scalar (`password: |` and the indented lines after it); an unseparated number such as `4155550123`; the version word list of 4.21 is not exhaustive (`ios: 10.0.0.1` with a colon is kept, `release 1.2.3.4` is not). - **Template values**: `password="{hunter2}"` is redacted up to the closing brace (`{hunter2`), as in 0.3.0: the unquoted From 5c7d94e9f622b891676278edaafcd1439d5823b7 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:16:50 +0100 Subject: [PATCH 10/30] fix(redaction): MCP gap rules, go/spec/vectors/pii.json (DRO-4114) --- go/spec/vectors/pii.json | 58 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/go/spec/vectors/pii.json b/go/spec/vectors/pii.json index b74c152..66343be 100644 --- a/go/spec/vectors/pii.json +++ b/go/spec/vectors/pii.json @@ -768,6 +768,62 @@ {"name": "review: a compact verification code before a hyphen and digits", "input": "verification code: 1234-5678", "mode": "strict", "opts": {"pii": true}, "expected": "verification code: [REDACTED:otp]-5678"}, {"name": "review: an attempt count is not an OTP", "input": "OTP was 3 attempts", "mode": "strict", "opts": {"pii": true}, "expected": "OTP was 3 attempts"}, {"name": "review: a 2FA status is not an OTP", "input": "2FA: enabled", "mode": "strict", "opts": {"pii": true}, "expected": "2FA: enabled"}, - {"name": "review: a unique-local prefix with one colon is not IPv6", "input": "fdab:1", "mode": "strict", "opts": {"pii": true}, "expected": "fdab:1"} + {"name": "review: a unique-local prefix with one colon is not IPv6", "input": "fdab:1", "mode": "strict", "opts": {"pii": true}, "expected": "fdab:1"}, + {"name": "MCP gap: spaced card", "input": "4111 1111 1111 1111", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:card]"}, + {"name": "MCP gap: compact card", "input": "card 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "card [REDACTED:card]"}, + {"name": "MCP gap: dashed card", "input": "paid with 4111-1111-1111-1111.", "mode": "strict", "opts": {"pii": true}, "expected": "paid with [REDACTED:card]."}, + {"name": "MCP gap: 13 digit card", "input": "4222222222222", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:card]"}, + {"name": "MCP gap: 19 digit card", "input": "4000000000000000006", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:card]"}, + {"name": "MCP gap: invalid Luhn", "input": "4111 1111 1111 1112; 4111111111111112", "mode": "strict", "opts": {"pii": true}, "expected": "4111 1111 1111 1112; 4111111111111112"}, + {"name": "MCP gap: overlong card-like groups", "input": "4111 1111 1111 1111 1111", "mode": "strict", "opts": {"pii": true}, "expected": "4111 1111 1111 1111 1111"}, + {"name": "MCP gap: invoice and order IDs", "input": "Invoice #4111111111111111; order: 4111-1111-1111-1111", "mode": "strict", "opts": {"pii": true}, "expected": "Invoice #4111111111111111; order: 4111-1111-1111-1111"}, + {"name": "MCP gap: valid spaced IBAN", "input": "DE89 3704 0044 0532 0130 00", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:iban]"}, + {"name": "MCP gap: valid compact IBAN", "input": "DE89370400440532013000", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:iban]"}, + {"name": "MCP gap: alphanumeric IBAN and trailing prose", "input": "Account gb82 west 1234 5698 7654 32 for testing.", "mode": "strict", "opts": {"pii": true}, "expected": "Account [REDACTED:iban] for testing."}, + {"name": "MCP gap: wrong country length", "input": "DE8937040044053201300", "mode": "strict", "opts": {"pii": true}, "expected": "DE8937040044053201300"}, + {"name": "MCP gap: bad IBAN checksum in both styles", "input": "DE88 3704 0044 0532 0130 00; DE88370400440532013000", "mode": "strict", "opts": {"pii": true}, "expected": "DE88 3704 0044 0532 0130 00; DE88370400440532013000"}, + {"name": "MCP gap: an IBAN-shaped range only suppresses overlapping phone and card hits", "input": "030 12345678; DE88 3704 0044 0532 0130 00; 4111 1111 1111 1111", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]; DE88 3704 0044 0532 0130 00; [REDACTED:card]"}, + {"name": "MCP gap: compact 00 prefix", "input": "004915123456789", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]"}, + {"name": "MCP gap: spaced 00 prefix with extension", "input": "0049 170 1234567 ext. 12", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]"}, + {"name": "MCP gap: German landline", "input": "030 12345678", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]"}, + {"name": "MCP gap: German mobile", "input": "0151 23456789", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:phone]"}, + {"name": "MCP gap: unrecognized German-like prefix", "input": "012 12345678", "mode": "strict", "opts": {"pii": true}, "expected": "012 12345678"}, + {"name": "MCP gap: German-like version and identifiers", "input": "v030-12345678; order 030-12345678; invoice: 0151-23456789", "mode": "strict", "opts": {"pii": true}, "expected": "v030-12345678; order 030-12345678; invoice: 0151-23456789"}, + {"name": "MCP gap: too-long 00 prefix", "input": "004915123456789123", "mode": "strict", "opts": {"pii": true}, "expected": "004915123456789123"}, + {"name": "MCP gap: OTP login suffix", "input": "482913 is your login code", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] is your login code"}, + {"name": "MCP gap: OTP SMS suffix", "input": "<#> 482913 is your Instagram code", "mode": "strict", "opts": {"pii": true}, "expected": "<#> [REDACTED:otp] is your Instagram code"}, + {"name": "MCP gap: OTP prefixed SMS suffix", "input": "G-482913 is your Google verification code", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] is your Google verification code"}, + {"name": "OTP keeps a calendar-shaped G-prefixed value", "input": "G-20261202 is your Google code", "mode": "strict", "opts": {"pii": true}, "expected": "G-20261202 is your Google code"}, + {"name": "OTP keeps a calendar-shaped value with both SMS prefixes", "input": "<#> g-19991231 is your Google verification code", "mode": "strict", "opts": {"pii": true}, "expected": "<#> g-19991231 is your Google verification code"}, + {"name": "OTP keeps a calendar-shaped value after an SMS marker", "input": "<#> 20261202 is your Instagram code", "mode": "strict", "opts": {"pii": true}, "expected": "<#> 20261202 is your Instagram code"}, + {"name": "OTP masks a real code with both SMS prefixes", "input": "<#> g-482913 is your Google code", "mode": "strict", "opts": {"pii": true}, "expected": "<#> [REDACTED:otp] is your Google code"}, + {"name": "MCP gap: OTP sign-in instruction", "input": "Use 482913 to sign in to WhatsApp", "mode": "strict", "opts": {"pii": true}, "expected": "Use [REDACTED:otp] to sign in to WhatsApp"}, + {"name": "MCP gap: OTP short explicitly addressed", "input": "Your code: 4821", "mode": "strict", "opts": {"pii": true}, "expected": "Your code: [REDACTED:otp]"}, + {"name": "MCP gap: OTP short branded", "input": "Telegram code: 48291", "mode": "strict", "opts": {"pii": true}, "expected": "Telegram code: [REDACTED:otp]"}, + {"name": "MCP gap: OTP short branded with verb", "input": "Your Uber code is 4821", "mode": "strict", "opts": {"pii": true}, "expected": "Your Uber code is [REDACTED:otp]"}, + {"name": "MCP gap: OTP short grouped branded", "input": "Your WhatsApp code: 482-913", "mode": "strict", "opts": {"pii": true}, "expected": "Your WhatsApp code: [REDACTED:otp]"}, + {"name": "MCP gap: OTP alphanumeric after bare label", "input": "Code: AB12CD", "mode": "strict", "opts": {"pii": true}, "expected": "Code: [REDACTED:otp]"}, + {"name": "MCP gap: OTP Spanish label", "input": "Tu código de verificación es 482913", "mode": "strict", "opts": {"pii": true}, "expected": "Tu código de verificación es [REDACTED:otp]"}, + {"name": "MCP gap: OTP Spanish suffix", "input": "482913 es tu código de verificación", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] es tu código de verificación"}, + {"name": "MCP gap: OTP German suffix", "input": "482913 ist dein Sicherheitscode", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] ist dein Sicherheitscode"}, + {"name": "MCP gap: OTP French suffix", "input": "482913 est votre code de confirmation", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:otp] est votre code de confirmation"}, + {"name": "MCP gap: OTP tail after a placeholder", "input": "OTP code: [REDACTED:secret]482913", "mode": "strict", "opts": {"pii": true}, "expected": "OTP code: [REDACTED:secret][REDACTED:otp]"}, + {"name": "MCP gap: OTP prose and error codes", "input": "error code 404; error code: AB12CD; error code 482913; see code: main.ts; code: README", "mode": "strict", "opts": {"pii": true}, "expected": "error code 404; error code: AB12CD; error code 482913; see code: main.ts; code: README"}, + {"name": "MCP gap: date, time, versions and port", "input": "2026-12-02 09:44:59; Your code: 2026-12-02; version 1.2.3.4; port 4821", "mode": "strict", "opts": {"pii": true}, "expected": "2026-12-02 09:44:59; Your code: 2026-12-02; version 1.2.3.4; port 4821"}, + {"name": "MCP gap: IPv6 zone bare", "input": "fe80::1%en0", "mode": "strict", "opts": {"pii": true}, "expected": "[REDACTED:ip]"}, + {"name": "MCP gap: keep punctuation after an IPv6 zone", "input": "Peer fe80::1%eth0.12.", "mode": "strict", "opts": {"pii": true}, "expected": "Peer [REDACTED:ip]."}, + {"name": "MCP gap: a date is not a verification code", "input": "verification code: 2026-12-02; code: 20261202 failed", "mode": "strict", "opts": {"pii": true}, "expected": "verification code: 2026-12-02; code: 20261202 failed"}, + {"name": "MCP gap: German regional landline", "input": "Office 0201 1234567", "mode": "strict", "opts": {"pii": true}, "expected": "Office [REDACTED:phone]"}, + {"name": "MCP gap: IPv6 zone in brackets with port", "input": "[fe80::1%25en0]:8080", "mode": "strict", "opts": {"pii": true}, "expected": "[[REDACTED:ip]]:8080"}, + {"name": "MCP gap: IPv6 invalid zone and IPv4 bind address", "input": "fe80::1%%en0; fe80::1%; 0.0.0.0:8080; build 1.2.3.4", "mode": "strict", "opts": {"pii": true}, "expected": "fe80::1%%en0; fe80::1%; 0.0.0.0:8080; build 1.2.3.4"}, + {"name": "MCP gap: PII remains opt-in", "input": "4111 1111 1111 1111; DE89370400440532013000; 004915123456789; Your code: 4821; fe80::1%en0", "mode": "strict", "expected": "4111 1111 1111 1111; DE89370400440532013000; 004915123456789; Your code: 4821; fe80::1%en0"}, + {"name": "gap review: valid IBAN inside a checksum-failed envelope", "input": "TR00 DE89 3704 0044 0532 0130 00", "opts": {"pii": true}, "expected": "TR00 [REDACTED:iban]"}, + {"name": "gap review: card immediately after a valid IBAN", "input": "DE89 3704 0044 0532 0130 00 4111 1111 1111 1111", "opts": {"pii": true}, "expected": "[REDACTED:iban] [REDACTED:card]"}, + {"name": "gap review: overlong numeric run after a valid IBAN stays visible", "input": "DE89 3704 0044 0532 0130 00 4111 1111 1111 1111 1234", "opts": {"pii": true}, "expected": "[REDACTED:iban] 4111 1111 1111 1111 1234"}, + {"name": "gap review: invoice number label excludes a card", "input": "Invoice number: 4111111111111111", "opts": {"pii": true}, "expected": "Invoice number: 4111111111111111"}, + {"name": "gap review: HTTP error label excludes an alphanumeric OTP", "input": "HTTP error: Code: E1024", "opts": {"pii": true}, "expected": "HTTP error: Code: E1024"}, + {"name": "round two: overlapping valid IBAN envelopes cover the entire span", "input": "ES43 DE89 3704 0044 0532 0130 00", "opts": {"pii": true}, "expected": "[REDACTED:iban]"}, + {"name": "round two: HTTP error invoice and order labels exclude numeric OTPs", "input": "HTTP error: Code: 482913; Invoice code: 482913; Order code: 482913", "opts": {"pii": true}, "expected": "HTTP error: Code: 482913; Invoice code: 482913; Order code: 482913"}, + {"name": "round two: addressed and branded numeric OTPs still mask", "input": "Your code: 482913; Telegram code: 48291", "opts": {"pii": true}, "expected": "Your code: [REDACTED:otp]; Telegram code: [REDACTED:otp]"} ] } From 548ce4c70f1cba4af1fecb0c4e87179eb2b37bad Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:16:54 +0100 Subject: [PATCH 11/30] fix(redaction): MCP gap rules, go/spec_hash_gen.go (DRO-4114) --- go/spec_hash_gen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/spec_hash_gen.go b/go/spec_hash_gen.go index 8b678f4..194b9b9 100644 --- a/go/spec_hash_gen.go +++ b/go/spec_hash_gen.go @@ -2,4 +2,4 @@ package redaction -const specHash = "99806c43cc0ea49beccff2e5a79b76b7ef0ca959fa308c8a4e5c7f5a1ef15e1d" +const specHash = "91bc1cc4d6ea2af92a56aa7fab8c48eefac29847ad536bb715f22d3e7efea011" From 4d770426fbe2f432e8799bb4dccbffce66a0d628 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:16:59 +0100 Subject: [PATCH 12/30] fix(redaction): MCP gap rules, go/units.go (DRO-4114) --- go/units.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/go/units.go b/go/units.go index 55be144..2d86e39 100644 --- a/go/units.go +++ b/go/units.go @@ -128,3 +128,20 @@ func wordBefore(units []uint16, at int, gap *unitSet) string { start := labelStart(units, end, asciiLetters, unbounded) return foldString(units[start:end]) } + +// closingQuote is the end of a value that opened at from, or -1 when no quote closes it. +func closingQuote(units []uint16, from int, quote uint16, layers int, limit int) int { + for i := from; i < limit; i++ { + if units[i] != quote { + continue + } + run := 0 + for i-run-1 >= from && units[i-run-1] == backslash { + run++ + } + if (layers == 0 && run%2 == 0) || (layers != 0 && run == layers) { + return i - run + } + } + return -1 +} From 978f93590d448f8470a12364a86dcc0d3e8d643f Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:17:03 +0100 Subject: [PATCH 13/30] fix(redaction): MCP gap rules, go/walk.go (DRO-4114) --- go/walk.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/go/walk.go b/go/walk.go index b0ccccc..e309431 100644 --- a/go/walk.go +++ b/go/walk.go @@ -370,7 +370,12 @@ func (w *walker) step(top *frame) *frame { if w.isSkipKey(entry.key) && entry.val.isPrimitive() { return w.skipValue(top, entry.val) } - childVerdict := strongerVerdict(top.verdict, w.e.keys.keyVerdict(entry.key)) + var stringValue []uint16 + if entry.val.kind == kindString { + stringValue = entry.val.str + } + verdict := w.e.stringKeyVerdict(entry.key, len(stringValue), unbounded, func(at int) uint16 { return stringValue[at] }) + childVerdict := strongerVerdict(top.verdict, verdict) return w.descend(top, entry.val, childVerdict) } From 8193c0c433f005bc1c41ec3500b9607e2789e7f2 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:17:07 +0100 Subject: [PATCH 14/30] fix(redaction): MCP gap rules, python/NOTICE (DRO-4114) --- python/NOTICE | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/python/NOTICE b/python/NOTICE index 90abba1..83aadf5 100644 --- a/python/NOTICE +++ b/python/NOTICE @@ -88,3 +88,33 @@ not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. ``` + +## BIP39 English wordlist (MIT) + +`mnemonic.words` in `spec/algorithms.json` reproduces the English BIP39 wordlist from +[python-mnemonic v0.21](https://github.com/trezor/python-mnemonic/blob/v0.21/src/mnemonic/wordlist/english.txt). +The [upstream MIT license](https://github.com/trezor/python-mnemonic/blob/v0.21/LICENSE) follows. + +``` +The MIT License (MIT) + +Copyright (c) 2013-2016 Pavol Rusnak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` From 875de1cb56770b7516ae76596ab98e098bf9127d Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:17:11 +0100 Subject: [PATCH 15/30] fix(redaction): MCP gap rules, python/README.md (DRO-4114) --- python/README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/python/README.md b/python/README.md index d40edda..a91ea47 100644 --- a/python/README.md +++ b/python/README.md @@ -105,12 +105,13 @@ prose and in JSON strings and keys: | `email` | `person@example.com`, `A.B+tag@Example.CO.uk` | `react@18.2.0`, `icon@2x.png`, `user@localhost`, `pkg@1.2.3` | | `phone` | `+44 20 7946 0958`, `+493023125123`, `(415) 555-0123`, `415-555-0123`, `020 7946 0958` | `Request ID 1234567890`, `/devices/1234567890`, `2026-11-19 10:00:59`, `v0.3.0` | | `ip` | IPv4 (`192.0.2.123`), IPv6 (`2001:db8::1`, `[fdab::cafe]:8080`); a port stays | `version 1.2.3.4`, `android 14.0.0.1`, `999.1.1.1`, `std::vector` | -| `otp` | the digits after a code noun (`Your verification code is 482913`, `OTP code: 482913`, `验证码 482913`) | `error code 5000`, `exit code 1370`, `postal code 941031`, `port 8080` | +| `otp` | codes before or after a recognized label (`482913 is your verification code`, `OTP code: 482913`, `验证码 482913`) | `error code 5000`, `Invoice code: 482913`, `HTTP error: Code: 482913` | +| `card` | `4111 1111 1111 1111` (13–19 digits, Luhn-valid) | Luhn-invalid numbers | +| `iban` | `DE89 3704 0044 0532 0130 00` (known country length and valid checksum) | Same shape with a bad checksum | -The placeholders are `[REDACTED:email]`, `[REDACTED:phone]`, `[REDACTED:ip]` and `[REDACTED:otp]`. With the option -a text of any length is scanned (`a@b.xx`). Names, addresses, IDN emails, URL-encoded values and prose secrets -such as `password hunter2` are not detected (SPEC sections 4.19 to 4.22 and 15). `pii` must be a `bool`, anything -else raises `TypeError`. +Each placeholder uses the rule ID, for example `[REDACTED:iban]`. With the option a text of any length is scanned +(`a@b.xx`). See [SPEC](../spec/SPEC.md) §§4.19–4.24 and §15 for rules and limits. `pii` must be a `bool`; anything +else raises `TypeError`. Mnemonic detection is part of the standard tier in both modes, including `compat` without `pii`. ## Modes @@ -131,7 +132,7 @@ else raises `TypeError`. - `compat`: reproduces the behaviour of the TypeScript package's default mode for its sync entry (a string under a skip key is returned unscanned; keys do not count against `max_chars`; a node-exhausted object keeps its raw key at the cut; a text under 8 units is not scanned unless `pii=True`; none of the strict short-secret rules apply). - Use it only to compare with TypeScript output. In the full tier `compat` is TypeScript's async + This preserves legacy failure and limit behavior, not identical output across releases. In the full tier `compat` is TypeScript's async behaviour: it has no length, depth or node limit, so giving `max_chars`, `max_depth` or `max_nodes` with it raises `ValueError`, and a failure of the full-tier rules falls back to the standard rules (and to `[REDACTED:error]` if those fail From 5d892a25a0ab845b702f522a3813dd653e2ffc6c Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:17:14 +0100 Subject: [PATCH 16/30] fix(redaction): MCP gap rules, python/src/droidrun_redaction/_detect.py (DRO-4114) --- python/src/droidrun_redaction/_detect.py | 69 +++++++++++++++++++----- 1 file changed, 57 insertions(+), 12 deletions(-) diff --git a/python/src/droidrun_redaction/_detect.py b/python/src/droidrun_redaction/_detect.py index fdcb2ae..33c19f3 100644 --- a/python/src/droidrun_redaction/_detect.py +++ b/python/src/droidrun_redaction/_detect.py @@ -2,7 +2,7 @@ from typing import Any, NamedTuple -from . import _full_rules, _rules +from . import _full_rules, _iban, _mnemonic, _rules from ._patterns import Range from ._placeholder import build_read_placeholder from ._spec import ALGORITHMS, RULES, SpecError, strict_rules @@ -42,15 +42,23 @@ def _prepare_all(rules: list[dict[str, Any]]) -> list[tuple[str, _rules.Scanner] return [_prepare(rule, _PREPARE) for rule in rules] -_PII = _prepare_all(RULES["pii"]) -_COMPAT = _prepare_all(RULES["pipeline"]) -_STRICT = _prepare_all(strict_rules(RULES["pipeline"])) -_RULE_LISTS = { - Detect(strict=False, pii=False): _COMPAT, - Detect(strict=False, pii=True): [*_COMPAT, *_PII], - Detect(strict=True, pii=False): _STRICT, - Detect(strict=True, pii=True): [*_STRICT, *_PII], -} +class _IbanRule(NamedTuple): + rule_id: str + scan: _iban.IbanScanner + + +_PII = [ + _IbanRule(rule["id"], _iban.prepare_iban(rule)) if rule["kind"] == "iban" else _prepare(rule, _PREPARE) + for rule in RULES["pii"] +] +_MNEMONIC_RULES = [rule for rule in RULES["pipeline"] if rule["kind"] == "mnemonic"] +if len(_MNEMONIC_RULES) != 1: + raise SpecError("redaction spec needs exactly one mnemonic rule") +_MNEMONIC_RULE = _MNEMONIC_RULES[0] +_MNEMONIC = _mnemonic.prepare_mnemonic(_MNEMONIC_RULE) +_STANDARD = [rule for rule in RULES["pipeline"] if rule["kind"] != "mnemonic"] +_COMPAT = _prepare_all(_STANDARD) +_STRICT = _prepare_all(strict_rules(_STANDARD)) _COMPAT_MIN_LENGTH: int = ALGORITHMS["text"]["minScanLength"] @@ -93,11 +101,48 @@ def _collect(entries: list[tuple[str, _rules.Scanner]], units: str) -> list[Hit] return hits -def detect(units: str, options: Detect) -> list[Hit]: +def _collect_pii(units: str) -> list[Hit]: + hits: list[Hit] = [] + shapes: list[tuple[Range, bool]] = [] + segments: list[Range] = [(0, len(units))] + for rule in _PII: + if isinstance(rule, _IbanRule): + shapes = rule.scan(units) + segments = [] + cursor = 0 + for (start, end), valid in shapes: + if valid: + hits.append((rule.rule_id, start, end)) + if cursor < start: + segments.append((cursor, start)) + cursor = max(cursor, end) + if cursor < len(units): + segments.append((cursor, len(units))) + continue + rule_id, scan = rule + numeric = rule_id in ("phone", "card") + next_shape = 0 + for offset, limit in segments if numeric else [(0, len(units))]: + for start, end in scan(units[offset:limit]): + start, end = start + offset, end + offset + if numeric: + while next_shape < len(shapes) and shapes[next_shape][0][1] <= start: + next_shape += 1 + if next_shape < len(shapes) and shapes[next_shape][0][0] < end: + continue + hits.append((rule_id, start, end)) + return hits + + +def detect(units: str, options: Detect, full: tuple[Hit, ...] | list[Hit] = ()) -> list[Hit]: """The merged hits of the standard rules of `options` over the whole unit string.""" if len(units) < scan_floor(options): return [] - return merge_hits(_collect(_RULE_LISTS[options], units)) + hits = _collect(_STRICT if options.strict else _COMPAT, units) + pii = _collect_pii(units) if options.pii else [] + selected = tuple((start, end) for _, start, end in merge_hits([*full, *hits, *pii])) + mnemonic = [(_MNEMONIC_RULE["id"], start, end) for start, end in _MNEMONIC(units, selected)] + return merge_hits([*full, *hits, *mnemonic, *pii]) def detect_full_rules(units: str) -> list[Hit]: From 61791732e0526ae4bae5226398840ed15fafc84f Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:17:19 +0100 Subject: [PATCH 17/30] fix(redaction): MCP gap rules, python/src/droidrun_redaction/_keys.py (DRO-4114) --- python/src/droidrun_redaction/_keys.py | 28 +++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/python/src/droidrun_redaction/_keys.py b/python/src/droidrun_redaction/_keys.py index 53badc7..1e94deb 100644 --- a/python/src/droidrun_redaction/_keys.py +++ b/python/src/droidrun_redaction/_keys.py @@ -3,7 +3,9 @@ import re from functools import lru_cache from typing import Literal +from unicodedata import normalize +from ._bip39 import begins_with_bip39_words from ._patterns import fold_lower from ._placeholder import PLACEHOLDER_MARK, literal_segments from ._spec import KEYS @@ -17,6 +19,11 @@ _SUFFIX_WORDS = tuple(KEYS["suffixWords"]) _PREFIX_WORDS = tuple(KEYS["prefixWords"]) _PASS_LAST_WORD = KEYS["passLastWord"] +_LOCALIZED_PASSWORDS = frozenset(KEYS["localizedPasswords"]) +_MNEMONIC_KEYS = frozenset(KEYS["mnemonicKeys"]) +_NEW_EXACT_KEYS = _LOCALIZED_PASSWORDS | _MNEMONIC_KEYS +_MAX_EXACT_KEY_UNITS = 2 * max(map(len, _NEW_EXACT_KEYS), default=0) +_EXACT_LOWER = str.maketrans({char: char.lower() for char in "ABCDEFGHIJKLMNOPQRSTUVWXYZÑŁŞÖАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"} | {"İ": "i"}) # The word split of SPEC section 6 as one pattern: a run of capitals that no lower-case letter follows (a @@ -45,6 +52,21 @@ def _compact_key(key: str) -> str: return _NOT_COMPACT.sub("", fold_lower(key).replace("İ", "i")) +def exact_key_form(key: str) -> str: + # SPEC 6: no longer key can be canonically equivalent to one of the pinned names. + if len(key) > _MAX_EXACT_KEY_UNITS: + return "" + return normalize("NFC", key).translate(_EXACT_LOWER) + + +def is_localized_password(key: str) -> bool: + return exact_key_form(key) in _LOCALIZED_PASSWORDS + + +def is_mnemonic_key(key: str) -> bool: + return exact_key_form(key) in _MNEMONIC_KEYS + + def _is_secret_word(word: str, plural: bool) -> bool: base = word.removesuffix("s") if plural else word if word in _JOINED or base in _JOINED: @@ -81,6 +103,8 @@ def _match_words(key: str, words: list[str], plural: bool) -> bool: def _evaluate(key: str) -> tuple[bool, bool, bool]: """(matches as a plural, matches as a singular, holds a count word): one split of the key.""" + if exact_key_form(key) in _NEW_EXACT_KEYS: + return True, True, False words = split_key_words(key) has_count_word = any(word in _COUNT_WORDS for word in words) return _match_words(key, words, True), _match_words(key, words, False), has_count_word @@ -101,13 +125,15 @@ def is_secret_key_name(key: str) -> bool: KeyVerdict = Literal["none", "string", "any"] -def key_verdict(key: str) -> KeyVerdict: +def key_verdict(key: str, value: object = None) -> KeyVerdict: """What a key makes of the values below it: `none`, `string` (strings only) or `any` (numbers too). A string under a `string` or `any` key is replaced; a number only under an `any` key (`pin`, `password`; not `max_tokens`, `prompt_tokens`). A key that was itself redacted is read without its placeholders. """ text = " ".join(literal_segments(key)) if PLACEHOLDER_MARK in key else key + if len(text) == 4 and fold_lower(text) == "seed" and isinstance(value, str) and begins_with_bip39_words(value): + return "string" matches_plural, matches_singular, has_count_word = _evaluation(text) if not matches_plural: return "none" From fd40360cd4353fc5bb4762ada1a70f9ca7d4fb9d Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:17:23 +0100 Subject: [PATCH 18/30] fix(redaction): MCP gap rules, spec/algorithms.json (DRO-4114) --- spec/algorithms.json | 224 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) diff --git a/spec/algorithms.json b/spec/algorithms.json index b1613ba..0e278a5 100644 --- a/spec/algorithms.json +++ b/spec/algorithms.json @@ -91,6 +91,230 @@ "maxDepth": 64, "maxNodes": 500000 }, + "ibanLengths": { + "AD": 24, "AE": 23, "AL": 28, "AT": 20, "AZ": 28, "BA": 20, "BE": 16, "BG": 22, + "BH": 22, "BI": 27, "BR": 29, "BY": 28, "CH": 21, "CR": 22, "CY": 28, "CZ": 24, + "DE": 22, "DJ": 27, "DK": 18, "DO": 28, "EE": 20, "EG": 29, "ES": 24, "FI": 18, + "FK": 18, "FO": 18, "FR": 27, "GB": 22, "GE": 22, "GI": 23, "GL": 18, "GR": 27, + "GT": 28, "HN": 28, "HR": 21, "HU": 28, "IE": 22, "IL": 23, "IQ": 23, "IS": 26, + "IT": 27, "JO": 30, "KW": 30, "KZ": 20, "LB": 28, "LC": 32, "LI": 21, "LT": 20, + "LU": 20, "LV": 21, "LY": 25, "MC": 27, "MD": 24, "ME": 22, "MK": 19, "MN": 20, + "MR": 27, "MT": 31, "MU": 30, "NI": 28, "NL": 18, "NO": 15, "OM": 23, "PK": 24, + "PL": 28, "PS": 29, "PT": 25, "QA": 29, "RO": 24, "RS": 22, "RU": 33, "SA": 24, + "SC": 31, "SD": 18, "SE": 24, "SI": 19, "SK": 24, "SM": 27, "SO": 23, "ST": 25, + "SV": 28, "TL": 23, "TN": 24, "TR": 26, "UA": 29, "VA": 22, "VG": 24, "XK": 20, + "YE": 30 + }, + "mnemonic": { + "counts": [12, 15, 18, 21, 24], + "words": [ + "abandon", "ability", "able", "about", "above", "absent", "absorb", "abstract", "absurd", "abuse", + "access", "accident", "account", "accuse", "achieve", "acid", "acoustic", "acquire", "across", "act", + "action", "actor", "actress", "actual", "adapt", "add", "addict", "address", "adjust", "admit", + "adult", "advance", "advice", "aerobic", "affair", "afford", "afraid", "again", "age", "agent", + "agree", "ahead", "aim", "air", "airport", "aisle", "alarm", "album", "alcohol", "alert", + "alien", "all", "alley", "allow", "almost", "alone", "alpha", "already", "also", "alter", + "always", "amateur", "amazing", "among", "amount", "amused", "analyst", "anchor", "ancient", "anger", + "angle", "angry", "animal", "ankle", "announce", "annual", "another", "answer", "antenna", "antique", + "anxiety", "any", "apart", "apology", "appear", "apple", "approve", "april", "arch", "arctic", + "area", "arena", "argue", "arm", "armed", "armor", "army", "around", "arrange", "arrest", + "arrive", "arrow", "art", "artefact", "artist", "artwork", "ask", "aspect", "assault", "asset", + "assist", "assume", "asthma", "athlete", "atom", "attack", "attend", "attitude", "attract", "auction", + "audit", "august", "aunt", "author", "auto", "autumn", "average", "avocado", "avoid", "awake", + "aware", "away", "awesome", "awful", "awkward", "axis", "baby", "bachelor", "bacon", "badge", + "bag", "balance", "balcony", "ball", "bamboo", "banana", "banner", "bar", "barely", "bargain", + "barrel", "base", "basic", "basket", "battle", "beach", "bean", "beauty", "because", "become", + "beef", "before", "begin", "behave", "behind", "believe", "below", "belt", "bench", "benefit", + "best", "betray", "better", "between", "beyond", "bicycle", "bid", "bike", "bind", "biology", + "bird", "birth", "bitter", "black", "blade", "blame", "blanket", "blast", "bleak", "bless", + "blind", "blood", "blossom", "blouse", "blue", "blur", "blush", "board", "boat", "body", + "boil", "bomb", "bone", "bonus", "book", "boost", "border", "boring", "borrow", "boss", + "bottom", "bounce", "box", "boy", "bracket", "brain", "brand", "brass", "brave", "bread", + "breeze", "brick", "bridge", "brief", "bright", "bring", "brisk", "broccoli", "broken", "bronze", + "broom", "brother", "brown", "brush", "bubble", "buddy", "budget", "buffalo", "build", "bulb", + "bulk", "bullet", "bundle", "bunker", "burden", "burger", "burst", "bus", "business", "busy", + "butter", "buyer", "buzz", "cabbage", "cabin", "cable", "cactus", "cage", "cake", "call", + "calm", "camera", "camp", "can", "canal", "cancel", "candy", "cannon", "canoe", "canvas", + "canyon", "capable", "capital", "captain", "car", "carbon", "card", "cargo", "carpet", "carry", + "cart", "case", "cash", "casino", "castle", "casual", "cat", "catalog", "catch", "category", + "cattle", "caught", "cause", "caution", "cave", "ceiling", "celery", "cement", "census", "century", + "cereal", "certain", "chair", "chalk", "champion", "change", "chaos", "chapter", "charge", "chase", + "chat", "cheap", "check", "cheese", "chef", "cherry", "chest", "chicken", "chief", "child", + "chimney", "choice", "choose", "chronic", "chuckle", "chunk", "churn", "cigar", "cinnamon", "circle", + "citizen", "city", "civil", "claim", "clap", "clarify", "claw", "clay", "clean", "clerk", + "clever", "click", "client", "cliff", "climb", "clinic", "clip", "clock", "clog", "close", + "cloth", "cloud", "clown", "club", "clump", "cluster", "clutch", "coach", "coast", "coconut", + "code", "coffee", "coil", "coin", "collect", "color", "column", "combine", "come", "comfort", + "comic", "common", "company", "concert", "conduct", "confirm", "congress", "connect", "consider", "control", + "convince", "cook", "cool", "copper", "copy", "coral", "core", "corn", "correct", "cost", + "cotton", "couch", "country", "couple", "course", "cousin", "cover", "coyote", "crack", "cradle", + "craft", "cram", "crane", "crash", "crater", "crawl", "crazy", "cream", "credit", "creek", + "crew", "cricket", "crime", "crisp", "critic", "crop", "cross", "crouch", "crowd", "crucial", + "cruel", "cruise", "crumble", "crunch", "crush", "cry", "crystal", "cube", "culture", "cup", + "cupboard", "curious", "current", "curtain", "curve", "cushion", "custom", "cute", "cycle", "dad", + "damage", "damp", "dance", "danger", "daring", "dash", "daughter", "dawn", "day", "deal", + "debate", "debris", "decade", "december", "decide", "decline", "decorate", "decrease", "deer", "defense", + "define", "defy", "degree", "delay", "deliver", "demand", "demise", "denial", "dentist", "deny", + "depart", "depend", "deposit", "depth", "deputy", "derive", "describe", "desert", "design", "desk", + "despair", "destroy", "detail", "detect", "develop", "device", "devote", "diagram", "dial", "diamond", + "diary", "dice", "diesel", "diet", "differ", "digital", "dignity", "dilemma", "dinner", "dinosaur", + "direct", "dirt", "disagree", "discover", "disease", "dish", "dismiss", "disorder", "display", "distance", + "divert", "divide", "divorce", "dizzy", "doctor", "document", "dog", "doll", "dolphin", "domain", + "donate", "donkey", "donor", "door", "dose", "double", "dove", "draft", "dragon", "drama", + "drastic", "draw", "dream", "dress", "drift", "drill", "drink", "drip", "drive", "drop", + "drum", "dry", "duck", "dumb", "dune", "during", "dust", "dutch", "duty", "dwarf", + "dynamic", "eager", "eagle", "early", "earn", "earth", "easily", "east", "easy", "echo", + "ecology", "economy", "edge", "edit", "educate", "effort", "egg", "eight", "either", "elbow", + "elder", "electric", "elegant", "element", "elephant", "elevator", "elite", "else", "embark", "embody", + "embrace", "emerge", "emotion", "employ", "empower", "empty", "enable", "enact", "end", "endless", + "endorse", "enemy", "energy", "enforce", "engage", "engine", "enhance", "enjoy", "enlist", "enough", + "enrich", "enroll", "ensure", "enter", "entire", "entry", "envelope", "episode", "equal", "equip", + "era", "erase", "erode", "erosion", "error", "erupt", "escape", "essay", "essence", "estate", + "eternal", "ethics", "evidence", "evil", "evoke", "evolve", "exact", "example", "excess", "exchange", + "excite", "exclude", "excuse", "execute", "exercise", "exhaust", "exhibit", "exile", "exist", "exit", + "exotic", "expand", "expect", "expire", "explain", "expose", "express", "extend", "extra", "eye", + "eyebrow", "fabric", "face", "faculty", "fade", "faint", "faith", "fall", "false", "fame", + "family", "famous", "fan", "fancy", "fantasy", "farm", "fashion", "fat", "fatal", "father", + "fatigue", "fault", "favorite", "feature", "february", "federal", "fee", "feed", "feel", "female", + "fence", "festival", "fetch", "fever", "few", "fiber", "fiction", "field", "figure", "file", + "film", "filter", "final", "find", "fine", "finger", "finish", "fire", "firm", "first", + "fiscal", "fish", "fit", "fitness", "fix", "flag", "flame", "flash", "flat", "flavor", + "flee", "flight", "flip", "float", "flock", "floor", "flower", "fluid", "flush", "fly", + "foam", "focus", "fog", "foil", "fold", "follow", "food", "foot", "force", "forest", + "forget", "fork", "fortune", "forum", "forward", "fossil", "foster", "found", "fox", "fragile", + "frame", "frequent", "fresh", "friend", "fringe", "frog", "front", "frost", "frown", "frozen", + "fruit", "fuel", "fun", "funny", "furnace", "fury", "future", "gadget", "gain", "galaxy", + "gallery", "game", "gap", "garage", "garbage", "garden", "garlic", "garment", "gas", "gasp", + "gate", "gather", "gauge", "gaze", "general", "genius", "genre", "gentle", "genuine", "gesture", + "ghost", "giant", "gift", "giggle", "ginger", "giraffe", "girl", "give", "glad", "glance", + "glare", "glass", "glide", "glimpse", "globe", "gloom", "glory", "glove", "glow", "glue", + "goat", "goddess", "gold", "good", "goose", "gorilla", "gospel", "gossip", "govern", "gown", + "grab", "grace", "grain", "grant", "grape", "grass", "gravity", "great", "green", "grid", + "grief", "grit", "grocery", "group", "grow", "grunt", "guard", "guess", "guide", "guilt", + "guitar", "gun", "gym", "habit", "hair", "half", "hammer", "hamster", "hand", "happy", + "harbor", "hard", "harsh", "harvest", "hat", "have", "hawk", "hazard", "head", "health", + "heart", "heavy", "hedgehog", "height", "hello", "helmet", "help", "hen", "hero", "hidden", + "high", "hill", "hint", "hip", "hire", "history", "hobby", "hockey", "hold", "hole", + "holiday", "hollow", "home", "honey", "hood", "hope", "horn", "horror", "horse", "hospital", + "host", "hotel", "hour", "hover", "hub", "huge", "human", "humble", "humor", "hundred", + "hungry", "hunt", "hurdle", "hurry", "hurt", "husband", "hybrid", "ice", "icon", "idea", + "identify", "idle", "ignore", "ill", "illegal", "illness", "image", "imitate", "immense", "immune", + "impact", "impose", "improve", "impulse", "inch", "include", "income", "increase", "index", "indicate", + "indoor", "industry", "infant", "inflict", "inform", "inhale", "inherit", "initial", "inject", "injury", + "inmate", "inner", "innocent", "input", "inquiry", "insane", "insect", "inside", "inspire", "install", + "intact", "interest", "into", "invest", "invite", "involve", "iron", "island", "isolate", "issue", + "item", "ivory", "jacket", "jaguar", "jar", "jazz", "jealous", "jeans", "jelly", "jewel", + "job", "join", "joke", "journey", "joy", "judge", "juice", "jump", "jungle", "junior", + "junk", "just", "kangaroo", "keen", "keep", "ketchup", "key", "kick", "kid", "kidney", + "kind", "kingdom", "kiss", "kit", "kitchen", "kite", "kitten", "kiwi", "knee", "knife", + "knock", "know", "lab", "label", "labor", "ladder", "lady", "lake", "lamp", "language", + "laptop", "large", "later", "latin", "laugh", "laundry", "lava", "law", "lawn", "lawsuit", + "layer", "lazy", "leader", "leaf", "learn", "leave", "lecture", "left", "leg", "legal", + "legend", "leisure", "lemon", "lend", "length", "lens", "leopard", "lesson", "letter", "level", + "liar", "liberty", "library", "license", "life", "lift", "light", "like", "limb", "limit", + "link", "lion", "liquid", "list", "little", "live", "lizard", "load", "loan", "lobster", + "local", "lock", "logic", "lonely", "long", "loop", "lottery", "loud", "lounge", "love", + "loyal", "lucky", "luggage", "lumber", "lunar", "lunch", "luxury", "lyrics", "machine", "mad", + "magic", "magnet", "maid", "mail", "main", "major", "make", "mammal", "man", "manage", + "mandate", "mango", "mansion", "manual", "maple", "marble", "march", "margin", "marine", "market", + "marriage", "mask", "mass", "master", "match", "material", "math", "matrix", "matter", "maximum", + "maze", "meadow", "mean", "measure", "meat", "mechanic", "medal", "media", "melody", "melt", + "member", "memory", "mention", "menu", "mercy", "merge", "merit", "merry", "mesh", "message", + "metal", "method", "middle", "midnight", "milk", "million", "mimic", "mind", "minimum", "minor", + "minute", "miracle", "mirror", "misery", "miss", "mistake", "mix", "mixed", "mixture", "mobile", + "model", "modify", "mom", "moment", "monitor", "monkey", "monster", "month", "moon", "moral", + "more", "morning", "mosquito", "mother", "motion", "motor", "mountain", "mouse", "move", "movie", + "much", "muffin", "mule", "multiply", "muscle", "museum", "mushroom", "music", "must", "mutual", + "myself", "mystery", "myth", "naive", "name", "napkin", "narrow", "nasty", "nation", "nature", + "near", "neck", "need", "negative", "neglect", "neither", "nephew", "nerve", "nest", "net", + "network", "neutral", "never", "news", "next", "nice", "night", "noble", "noise", "nominee", + "noodle", "normal", "north", "nose", "notable", "note", "nothing", "notice", "novel", "now", + "nuclear", "number", "nurse", "nut", "oak", "obey", "object", "oblige", "obscure", "observe", + "obtain", "obvious", "occur", "ocean", "october", "odor", "off", "offer", "office", "often", + "oil", "okay", "old", "olive", "olympic", "omit", "once", "one", "onion", "online", + "only", "open", "opera", "opinion", "oppose", "option", "orange", "orbit", "orchard", "order", + "ordinary", "organ", "orient", "original", "orphan", "ostrich", "other", "outdoor", "outer", "output", + "outside", "oval", "oven", "over", "own", "owner", "oxygen", "oyster", "ozone", "pact", + "paddle", "page", "pair", "palace", "palm", "panda", "panel", "panic", "panther", "paper", + "parade", "parent", "park", "parrot", "party", "pass", "patch", "path", "patient", "patrol", + "pattern", "pause", "pave", "payment", "peace", "peanut", "pear", "peasant", "pelican", "pen", + "penalty", "pencil", "people", "pepper", "perfect", "permit", "person", "pet", "phone", "photo", + "phrase", "physical", "piano", "picnic", "picture", "piece", "pig", "pigeon", "pill", "pilot", + "pink", "pioneer", "pipe", "pistol", "pitch", "pizza", "place", "planet", "plastic", "plate", + "play", "please", "pledge", "pluck", "plug", "plunge", "poem", "poet", "point", "polar", + "pole", "police", "pond", "pony", "pool", "popular", "portion", "position", "possible", "post", + "potato", "pottery", "poverty", "powder", "power", "practice", "praise", "predict", "prefer", "prepare", + "present", "pretty", "prevent", "price", "pride", "primary", "print", "priority", "prison", "private", + "prize", "problem", "process", "produce", "profit", "program", "project", "promote", "proof", "property", + "prosper", "protect", "proud", "provide", "public", "pudding", "pull", "pulp", "pulse", "pumpkin", + "punch", "pupil", "puppy", "purchase", "purity", "purpose", "purse", "push", "put", "puzzle", + "pyramid", "quality", "quantum", "quarter", "question", "quick", "quit", "quiz", "quote", "rabbit", + "raccoon", "race", "rack", "radar", "radio", "rail", "rain", "raise", "rally", "ramp", + "ranch", "random", "range", "rapid", "rare", "rate", "rather", "raven", "raw", "razor", + "ready", "real", "reason", "rebel", "rebuild", "recall", "receive", "recipe", "record", "recycle", + "reduce", "reflect", "reform", "refuse", "region", "regret", "regular", "reject", "relax", "release", + "relief", "rely", "remain", "remember", "remind", "remove", "render", "renew", "rent", "reopen", + "repair", "repeat", "replace", "report", "require", "rescue", "resemble", "resist", "resource", "response", + "result", "retire", "retreat", "return", "reunion", "reveal", "review", "reward", "rhythm", "rib", + "ribbon", "rice", "rich", "ride", "ridge", "rifle", "right", "rigid", "ring", "riot", + "ripple", "risk", "ritual", "rival", "river", "road", "roast", "robot", "robust", "rocket", + "romance", "roof", "rookie", "room", "rose", "rotate", "rough", "round", "route", "royal", + "rubber", "rude", "rug", "rule", "run", "runway", "rural", "sad", "saddle", "sadness", + "safe", "sail", "salad", "salmon", "salon", "salt", "salute", "same", "sample", "sand", + "satisfy", "satoshi", "sauce", "sausage", "save", "say", "scale", "scan", "scare", "scatter", + "scene", "scheme", "school", "science", "scissors", "scorpion", "scout", "scrap", "screen", "script", + "scrub", "sea", "search", "season", "seat", "second", "secret", "section", "security", "seed", + "seek", "segment", "select", "sell", "seminar", "senior", "sense", "sentence", "series", "service", + "session", "settle", "setup", "seven", "shadow", "shaft", "shallow", "share", "shed", "shell", + "sheriff", "shield", "shift", "shine", "ship", "shiver", "shock", "shoe", "shoot", "shop", + "short", "shoulder", "shove", "shrimp", "shrug", "shuffle", "shy", "sibling", "sick", "side", + "siege", "sight", "sign", "silent", "silk", "silly", "silver", "similar", "simple", "since", + "sing", "siren", "sister", "situate", "six", "size", "skate", "sketch", "ski", "skill", + "skin", "skirt", "skull", "slab", "slam", "sleep", "slender", "slice", "slide", "slight", + "slim", "slogan", "slot", "slow", "slush", "small", "smart", "smile", "smoke", "smooth", + "snack", "snake", "snap", "sniff", "snow", "soap", "soccer", "social", "sock", "soda", + "soft", "solar", "soldier", "solid", "solution", "solve", "someone", "song", "soon", "sorry", + "sort", "soul", "sound", "soup", "source", "south", "space", "spare", "spatial", "spawn", + "speak", "special", "speed", "spell", "spend", "sphere", "spice", "spider", "spike", "spin", + "spirit", "split", "spoil", "sponsor", "spoon", "sport", "spot", "spray", "spread", "spring", + "spy", "square", "squeeze", "squirrel", "stable", "stadium", "staff", "stage", "stairs", "stamp", + "stand", "start", "state", "stay", "steak", "steel", "stem", "step", "stereo", "stick", + "still", "sting", "stock", "stomach", "stone", "stool", "story", "stove", "strategy", "street", + "strike", "strong", "struggle", "student", "stuff", "stumble", "style", "subject", "submit", "subway", + "success", "such", "sudden", "suffer", "sugar", "suggest", "suit", "summer", "sun", "sunny", + "sunset", "super", "supply", "supreme", "sure", "surface", "surge", "surprise", "surround", "survey", + "suspect", "sustain", "swallow", "swamp", "swap", "swarm", "swear", "sweet", "swift", "swim", + "swing", "switch", "sword", "symbol", "symptom", "syrup", "system", "table", "tackle", "tag", + "tail", "talent", "talk", "tank", "tape", "target", "task", "taste", "tattoo", "taxi", + "teach", "team", "tell", "ten", "tenant", "tennis", "tent", "term", "test", "text", + "thank", "that", "theme", "then", "theory", "there", "they", "thing", "this", "thought", + "three", "thrive", "throw", "thumb", "thunder", "ticket", "tide", "tiger", "tilt", "timber", + "time", "tiny", "tip", "tired", "tissue", "title", "toast", "tobacco", "today", "toddler", + "toe", "together", "toilet", "token", "tomato", "tomorrow", "tone", "tongue", "tonight", "tool", + "tooth", "top", "topic", "topple", "torch", "tornado", "tortoise", "toss", "total", "tourist", + "toward", "tower", "town", "toy", "track", "trade", "traffic", "tragic", "train", "transfer", + "trap", "trash", "travel", "tray", "treat", "tree", "trend", "trial", "tribe", "trick", + "trigger", "trim", "trip", "trophy", "trouble", "truck", "true", "truly", "trumpet", "trust", + "truth", "try", "tube", "tuition", "tumble", "tuna", "tunnel", "turkey", "turn", "turtle", + "twelve", "twenty", "twice", "twin", "twist", "two", "type", "typical", "ugly", "umbrella", + "unable", "unaware", "uncle", "uncover", "under", "undo", "unfair", "unfold", "unhappy", "uniform", + "unique", "unit", "universe", "unknown", "unlock", "until", "unusual", "unveil", "update", "upgrade", + "uphold", "upon", "upper", "upset", "urban", "urge", "usage", "use", "used", "useful", + "useless", "usual", "utility", "vacant", "vacuum", "vague", "valid", "valley", "valve", "van", + "vanish", "vapor", "various", "vast", "vault", "vehicle", "velvet", "vendor", "venture", "venue", + "verb", "verify", "version", "very", "vessel", "veteran", "viable", "vibrant", "vicious", "victory", + "video", "view", "village", "vintage", "violin", "virtual", "virus", "visa", "visit", "visual", + "vital", "vivid", "vocal", "voice", "void", "volcano", "volume", "vote", "voyage", "wage", + "wagon", "wait", "walk", "wall", "walnut", "want", "warfare", "warm", "warrior", "wash", + "wasp", "waste", "water", "wave", "way", "wealth", "weapon", "wear", "weasel", "weather", + "web", "wedding", "weekend", "weird", "welcome", "west", "wet", "whale", "what", "wheat", + "wheel", "when", "where", "whip", "whisper", "wide", "width", "wife", "wild", "will", + "win", "window", "wine", "wing", "wink", "winner", "winter", "wire", "wisdom", "wise", + "wish", "witness", "wolf", "woman", "wonder", "wood", "wool", "word", "work", "world", + "worry", "worth", "wrap", "wreck", "wrestle", "wrist", "write", "wrong", "yard", "year", + "yellow", "you", "young", "youth", "zebra", "zero", "zone", "zoo" + ] + }, "letters": { "unicodeVersion": "15.0.0", "ranges": "41-5a,61-7a,aa,b5,ba,c0-d6,d8-f6,f8-2c1,2c6-2d1,2e0-2e4,2ec,2ee,370-374,376-377,37a-37d,37f,386,388-38a,38c,38e-3a1,3a3-3f5,3f7-481,48a-52f,531-556,559,560-588,5d0-5ea,5ef-5f2,620-64a,66e-66f,671-6d3,6d5,6e5-6e6,6ee-6ef,6fa-6fc,6ff,710,712-72f,74d-7a5,7b1,7ca-7ea,7f4-7f5,7fa,800-815,81a,824,828,840-858,860-86a,870-887,889-88e,8a0-8c9,904-939,93d,950,958-961,971-980,985-98c,98f-990,993-9a8,9aa-9b0,9b2,9b6-9b9,9bd,9ce,9dc-9dd,9df-9e1,9f0-9f1,9fc,a05-a0a,a0f-a10,a13-a28,a2a-a30,a32-a33,a35-a36,a38-a39,a59-a5c,a5e,a72-a74,a85-a8d,a8f-a91,a93-aa8,aaa-ab0,ab2-ab3,ab5-ab9,abd,ad0,ae0-ae1,af9,b05-b0c,b0f-b10,b13-b28,b2a-b30,b32-b33,b35-b39,b3d,b5c-b5d,b5f-b61,b71,b83,b85-b8a,b8e-b90,b92-b95,b99-b9a,b9c,b9e-b9f,ba3-ba4,ba8-baa,bae-bb9,bd0,c05-c0c,c0e-c10,c12-c28,c2a-c39,c3d,c58-c5a,c5d,c60-c61,c80,c85-c8c,c8e-c90,c92-ca8,caa-cb3,cb5-cb9,cbd,cdd-cde,ce0-ce1,cf1-cf2,d04-d0c,d0e-d10,d12-d3a,d3d,d4e,d54-d56,d5f-d61,d7a-d7f,d85-d96,d9a-db1,db3-dbb,dbd,dc0-dc6,e01-e30,e32-e33,e40-e46,e81-e82,e84,e86-e8a,e8c-ea3,ea5,ea7-eb0,eb2-eb3,ebd,ec0-ec4,ec6,edc-edf,f00,f40-f47,f49-f6c,f88-f8c,1000-102a,103f,1050-1055,105a-105d,1061,1065-1066,106e-1070,1075-1081,108e,10a0-10c5,10c7,10cd,10d0-10fa,10fc-1248,124a-124d,1250-1256,1258,125a-125d,1260-1288,128a-128d,1290-12b0,12b2-12b5,12b8-12be,12c0,12c2-12c5,12c8-12d6,12d8-1310,1312-1315,1318-135a,1380-138f,13a0-13f5,13f8-13fd,1401-166c,166f-167f,1681-169a,16a0-16ea,16f1-16f8,1700-1711,171f-1731,1740-1751,1760-176c,176e-1770,1780-17b3,17d7,17dc,1820-1878,1880-1884,1887-18a8,18aa,18b0-18f5,1900-191e,1950-196d,1970-1974,1980-19ab,19b0-19c9,1a00-1a16,1a20-1a54,1aa7,1b05-1b33,1b45-1b4c,1b83-1ba0,1bae-1baf,1bba-1be5,1c00-1c23,1c4d-1c4f,1c5a-1c7d,1c80-1c88,1c90-1cba,1cbd-1cbf,1ce9-1cec,1cee-1cf3,1cf5-1cf6,1cfa,1d00-1dbf,1e00-1f15,1f18-1f1d,1f20-1f45,1f48-1f4d,1f50-1f57,1f59,1f5b,1f5d,1f5f-1f7d,1f80-1fb4,1fb6-1fbc,1fbe,1fc2-1fc4,1fc6-1fcc,1fd0-1fd3,1fd6-1fdb,1fe0-1fec,1ff2-1ff4,1ff6-1ffc,2071,207f,2090-209c,2102,2107,210a-2113,2115,2119-211d,2124,2126,2128,212a-212d,212f-2139,213c-213f,2145-2149,214e,2183-2184,2c00-2ce4,2ceb-2cee,2cf2-2cf3,2d00-2d25,2d27,2d2d,2d30-2d67,2d6f,2d80-2d96,2da0-2da6,2da8-2dae,2db0-2db6,2db8-2dbe,2dc0-2dc6,2dc8-2dce,2dd0-2dd6,2dd8-2dde,2e2f,3005-3006,3031-3035,303b-303c,3041-3096,309d-309f,30a1-30fa,30fc-30ff,3105-312f,3131-318e,31a0-31bf,31f0-31ff,3400-4dbf,4e00-a48c,a4d0-a4fd,a500-a60c,a610-a61f,a62a-a62b,a640-a66e,a67f-a69d,a6a0-a6e5,a717-a71f,a722-a788,a78b-a7ca,a7d0-a7d1,a7d3,a7d5-a7d9,a7f2-a801,a803-a805,a807-a80a,a80c-a822,a840-a873,a882-a8b3,a8f2-a8f7,a8fb,a8fd-a8fe,a90a-a925,a930-a946,a960-a97c,a984-a9b2,a9cf,a9e0-a9e4,a9e6-a9ef,a9fa-a9fe,aa00-aa28,aa40-aa42,aa44-aa4b,aa60-aa76,aa7a,aa7e-aaaf,aab1,aab5-aab6,aab9-aabd,aac0,aac2,aadb-aadd,aae0-aaea,aaf2-aaf4,ab01-ab06,ab09-ab0e,ab11-ab16,ab20-ab26,ab28-ab2e,ab30-ab5a,ab5c-ab69,ab70-abe2,ac00-d7a3,d7b0-d7c6,d7cb-d7fb,f900-fa6d,fa70-fad9,fb00-fb06,fb13-fb17,fb1d,fb1f-fb28,fb2a-fb36,fb38-fb3c,fb3e,fb40-fb41,fb43-fb44,fb46-fbb1,fbd3-fd3d,fd50-fd8f,fd92-fdc7,fdf0-fdfb,fe70-fe74,fe76-fefc,ff21-ff3a,ff41-ff5a,ff66-ffbe,ffc2-ffc7,ffca-ffcf,ffd2-ffd7,ffda-ffdc,10000-1000b,1000d-10026,10028-1003a,1003c-1003d,1003f-1004d,10050-1005d,10080-100fa,10280-1029c,102a0-102d0,10300-1031f,1032d-10340,10342-10349,10350-10375,10380-1039d,103a0-103c3,103c8-103cf,10400-1049d,104b0-104d3,104d8-104fb,10500-10527,10530-10563,10570-1057a,1057c-1058a,1058c-10592,10594-10595,10597-105a1,105a3-105b1,105b3-105b9,105bb-105bc,10600-10736,10740-10755,10760-10767,10780-10785,10787-107b0,107b2-107ba,10800-10805,10808,1080a-10835,10837-10838,1083c,1083f-10855,10860-10876,10880-1089e,108e0-108f2,108f4-108f5,10900-10915,10920-10939,10980-109b7,109be-109bf,10a00,10a10-10a13,10a15-10a17,10a19-10a35,10a60-10a7c,10a80-10a9c,10ac0-10ac7,10ac9-10ae4,10b00-10b35,10b40-10b55,10b60-10b72,10b80-10b91,10c00-10c48,10c80-10cb2,10cc0-10cf2,10d00-10d23,10e80-10ea9,10eb0-10eb1,10f00-10f1c,10f27,10f30-10f45,10f70-10f81,10fb0-10fc4,10fe0-10ff6,11003-11037,11071-11072,11075,11083-110af,110d0-110e8,11103-11126,11144,11147,11150-11172,11176,11183-111b2,111c1-111c4,111da,111dc,11200-11211,11213-1122b,1123f-11240,11280-11286,11288,1128a-1128d,1128f-1129d,1129f-112a8,112b0-112de,11305-1130c,1130f-11310,11313-11328,1132a-11330,11332-11333,11335-11339,1133d,11350,1135d-11361,11400-11434,11447-1144a,1145f-11461,11480-114af,114c4-114c5,114c7,11580-115ae,115d8-115db,11600-1162f,11644,11680-116aa,116b8,11700-1171a,11740-11746,11800-1182b,118a0-118df,118ff-11906,11909,1190c-11913,11915-11916,11918-1192f,1193f,11941,119a0-119a7,119aa-119d0,119e1,119e3,11a00,11a0b-11a32,11a3a,11a50,11a5c-11a89,11a9d,11ab0-11af8,11c00-11c08,11c0a-11c2e,11c40,11c72-11c8f,11d00-11d06,11d08-11d09,11d0b-11d30,11d46,11d60-11d65,11d67-11d68,11d6a-11d89,11d98,11ee0-11ef2,11f02,11f04-11f10,11f12-11f33,11fb0,12000-12399,12480-12543,12f90-12ff0,13000-1342f,13441-13446,14400-14646,16800-16a38,16a40-16a5e,16a70-16abe,16ad0-16aed,16b00-16b2f,16b40-16b43,16b63-16b77,16b7d-16b8f,16e40-16e7f,16f00-16f4a,16f50,16f93-16f9f,16fe0-16fe1,16fe3,17000-187f7,18800-18cd5,18d00-18d08,1aff0-1aff3,1aff5-1affb,1affd-1affe,1b000-1b122,1b132,1b150-1b152,1b155,1b164-1b167,1b170-1b2fb,1bc00-1bc6a,1bc70-1bc7c,1bc80-1bc88,1bc90-1bc99,1d400-1d454,1d456-1d49c,1d49e-1d49f,1d4a2,1d4a5-1d4a6,1d4a9-1d4ac,1d4ae-1d4b9,1d4bb,1d4bd-1d4c3,1d4c5-1d505,1d507-1d50a,1d50d-1d514,1d516-1d51c,1d51e-1d539,1d53b-1d53e,1d540-1d544,1d546,1d54a-1d550,1d552-1d6a5,1d6a8-1d6c0,1d6c2-1d6da,1d6dc-1d6fa,1d6fc-1d714,1d716-1d734,1d736-1d74e,1d750-1d76e,1d770-1d788,1d78a-1d7a8,1d7aa-1d7c2,1d7c4-1d7cb,1df00-1df1e,1df25-1df2a,1e030-1e06d,1e100-1e12c,1e137-1e13d,1e14e,1e290-1e2ad,1e2c0-1e2eb,1e4d0-1e4eb,1e7e0-1e7e6,1e7e8-1e7eb,1e7ed-1e7ee,1e7f0-1e7fe,1e800-1e8c4,1e900-1e943,1e94b,1ee00-1ee03,1ee05-1ee1f,1ee21-1ee22,1ee24,1ee27,1ee29-1ee32,1ee34-1ee37,1ee39,1ee3b,1ee42,1ee47,1ee49,1ee4b,1ee4d-1ee4f,1ee51-1ee52,1ee54,1ee57,1ee59,1ee5b,1ee5d,1ee5f,1ee61-1ee62,1ee64,1ee67-1ee6a,1ee6c-1ee72,1ee74-1ee77,1ee79-1ee7c,1ee7e,1ee80-1ee89,1ee8b-1ee9b,1eea1-1eea3,1eea5-1eea9,1eeab-1eebb,20000-2a6df,2a700-2b739,2b740-2b81d,2b820-2cea1,2ceb0-2ebe0,2f800-2fa1d,30000-3134a,31350-323af" From 5b371586b65b75cf0995eea62f12dec92d357b6d Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:17:27 +0100 Subject: [PATCH 19/30] fix(redaction): MCP gap rules, spec/keys.json (DRO-4114) --- spec/keys.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/keys.json b/spec/keys.json index 55bffcc..5afe62c 100644 --- a/spec/keys.json +++ b/spec/keys.json @@ -1,6 +1,8 @@ { "specVersion": 1, "description": "Key-name word lists of the key-name matcher (SPEC.md section 6).", + "localizedPasswords": ["passwort", "kennwort", "contraseña", "mot de passe", "mdp", "senha", "parola d'ordine", "parola d’ordine", "пароль", "wachtwoord", "hasło", "şifre", "lösenord"], + "mnemonicKeys": ["mnemonic", "mnemonic phrase", "recovery phrase", "seed phrase"], "structuralSkipKeys": [ "type", "id" From e6ed04228572aeb9e8e84c9b280281d4d51225f9 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:35:58 +0100 Subject: [PATCH 20/30] test(redaction): 100 no-redaction guards; skip device IDs and promo/version/model codes (DRO-4114) --- spec/SPEC.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/spec/SPEC.md b/spec/SPEC.md index 0a4b2f9..506b3d0 100644 --- a/spec/SPEC.md +++ b/spec/SPEC.md @@ -687,7 +687,9 @@ Three additional entries scan before the five original patterns: subscriber digits. Both German entries also accept `PHONE_EXT`. These three entries use `numericEdges: run` and the preceding-word exclusions in `rules.json` (`order`, `invoice`, -`version`, `build`, `timestamp`, `port`). Compact national numbers are still not found. Dates, times and +`version`, `build`, `timestamp`, `port`). The international `00` entry also excludes the explicit labels +`device id` and `device ids` (`ignoreAfterLabels`, 4.1); the label must precede the candidate directly, not just +the first item in a list. Compact national numbers are still not found. Dates, times and versions such as `2026-11-19 10:00:59` and `v0.3.0` are not new phone forms. ### 4.21 `ip` @@ -735,7 +737,8 @@ The original four entries: 3. **Additional compact forms**, 4 to 8 digits after an explicit noun joined by `was`, or after bare `2FA` with either join. Reject a match followed by a digit or hyphen, so `OTP was 2026-2027` and `2FA: 2026-2027` stay. 4. **The bare noun `code`**, 6 to 8 digits with either join (`your code is 123456`; `your code is 4821` stays), unless the word before it - (4.1) is `error`, `exit`, `status`, `response`, `postal`, `zip`, `area`, `country`, `invoice` or `order` + (4.1) is `error`, `exit`, `status`, `response`, `postal`, `zip`, `area`, `country`, `invoice`, `order`, + `promo`, `version` or `model` (`ignoreAfterWords`, `afterGapClass` whitespace), or it follows `http error` (`ignoreAfterLabels`). For example, `HTTP error: Code: 482913`, `Invoice code: 482913` and `Order code: 482913` stay. @@ -744,7 +747,8 @@ The additional entries use `numericEdges: code` (5.9) and the literal bounded co - `Your code:` (the colon is required for 4–5 digits), or `code` after a listed brand, with optional `Your`. The brand entry uses the existing join. Spanish `código de verificación` accepts `es` in its join. - Bare `Code:` may precede 4–8 uppercase ASCII letters/digits, with at least one of each. The prior-word denylist - excludes error/status, postal/area, order/invoice, and weak prose contexts such as `see code` and `source code`. + excludes error/status, postal/area, order/invoice, promo/version/model labels, and weak prose contexts such as + `see code` and `source code`. The promo/version/model exclusions also apply to bare numeric codes, not explicit OTP labels. - An explicit OTP label and join followed by an existing standard/legacy marker may have a code glued to the marker. Only the trailing code is masked. The marker form caps the id at 128 units and its optional suffix at 4. - A code before `is your` + explicit noun (with optional listed brand), or `is your` + listed brand + `code`; From 1af9dddeb0bb40ef51f1bc61e97d0a0b8ef75f87 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:36:01 +0100 Subject: [PATCH 21/30] test(redaction): no-redaction guards, part 2 (DRO-4114) --- spec/rules.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spec/rules.json b/spec/rules.json index 6d9d043..9b35205 100644 --- a/spec/rules.json +++ b/spec/rules.json @@ -583,7 +583,7 @@ }, {"id": "iban", "kind": "iban", "pattern": "\\b[A-Za-z]{2}[0-9]{2}"}, {"id": "card", "kind": "regex", "pattern": "\\b[1-9](?:[ -]?[0-9]){12,18}\\b", "check": "luhn", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "ignoreAfterLabels": ["invoice number"], "afterGapClass": "[ \t:=#]"}, - {"id": "phone", "kind": "regex", "pattern": "\\b00[1-9](?:[ .-]?[0-9]){7,14}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, + {"id": "phone", "kind": "regex", "pattern": "\\b00[1-9](?:[ .-]?[0-9]){7,14}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterLabels": ["device id", "device ids"], "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, {"id": "phone", "kind": "regex", "pattern": "\\b(?:0(?:30|40|69|89)|0(?:2[0-9]|3[3-9]|4[1-9]|5[0-9]|6[0-8]|7[0-9]|8[0-8]|9[0-9])[0-9]{1,2})[ -][1-9][0-9]{5,8}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, {"id": "phone", "kind": "regex", "pattern": "\\b(?:015[0-9]|01[67][0-9])[ -][0-9]{7,8}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, { @@ -726,13 +726,16 @@ "area", "country", "invoice", - "order" + "order", + "promo", + "version", + "model" ], "afterGapClass": "[{{WS}}]" }, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_YOUR}} {{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b(?:{{OTP_YOUR}} )?{{OTP_BRAND}} {{OTP_BARE}}{{OTP_JOIN_PLUS}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, - {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}([A-Z0-9]{4,8})\\b", "group": 1, "requireClass": "[A-Z]", "numericEdges": "code", "ignoreAfterWords": ["error", "exit", "status", "response", "postal", "zip", "area", "country", "order", "invoice", "see", "source", "product"], "ignoreAfterLabels": ["http error"], "afterGapClass": "[{{WS}}]", "check": "otp-alphanumeric"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}([A-Z0-9]{4,8})\\b", "group": 1, "requireClass": "[A-Z]", "numericEdges": "code", "ignoreAfterWords": ["error", "exit", "status", "response", "postal", "zip", "area", "country", "order", "invoice", "promo", "version", "model", "see", "source", "product"], "ignoreAfterLabels": ["http error"], "afterGapClass": "[{{WS}}]", "check": "otp-alphanumeric"}, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_SPANISH}}{{OTP_SPANISH_JOIN}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}|\\b{{OTP_SPANISH}}){{OTP_JOIN_PLUS}}{{OTP_OLD_MARKER}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b((?:[gG]-)?{{OTP_CODE_DIGITS}}) (?:{{OTP_SUFFIX_EN}} (?:(?:{{OTP_BRAND}} )?{{OTP_NOUN}}|{{OTP_BRAND}} {{OTP_BARE}})|{{OTP_SUFFIX_DE}} {{OTP_NOUN}}|{{OTP_SUFFIX_FR}} {{OTP_NOUN}}|{{OTP_SUFFIX_ES}} {{OTP_SPANISH}})\\b", "group": 1, "numericEdges": "code", "ignoreBeforeClass": "[-.]"}, From 5203039535c51ca67cb9084dd0de117e4685c568 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:36:05 +0100 Subject: [PATCH 22/30] test(redaction): no-redaction guards, part 3 (DRO-4114) --- spec/vectors/keywords.json | 29 ++++++++++++++- spec/vectors/pii.json | 73 +++++++++++++++++++++++++++++++++++++- 2 files changed, 100 insertions(+), 2 deletions(-) diff --git a/spec/vectors/keywords.json b/spec/vectors/keywords.json index 6d1a721..9b919dd 100644 --- a/spec/vectors/keywords.json +++ b/spec/vectors/keywords.json @@ -480,6 +480,33 @@ {"name": "round two: mnemonic query value stops before another parameter", "input": "https://example.test/?mnemonic=alpha&keep=1", "expected": "https://example.test/?mnemonic=[REDACTED:key-context]&keep=1"}, {"name": "round two: mnemonic query value stops before the fragment", "input": "https://example.test/?keep=1&mnemonic=alpha#section", "expected": "https://example.test/?keep=1&mnemonic=[REDACTED:key-context]#section"}, {"name": "round three: seed skips a full-tier token on the first pass", "input": "seed: npm_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expectedSync": "seed: npm_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expectedAsync": "seed: [REDACTED:npm]"}, - {"name": "round three: seed skips a standard-tier token on the first pass", "input": "seed: dr_sk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expected": "seed: [REDACTED:platform-key]"} + {"name": "round three: seed skips a standard-tier token on the first pass", "input": "seed: dr_sk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expected": "seed: [REDACTED:platform-key]"}, + {"name": "feedback guard: password 01", "input": "The help text says Passwort without an example.", "mode": "strict", "opts": {"pii": true}, "expected": "The help text says Passwort without an example."}, + {"name": "feedback guard: password 01 (compat without PII)", "input": "The help text says Passwort without an example.", "expected": "The help text says Passwort without an example."}, + {"name": "feedback guard: password 02", "input": "Password reset link sent.", "mode": "strict", "opts": {"pii": true}, "expected": "Password reset link sent."}, + {"name": "feedback guard: password 03", "input": "The password field is empty.", "mode": "strict", "opts": {"pii": true}, "expected": "The password field is empty."}, + {"name": "feedback guard: password 03 (compat without PII)", "input": "The password field is empty.", "expected": "The password field is empty."}, + {"name": "feedback guard: password 04", "input": "Forgot password?", "mode": "strict", "opts": {"pii": true}, "expected": "Forgot password?"}, + {"name": "feedback guard: password 05", "input": "## Passwort und Anmeldung", "mode": "strict", "opts": {"pii": true}, "expected": "## Passwort und Anmeldung"}, + {"name": "feedback guard: password 06", "input": "The button says Kennwort ändern.", "mode": "strict", "opts": {"pii": true}, "expected": "The button says Kennwort ändern."}, + {"name": "feedback guard: password 07", "input": "Choose Mot de passe in the settings menu.", "mode": "strict", "opts": {"pii": true}, "expected": "Choose Mot de passe in the settings menu."}, + {"name": "feedback guard: password 08", "input": "La contraseña se cambia desde el perfil.", "mode": "strict", "opts": {"pii": true}, "expected": "La contraseña se cambia desde el perfil."}, + {"name": "feedback guard: password 09", "input": "The installer says пароль не задан.", "mode": "strict", "opts": {"pii": true}, "expected": "The installer says пароль не задан."}, + {"name": "feedback guard: password 10", "input": "The Password section still has a broken link.", "mode": "strict", "opts": {"pii": true}, "expected": "The Password section still has a broken link."}, + {"name": "feedback guard: mnemonic 01", "input": "seed=1234", "mode": "strict", "opts": {"pii": true}, "expected": "seed=1234"}, + {"name": "feedback guard: mnemonic 01 (compat without PII)", "input": "seed=1234", "expected": "seed=1234"}, + {"name": "feedback guard: mnemonic 02", "input": "The random seed 42 reproduced the layout.", "mode": "strict", "opts": {"pii": true}, "expected": "The random seed 42 reproduced the layout."}, + {"name": "feedback guard: mnemonic 03", "input": "seed: 0xdeadbeef", "mode": "strict", "opts": {"pii": true}, "expected": "seed: 0xdeadbeef"}, + {"name": "feedback guard: mnemonic 04", "input": "The migration seeded the database.", "mode": "strict", "opts": {"pii": true}, "expected": "The migration seeded the database."}, + {"name": "feedback guard: mnemonic 05", "input": "The console confirms seed data loaded.", "mode": "strict", "opts": {"pii": true}, "expected": "The console confirms seed data loaded."}, + {"name": "feedback guard: mnemonic 06", "input": "this is a simple test of the system and it should work fine today", "mode": "strict", "opts": {"pii": true}, "expected": "this is a simple test of the system and it should work fine today"}, + {"name": "feedback guard: mnemonic 06 (compat without PII)", "input": "this is a simple test of the system and it should work fine today", "expected": "this is a simple test of the system and it should work fine today"}, + {"name": "feedback guard: mnemonic 07", "input": "I tried the new settings screen and the save button was still disabled after I changed the theme and then reopened the app again", "mode": "strict", "opts": {"pii": true}, "expected": "I tried the new settings screen and the save button was still disabled after I changed the theme and then reopened the app again"}, + {"name": "feedback guard: mnemonic 08", "input": "The source identifier was abandon_ability_able_about.", "mode": "strict", "opts": {"pii": true}, "expected": "The source identifier was abandon_ability_able_about."}, + {"name": "feedback guard: mnemonic 09", "input": "The docs explain what a mnemonic is.", "mode": "strict", "opts": {"pii": true}, "expected": "The docs explain what a mnemonic is."}, + {"name": "feedback guard: mnemonic 10", "input": "The heading reads Mnemonic and recovery options.", "mode": "strict", "opts": {"pii": true}, "expected": "The heading reads Mnemonic and recovery options."}, + {"name": "feedback guard: mnemonic 11", "input": "The debugger displayed seed=ordinary.", "mode": "strict", "opts": {"pii": true}, "expected": "The debugger displayed seed=ordinary."}, + {"name": "feedback guard: mnemonic 12", "input": "seed: abandon ability unexpected", "mode": "strict", "opts": {"pii": true}, "expected": "seed: abandon ability unexpected"}, + {"name": "feedback guard: mnemonic 13", "input": "The build kept `mnemonic_parser` unchanged.", "mode": "strict", "opts": {"pii": true}, "expected": "The build kept `mnemonic_parser` unchanged."} ] } diff --git a/spec/vectors/pii.json b/spec/vectors/pii.json index 66343be..cbfd25c 100644 --- a/spec/vectors/pii.json +++ b/spec/vectors/pii.json @@ -824,6 +824,77 @@ {"name": "gap review: HTTP error label excludes an alphanumeric OTP", "input": "HTTP error: Code: E1024", "opts": {"pii": true}, "expected": "HTTP error: Code: E1024"}, {"name": "round two: overlapping valid IBAN envelopes cover the entire span", "input": "ES43 DE89 3704 0044 0532 0130 00", "opts": {"pii": true}, "expected": "[REDACTED:iban]"}, {"name": "round two: HTTP error invoice and order labels exclude numeric OTPs", "input": "HTTP error: Code: 482913; Invoice code: 482913; Order code: 482913", "opts": {"pii": true}, "expected": "HTTP error: Code: 482913; Invoice code: 482913; Order code: 482913"}, - {"name": "round two: addressed and branded numeric OTPs still mask", "input": "Your code: 482913; Telegram code: 48291", "opts": {"pii": true}, "expected": "Your code: [REDACTED:otp]; Telegram code: [REDACTED:otp]"} + {"name": "round two: addressed and branded numeric OTPs still mask", "input": "Your code: 482913; Telegram code: 48291", "opts": {"pii": true}, "expected": "Your code: [REDACTED:otp]; Telegram code: [REDACTED:otp]"}, + {"name": "feedback guard: card 01", "input": "Saved payment test returned 4111111111111112.", "mode": "strict", "opts": {"pii": true}, "expected": "Saved payment test returned 4111111111111112."}, + {"name": "feedback guard: card 01 (compat without PII)", "input": "Saved payment test returned 4111111111111112.", "expected": "Saved payment test returned 4111111111111112."}, + {"name": "feedback guard: card 02", "input": "Order: 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "Order: 4111111111111111"}, + {"name": "feedback guard: card 03", "input": "Invoice number: 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "Invoice number: 4111111111111111"}, + {"name": "feedback guard: card 04", "input": "Tracking ID: TRK-9400111899223856928499", "mode": "strict", "opts": {"pii": true}, "expected": "Tracking ID: TRK-9400111899223856928499"}, + {"name": "feedback guard: card 05", "input": "Ticket references INC-20261202-175402.", "mode": "strict", "opts": {"pii": true}, "expected": "Ticket references INC-20261202-175402."}, + {"name": "feedback guard: card 06", "input": "Build: 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "Build: 4111111111111111"}, + {"name": "feedback guard: card 07", "input": "Device UUID was 550e8400-e29b-41d4-a716-446655440000.", "mode": "strict", "opts": {"pii": true}, "expected": "Device UUID was 550e8400-e29b-41d4-a716-446655440000."}, + {"name": "feedback guard: card 08", "input": "Checksum SHA-256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.", "mode": "strict", "opts": {"pii": true}, "expected": "Checksum SHA-256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855."}, + {"name": "feedback guard: card 09", "input": "Commit f38a671adc5018c8a9b5b32f85fc12f72a9a32d1 was deployed.", "mode": "strict", "opts": {"pii": true}, "expected": "Commit f38a671adc5018c8a9b5b32f85fc12f72a9a32d1 was deployed."}, + {"name": "feedback guard: card 10", "input": "Timestamp: 1733140800000", "mode": "strict", "opts": {"pii": true}, "expected": "Timestamp: 1733140800000"}, + {"name": "feedback guard: card 11", "input": "ISBN 978-0-306-40615-7 is on the receipt.", "mode": "strict", "opts": {"pii": true}, "expected": "ISBN 978-0-306-40615-7 is on the receipt."}, + {"name": "feedback guard: card 12", "input": "Checkout showed $1,234,567.89.", "mode": "strict", "opts": {"pii": true}, "expected": "Checkout showed $1,234,567.89."}, + {"name": "feedback positive: order number label does not override a Luhn-valid card", "input": "Order number: 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "Order number: [REDACTED:card]"}, + {"name": "feedback guard: iban 01", "input": "Bank form rejected DE89 3704 0044 0532 0130 01.", "mode": "strict", "opts": {"pii": true}, "expected": "Bank form rejected DE89 3704 0044 0532 0130 01."}, + {"name": "feedback guard: iban 01 (compat without PII)", "input": "Bank form rejected DE89 3704 0044 0532 0130 01.", "expected": "Bank form rejected DE89 3704 0044 0532 0130 01."}, + {"name": "feedback guard: iban 02", "input": "Checkout rejected GB82WEST12345698765431.", "mode": "strict", "opts": {"pii": true}, "expected": "Checkout rejected GB82WEST12345698765431."}, + {"name": "feedback guard: iban 03", "input": "IBAN validation failed for DE00 0000 0000 0000 0000 00.", "mode": "strict", "opts": {"pii": true}, "expected": "IBAN validation failed for DE00 0000 0000 0000 0000 00."}, + {"name": "feedback guard: iban 04", "input": "Country selector shows DE and GB next to France.", "mode": "strict", "opts": {"pii": true}, "expected": "Country selector shows DE and GB next to France."}, + {"name": "feedback guard: iban 05", "input": "The DE office hands over to GB at 17:00.", "mode": "strict", "opts": {"pii": true}, "expected": "The DE office hands over to GB at 17:00."}, + {"name": "feedback guard: iban 06", "input": "IBAN input stops at DE89 3704 0044.", "mode": "strict", "opts": {"pii": true}, "expected": "IBAN input stops at DE89 3704 0044."}, + {"name": "feedback guard: iban 07", "input": "This SKU starts with GB82-WEST and ends in BLUE.", "mode": "strict", "opts": {"pii": true}, "expected": "This SKU starts with GB82-WEST and ends in BLUE."}, + {"name": "feedback guard: iban 08", "input": "Refresh the DE payments dashboard.", "mode": "strict", "opts": {"pii": true}, "expected": "Refresh the DE payments dashboard."}, + {"name": "feedback guard: phone 01", "input": "Date filter covers 2020-2024.", "mode": "strict", "opts": {"pii": true}, "expected": "Date filter covers 2020-2024."}, + {"name": "feedback guard: phone 02", "input": "The German locale printed 02.12.2026.", "mode": "strict", "opts": {"pii": true}, "expected": "The German locale printed 02.12.2026."}, + {"name": "feedback guard: phone 03", "input": "The report date was 2026-12-02.", "mode": "strict", "opts": {"pii": true}, "expected": "The report date was 2026-12-02."}, + {"name": "feedback guard: phone 04", "input": "The playback stopped at 09:44:59.", "mode": "strict", "opts": {"pii": true}, "expected": "The playback stopped at 09:44:59."}, + {"name": "feedback guard: phone 05", "input": "The timing label said 0151 ms.", "mode": "strict", "opts": {"pii": true}, "expected": "The timing label said 0151 ms."}, + {"name": "feedback guard: phone 06", "input": "The progress display stuck at 49.50%.", "mode": "strict", "opts": {"pii": true}, "expected": "The progress display stuck at 49.50%."}, + {"name": "feedback guard: phone 07", "input": "Ports: 3000, 8080, 8443, 9000.", "mode": "strict", "opts": {"pii": true}, "expected": "Ports: 3000, 8080, 8443, 9000."}, + {"name": "feedback guard: phone 08", "input": "HTTP responses were 200, 201, 404, 503.", "mode": "strict", "opts": {"pii": true}, "expected": "HTTP responses were 200, 201, 404, 503."}, + {"name": "feedback guard: phone 09", "input": "Device ID emulator-5554 stopped responding.", "mode": "strict", "opts": {"pii": true}, "expected": "Device ID emulator-5554 stopped responding."}, + {"name": "feedback guard: phone 10", "input": "The debug flag was 0x0151.", "mode": "strict", "opts": {"pii": true}, "expected": "The debug flag was 0x0151."}, + {"name": "feedback guard: phone 11", "input": "ZIP code 94105 did not autocomplete.", "mode": "strict", "opts": {"pii": true}, "expected": "ZIP code 94105 did not autocomplete."}, + {"name": "feedback guard: phone 12", "input": "The padded queue length was 00.", "mode": "strict", "opts": {"pii": true}, "expected": "The padded queue length was 00."}, + {"name": "feedback guard: phone 13", "input": "The memory address was 0x004915123456789a.", "mode": "strict", "opts": {"pii": true}, "expected": "The memory address was 0x004915123456789a."}, + {"name": "feedback guard: phone-like device IDs after explicit labels", "input": "Device IDs: 001234567890; device ID: 002345678901.", "mode": "strict", "opts": {"pii": true}, "expected": "Device IDs: 001234567890; device ID: 002345678901."}, + {"name": "feedback guard: phone 14 (compat without PII)", "input": "Device IDs: 001234567890 and 002345678901.", "expected": "Device IDs: 001234567890 and 002345678901."}, + {"name": "feedback guard: phone 15", "input": "Build: 004915123456789", "mode": "strict", "opts": {"pii": true}, "expected": "Build: 004915123456789"}, + {"name": "feedback guard: phone 16", "input": "The array offset was 00 ff 49 ab.", "mode": "strict", "opts": {"pii": true}, "expected": "The array offset was 00 ff 49 ab."}, + {"name": "feedback guard: phone 17", "input": "The time zone offset was +02:00.", "mode": "strict", "opts": {"pii": true}, "expected": "The time zone offset was +02:00."}, + {"name": "feedback guard: otp 01", "input": "The backend returned error code 404.", "mode": "strict", "opts": {"pii": true}, "expected": "The backend returned error code 404."}, + {"name": "feedback guard: otp 02", "input": "The launcher logged exit code 1.", "mode": "strict", "opts": {"pii": true}, "expected": "The launcher logged exit code 1."}, + {"name": "feedback guard: otp 03", "input": "The response showed status code: 500.", "mode": "strict", "opts": {"pii": true}, "expected": "The response showed status code: 500."}, + {"name": "feedback guard: otp 04", "input": "Open code: main.ts in the editor.", "mode": "strict", "opts": {"pii": true}, "expected": "Open code: main.ts in the editor."}, + {"name": "feedback guard: otp 05", "input": "Please see code review before merging.", "mode": "strict", "opts": {"pii": true}, "expected": "Please see code review before merging."}, + {"name": "feedback guard: otp 06", "input": "The code is clean after formatting.", "mode": "strict", "opts": {"pii": true}, "expected": "The code is clean after formatting."}, + {"name": "feedback guard: otp 07", "input": "Promo code SUMMER20 is shown on the homepage.", "mode": "strict", "opts": {"pii": true}, "expected": "Promo code SUMMER20 is shown on the homepage."}, + {"name": "feedback guard: otp 07 (compat without PII)", "input": "Promo code SUMMER20 is shown on the homepage.", "expected": "Promo code SUMMER20 is shown on the homepage."}, + {"name": "feedback guard: otp ignores an explicitly labeled promo code", "input": "Promo code: SUMMER20 is shown on the homepage.", "mode": "strict", "opts": {"pii": true}, "expected": "Promo code: SUMMER20 is shown on the homepage."}, + {"name": "feedback guard: otp 09", "input": "Use postal code 10115 in the address form.", "mode": "strict", "opts": {"pii": true}, "expected": "Use postal code 10115 in the address form."}, + {"name": "feedback guard: otp 10", "input": "The source code 2024 archive was imported.", "mode": "strict", "opts": {"pii": true}, "expected": "The source code 2024 archive was imported."}, + {"name": "feedback guard: otp 11", "input": "Source code: A17B is the fixture name.", "mode": "strict", "opts": {"pii": true}, "expected": "Source code: A17B is the fixture name."}, + {"name": "feedback guard: otp 12", "input": "Scanner read a Code 128 barcode.", "mode": "strict", "opts": {"pii": true}, "expected": "Scanner read a Code 128 barcode."}, + {"name": "feedback guard: otp 13", "input": "HTTP status code: 429 returned twice.", "mode": "strict", "opts": {"pii": true}, "expected": "HTTP status code: 429 returned twice."}, + {"name": "feedback guard: otp 14", "input": "gRPC status code: 14 (UNAVAILABLE).", "mode": "strict", "opts": {"pii": true}, "expected": "gRPC status code: 14 (UNAVAILABLE)."}, + {"name": "feedback guard: otp 15", "input": "The type error points to line 482913.", "mode": "strict", "opts": {"pii": true}, "expected": "The type error points to line 482913."}, + {"name": "feedback guard: otp 16", "input": "PR #4821 has a screenshot.", "mode": "strict", "opts": {"pii": true}, "expected": "PR #4821 has a screenshot."}, + {"name": "feedback guard: otp 17", "input": "Issue 48291 is already closed.", "mode": "strict", "opts": {"pii": true}, "expected": "Issue 48291 is already closed."}, + {"name": "feedback guard: otp 18", "input": "Reproduced on build 482913.", "mode": "strict", "opts": {"pii": true}, "expected": "Reproduced on build 482913."}, + {"name": "feedback guard: otp 19", "input": "Android version code 42 is missing.", "mode": "strict", "opts": {"pii": true}, "expected": "Android version code 42 is missing."}, + {"name": "feedback guard: otp ignores an Android version code", "input": "Android version code: 482913 is missing.", "mode": "strict", "opts": {"pii": true}, "expected": "Android version code: 482913 is missing."}, + {"name": "feedback guard: otp ignores a device model code", "input": "Device model code: 482913 was copied from the sticker.", "mode": "strict", "opts": {"pii": true}, "expected": "Device model code: 482913 was copied from the sticker."}, + {"name": "feedback guard: ip-zone 01", "input": "The hint showed 50%en instead of a locale name.", "mode": "strict", "opts": {"pii": true}, "expected": "The hint showed 50%en instead of a locale name."}, + {"name": "feedback guard: ip-zone 02", "input": "The label reads 75%off for every locale.", "mode": "strict", "opts": {"pii": true}, "expected": "The label reads 75%off for every locale."}, + {"name": "feedback guard: ip-zone 03", "input": "Open https://example.test/Release%20Notes for details.", "mode": "strict", "opts": {"pii": true}, "expected": "Open https://example.test/Release%20Notes for details."}, + {"name": "feedback guard: ip-zone 04", "input": "The adapter name contains fe80 in the logs.", "mode": "strict", "opts": {"pii": true}, "expected": "The adapter name contains fe80 in the logs."}, + {"name": "feedback guard: ip-zone 05", "input": "The interface en0 is disabled in this profile.", "mode": "strict", "opts": {"pii": true}, "expected": "The interface en0 is disabled in this profile."}, + {"name": "feedback guard: ip-zone 06", "input": "Bind address 0.0.0.0:8080 is printed as expected.", "mode": "strict", "opts": {"pii": true}, "expected": "Bind address 0.0.0.0:8080 is printed as expected."}, + {"name": "feedback guard: ip-zone 07", "input": "The adapter skipped malformed fe80::1%%eth0.", "mode": "strict", "opts": {"pii": true}, "expected": "The adapter skipped malformed fe80::1%%eth0."}, + {"name": "feedback guard: ip-zone 08", "input": "Version 1.2.3.4 is the firmware label.", "mode": "strict", "opts": {"pii": true}, "expected": "Version 1.2.3.4 is the firmware label."} ] } From 2c176b8a4c3bd77c8e487abced02ba098f8879d3 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:36:09 +0100 Subject: [PATCH 23/30] test(redaction): no-redaction guards, part 4 (DRO-4114) --- go/spec/rules.json | 9 ++++++--- spec/vectors/key-names.json | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/go/spec/rules.json b/go/spec/rules.json index 6d9d043..9b35205 100644 --- a/go/spec/rules.json +++ b/go/spec/rules.json @@ -583,7 +583,7 @@ }, {"id": "iban", "kind": "iban", "pattern": "\\b[A-Za-z]{2}[0-9]{2}"}, {"id": "card", "kind": "regex", "pattern": "\\b[1-9](?:[ -]?[0-9]){12,18}\\b", "check": "luhn", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "ignoreAfterLabels": ["invoice number"], "afterGapClass": "[ \t:=#]"}, - {"id": "phone", "kind": "regex", "pattern": "\\b00[1-9](?:[ .-]?[0-9]){7,14}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, + {"id": "phone", "kind": "regex", "pattern": "\\b00[1-9](?:[ .-]?[0-9]){7,14}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterLabels": ["device id", "device ids"], "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, {"id": "phone", "kind": "regex", "pattern": "\\b(?:0(?:30|40|69|89)|0(?:2[0-9]|3[3-9]|4[1-9]|5[0-9]|6[0-8]|7[0-9]|8[0-8]|9[0-9])[0-9]{1,2})[ -][1-9][0-9]{5,8}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, {"id": "phone", "kind": "regex", "pattern": "\\b(?:015[0-9]|01[67][0-9])[ -][0-9]{7,8}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, { @@ -726,13 +726,16 @@ "area", "country", "invoice", - "order" + "order", + "promo", + "version", + "model" ], "afterGapClass": "[{{WS}}]" }, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_YOUR}} {{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b(?:{{OTP_YOUR}} )?{{OTP_BRAND}} {{OTP_BARE}}{{OTP_JOIN_PLUS}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, - {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}([A-Z0-9]{4,8})\\b", "group": 1, "requireClass": "[A-Z]", "numericEdges": "code", "ignoreAfterWords": ["error", "exit", "status", "response", "postal", "zip", "area", "country", "order", "invoice", "see", "source", "product"], "ignoreAfterLabels": ["http error"], "afterGapClass": "[{{WS}}]", "check": "otp-alphanumeric"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}([A-Z0-9]{4,8})\\b", "group": 1, "requireClass": "[A-Z]", "numericEdges": "code", "ignoreAfterWords": ["error", "exit", "status", "response", "postal", "zip", "area", "country", "order", "invoice", "promo", "version", "model", "see", "source", "product"], "ignoreAfterLabels": ["http error"], "afterGapClass": "[{{WS}}]", "check": "otp-alphanumeric"}, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_SPANISH}}{{OTP_SPANISH_JOIN}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}|\\b{{OTP_SPANISH}}){{OTP_JOIN_PLUS}}{{OTP_OLD_MARKER}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b((?:[gG]-)?{{OTP_CODE_DIGITS}}) (?:{{OTP_SUFFIX_EN}} (?:(?:{{OTP_BRAND}} )?{{OTP_NOUN}}|{{OTP_BRAND}} {{OTP_BARE}})|{{OTP_SUFFIX_DE}} {{OTP_NOUN}}|{{OTP_SUFFIX_FR}} {{OTP_NOUN}}|{{OTP_SUFFIX_ES}} {{OTP_SPANISH}})\\b", "group": 1, "numericEdges": "code", "ignoreBeforeClass": "[-.]"}, diff --git a/spec/vectors/key-names.json b/spec/vectors/key-names.json index 1a1d011..491919e 100644 --- a/spec/vectors/key-names.json +++ b/spec/vectors/key-names.json @@ -473,6 +473,9 @@ {"name": "gap review: Kelvin-sign key in raw JSON", "input": "{\"\u212aennwort\":\"abc\"}", "mode": "strict", "expected": "{\"\u212aennwort\":\"[REDACTED:generic-keyword]\"}"}, {"name": "gap review: Kelvin-sign key in parsed JSON", "input": {"\u212aennwort": "abc"}, "mode": "strict", "expected": {"\u212aennwort": "[REDACTED:key-context]"}}, {"name": "gap review: parsed diagnostic seed values", "input": {"seed": 42, "Seed": "ordinary value", "status": "keep"}, "expected": {"seed": 42, "Seed": "ordinary value", "status": "keep"}}, - {"name": "gap review: parsed recovery seed and phrases", "input": {"seed": "abandon ability able about …", "recovery phrase": "unlisted content", "seed phrase": "unlisted content"}, "expected": {"seed": "[REDACTED:key-context]", "recovery phrase": "[REDACTED:key-context]", "seed phrase": "[REDACTED:key-context]"}} + {"name": "gap review: parsed recovery seed and phrases", "input": {"seed": "abandon ability able about …", "recovery phrase": "unlisted content", "seed phrase": "unlisted content"}, "expected": {"seed": "[REDACTED:key-context]", "recovery phrase": "[REDACTED:key-context]", "seed phrase": "[REDACTED:key-context]"}}, + {"name": "feedback guard: json-seed 01", "input": {"seed": 42}, "mode": "strict", "opts": {"pii": true}, "expected": {"seed": 42}}, + {"name": "feedback guard: json-seed 01 (compat without PII)", "input": {"seed": 42}, "expected": {"seed": 42}}, + {"name": "feedback guard: json-seed 02", "input": {"seed": "ordinary fixture text", "status": "loaded"}, "mode": "strict", "opts": {"pii": true}, "expected": {"seed": "ordinary fixture text", "status": "loaded"}} ] } From b3ed4b27d2624d27ea90462e8e0be3e08128b783 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:36:12 +0100 Subject: [PATCH 24/30] test(redaction): no-redaction guards, part 5 (DRO-4114) --- go/spec/vectors/keywords.json | 29 +++++++++++++- go/spec/vectors/pii.json | 73 ++++++++++++++++++++++++++++++++++- 2 files changed, 100 insertions(+), 2 deletions(-) diff --git a/go/spec/vectors/keywords.json b/go/spec/vectors/keywords.json index 6d1a721..9b919dd 100644 --- a/go/spec/vectors/keywords.json +++ b/go/spec/vectors/keywords.json @@ -480,6 +480,33 @@ {"name": "round two: mnemonic query value stops before another parameter", "input": "https://example.test/?mnemonic=alpha&keep=1", "expected": "https://example.test/?mnemonic=[REDACTED:key-context]&keep=1"}, {"name": "round two: mnemonic query value stops before the fragment", "input": "https://example.test/?keep=1&mnemonic=alpha#section", "expected": "https://example.test/?keep=1&mnemonic=[REDACTED:key-context]#section"}, {"name": "round three: seed skips a full-tier token on the first pass", "input": "seed: npm_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expectedSync": "seed: npm_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expectedAsync": "seed: [REDACTED:npm]"}, - {"name": "round three: seed skips a standard-tier token on the first pass", "input": "seed: dr_sk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expected": "seed: [REDACTED:platform-key]"} + {"name": "round three: seed skips a standard-tier token on the first pass", "input": "seed: dr_sk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expected": "seed: [REDACTED:platform-key]"}, + {"name": "feedback guard: password 01", "input": "The help text says Passwort without an example.", "mode": "strict", "opts": {"pii": true}, "expected": "The help text says Passwort without an example."}, + {"name": "feedback guard: password 01 (compat without PII)", "input": "The help text says Passwort without an example.", "expected": "The help text says Passwort without an example."}, + {"name": "feedback guard: password 02", "input": "Password reset link sent.", "mode": "strict", "opts": {"pii": true}, "expected": "Password reset link sent."}, + {"name": "feedback guard: password 03", "input": "The password field is empty.", "mode": "strict", "opts": {"pii": true}, "expected": "The password field is empty."}, + {"name": "feedback guard: password 03 (compat without PII)", "input": "The password field is empty.", "expected": "The password field is empty."}, + {"name": "feedback guard: password 04", "input": "Forgot password?", "mode": "strict", "opts": {"pii": true}, "expected": "Forgot password?"}, + {"name": "feedback guard: password 05", "input": "## Passwort und Anmeldung", "mode": "strict", "opts": {"pii": true}, "expected": "## Passwort und Anmeldung"}, + {"name": "feedback guard: password 06", "input": "The button says Kennwort ändern.", "mode": "strict", "opts": {"pii": true}, "expected": "The button says Kennwort ändern."}, + {"name": "feedback guard: password 07", "input": "Choose Mot de passe in the settings menu.", "mode": "strict", "opts": {"pii": true}, "expected": "Choose Mot de passe in the settings menu."}, + {"name": "feedback guard: password 08", "input": "La contraseña se cambia desde el perfil.", "mode": "strict", "opts": {"pii": true}, "expected": "La contraseña se cambia desde el perfil."}, + {"name": "feedback guard: password 09", "input": "The installer says пароль не задан.", "mode": "strict", "opts": {"pii": true}, "expected": "The installer says пароль не задан."}, + {"name": "feedback guard: password 10", "input": "The Password section still has a broken link.", "mode": "strict", "opts": {"pii": true}, "expected": "The Password section still has a broken link."}, + {"name": "feedback guard: mnemonic 01", "input": "seed=1234", "mode": "strict", "opts": {"pii": true}, "expected": "seed=1234"}, + {"name": "feedback guard: mnemonic 01 (compat without PII)", "input": "seed=1234", "expected": "seed=1234"}, + {"name": "feedback guard: mnemonic 02", "input": "The random seed 42 reproduced the layout.", "mode": "strict", "opts": {"pii": true}, "expected": "The random seed 42 reproduced the layout."}, + {"name": "feedback guard: mnemonic 03", "input": "seed: 0xdeadbeef", "mode": "strict", "opts": {"pii": true}, "expected": "seed: 0xdeadbeef"}, + {"name": "feedback guard: mnemonic 04", "input": "The migration seeded the database.", "mode": "strict", "opts": {"pii": true}, "expected": "The migration seeded the database."}, + {"name": "feedback guard: mnemonic 05", "input": "The console confirms seed data loaded.", "mode": "strict", "opts": {"pii": true}, "expected": "The console confirms seed data loaded."}, + {"name": "feedback guard: mnemonic 06", "input": "this is a simple test of the system and it should work fine today", "mode": "strict", "opts": {"pii": true}, "expected": "this is a simple test of the system and it should work fine today"}, + {"name": "feedback guard: mnemonic 06 (compat without PII)", "input": "this is a simple test of the system and it should work fine today", "expected": "this is a simple test of the system and it should work fine today"}, + {"name": "feedback guard: mnemonic 07", "input": "I tried the new settings screen and the save button was still disabled after I changed the theme and then reopened the app again", "mode": "strict", "opts": {"pii": true}, "expected": "I tried the new settings screen and the save button was still disabled after I changed the theme and then reopened the app again"}, + {"name": "feedback guard: mnemonic 08", "input": "The source identifier was abandon_ability_able_about.", "mode": "strict", "opts": {"pii": true}, "expected": "The source identifier was abandon_ability_able_about."}, + {"name": "feedback guard: mnemonic 09", "input": "The docs explain what a mnemonic is.", "mode": "strict", "opts": {"pii": true}, "expected": "The docs explain what a mnemonic is."}, + {"name": "feedback guard: mnemonic 10", "input": "The heading reads Mnemonic and recovery options.", "mode": "strict", "opts": {"pii": true}, "expected": "The heading reads Mnemonic and recovery options."}, + {"name": "feedback guard: mnemonic 11", "input": "The debugger displayed seed=ordinary.", "mode": "strict", "opts": {"pii": true}, "expected": "The debugger displayed seed=ordinary."}, + {"name": "feedback guard: mnemonic 12", "input": "seed: abandon ability unexpected", "mode": "strict", "opts": {"pii": true}, "expected": "seed: abandon ability unexpected"}, + {"name": "feedback guard: mnemonic 13", "input": "The build kept `mnemonic_parser` unchanged.", "mode": "strict", "opts": {"pii": true}, "expected": "The build kept `mnemonic_parser` unchanged."} ] } diff --git a/go/spec/vectors/pii.json b/go/spec/vectors/pii.json index 66343be..cbfd25c 100644 --- a/go/spec/vectors/pii.json +++ b/go/spec/vectors/pii.json @@ -824,6 +824,77 @@ {"name": "gap review: HTTP error label excludes an alphanumeric OTP", "input": "HTTP error: Code: E1024", "opts": {"pii": true}, "expected": "HTTP error: Code: E1024"}, {"name": "round two: overlapping valid IBAN envelopes cover the entire span", "input": "ES43 DE89 3704 0044 0532 0130 00", "opts": {"pii": true}, "expected": "[REDACTED:iban]"}, {"name": "round two: HTTP error invoice and order labels exclude numeric OTPs", "input": "HTTP error: Code: 482913; Invoice code: 482913; Order code: 482913", "opts": {"pii": true}, "expected": "HTTP error: Code: 482913; Invoice code: 482913; Order code: 482913"}, - {"name": "round two: addressed and branded numeric OTPs still mask", "input": "Your code: 482913; Telegram code: 48291", "opts": {"pii": true}, "expected": "Your code: [REDACTED:otp]; Telegram code: [REDACTED:otp]"} + {"name": "round two: addressed and branded numeric OTPs still mask", "input": "Your code: 482913; Telegram code: 48291", "opts": {"pii": true}, "expected": "Your code: [REDACTED:otp]; Telegram code: [REDACTED:otp]"}, + {"name": "feedback guard: card 01", "input": "Saved payment test returned 4111111111111112.", "mode": "strict", "opts": {"pii": true}, "expected": "Saved payment test returned 4111111111111112."}, + {"name": "feedback guard: card 01 (compat without PII)", "input": "Saved payment test returned 4111111111111112.", "expected": "Saved payment test returned 4111111111111112."}, + {"name": "feedback guard: card 02", "input": "Order: 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "Order: 4111111111111111"}, + {"name": "feedback guard: card 03", "input": "Invoice number: 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "Invoice number: 4111111111111111"}, + {"name": "feedback guard: card 04", "input": "Tracking ID: TRK-9400111899223856928499", "mode": "strict", "opts": {"pii": true}, "expected": "Tracking ID: TRK-9400111899223856928499"}, + {"name": "feedback guard: card 05", "input": "Ticket references INC-20261202-175402.", "mode": "strict", "opts": {"pii": true}, "expected": "Ticket references INC-20261202-175402."}, + {"name": "feedback guard: card 06", "input": "Build: 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "Build: 4111111111111111"}, + {"name": "feedback guard: card 07", "input": "Device UUID was 550e8400-e29b-41d4-a716-446655440000.", "mode": "strict", "opts": {"pii": true}, "expected": "Device UUID was 550e8400-e29b-41d4-a716-446655440000."}, + {"name": "feedback guard: card 08", "input": "Checksum SHA-256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.", "mode": "strict", "opts": {"pii": true}, "expected": "Checksum SHA-256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855."}, + {"name": "feedback guard: card 09", "input": "Commit f38a671adc5018c8a9b5b32f85fc12f72a9a32d1 was deployed.", "mode": "strict", "opts": {"pii": true}, "expected": "Commit f38a671adc5018c8a9b5b32f85fc12f72a9a32d1 was deployed."}, + {"name": "feedback guard: card 10", "input": "Timestamp: 1733140800000", "mode": "strict", "opts": {"pii": true}, "expected": "Timestamp: 1733140800000"}, + {"name": "feedback guard: card 11", "input": "ISBN 978-0-306-40615-7 is on the receipt.", "mode": "strict", "opts": {"pii": true}, "expected": "ISBN 978-0-306-40615-7 is on the receipt."}, + {"name": "feedback guard: card 12", "input": "Checkout showed $1,234,567.89.", "mode": "strict", "opts": {"pii": true}, "expected": "Checkout showed $1,234,567.89."}, + {"name": "feedback positive: order number label does not override a Luhn-valid card", "input": "Order number: 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "Order number: [REDACTED:card]"}, + {"name": "feedback guard: iban 01", "input": "Bank form rejected DE89 3704 0044 0532 0130 01.", "mode": "strict", "opts": {"pii": true}, "expected": "Bank form rejected DE89 3704 0044 0532 0130 01."}, + {"name": "feedback guard: iban 01 (compat without PII)", "input": "Bank form rejected DE89 3704 0044 0532 0130 01.", "expected": "Bank form rejected DE89 3704 0044 0532 0130 01."}, + {"name": "feedback guard: iban 02", "input": "Checkout rejected GB82WEST12345698765431.", "mode": "strict", "opts": {"pii": true}, "expected": "Checkout rejected GB82WEST12345698765431."}, + {"name": "feedback guard: iban 03", "input": "IBAN validation failed for DE00 0000 0000 0000 0000 00.", "mode": "strict", "opts": {"pii": true}, "expected": "IBAN validation failed for DE00 0000 0000 0000 0000 00."}, + {"name": "feedback guard: iban 04", "input": "Country selector shows DE and GB next to France.", "mode": "strict", "opts": {"pii": true}, "expected": "Country selector shows DE and GB next to France."}, + {"name": "feedback guard: iban 05", "input": "The DE office hands over to GB at 17:00.", "mode": "strict", "opts": {"pii": true}, "expected": "The DE office hands over to GB at 17:00."}, + {"name": "feedback guard: iban 06", "input": "IBAN input stops at DE89 3704 0044.", "mode": "strict", "opts": {"pii": true}, "expected": "IBAN input stops at DE89 3704 0044."}, + {"name": "feedback guard: iban 07", "input": "This SKU starts with GB82-WEST and ends in BLUE.", "mode": "strict", "opts": {"pii": true}, "expected": "This SKU starts with GB82-WEST and ends in BLUE."}, + {"name": "feedback guard: iban 08", "input": "Refresh the DE payments dashboard.", "mode": "strict", "opts": {"pii": true}, "expected": "Refresh the DE payments dashboard."}, + {"name": "feedback guard: phone 01", "input": "Date filter covers 2020-2024.", "mode": "strict", "opts": {"pii": true}, "expected": "Date filter covers 2020-2024."}, + {"name": "feedback guard: phone 02", "input": "The German locale printed 02.12.2026.", "mode": "strict", "opts": {"pii": true}, "expected": "The German locale printed 02.12.2026."}, + {"name": "feedback guard: phone 03", "input": "The report date was 2026-12-02.", "mode": "strict", "opts": {"pii": true}, "expected": "The report date was 2026-12-02."}, + {"name": "feedback guard: phone 04", "input": "The playback stopped at 09:44:59.", "mode": "strict", "opts": {"pii": true}, "expected": "The playback stopped at 09:44:59."}, + {"name": "feedback guard: phone 05", "input": "The timing label said 0151 ms.", "mode": "strict", "opts": {"pii": true}, "expected": "The timing label said 0151 ms."}, + {"name": "feedback guard: phone 06", "input": "The progress display stuck at 49.50%.", "mode": "strict", "opts": {"pii": true}, "expected": "The progress display stuck at 49.50%."}, + {"name": "feedback guard: phone 07", "input": "Ports: 3000, 8080, 8443, 9000.", "mode": "strict", "opts": {"pii": true}, "expected": "Ports: 3000, 8080, 8443, 9000."}, + {"name": "feedback guard: phone 08", "input": "HTTP responses were 200, 201, 404, 503.", "mode": "strict", "opts": {"pii": true}, "expected": "HTTP responses were 200, 201, 404, 503."}, + {"name": "feedback guard: phone 09", "input": "Device ID emulator-5554 stopped responding.", "mode": "strict", "opts": {"pii": true}, "expected": "Device ID emulator-5554 stopped responding."}, + {"name": "feedback guard: phone 10", "input": "The debug flag was 0x0151.", "mode": "strict", "opts": {"pii": true}, "expected": "The debug flag was 0x0151."}, + {"name": "feedback guard: phone 11", "input": "ZIP code 94105 did not autocomplete.", "mode": "strict", "opts": {"pii": true}, "expected": "ZIP code 94105 did not autocomplete."}, + {"name": "feedback guard: phone 12", "input": "The padded queue length was 00.", "mode": "strict", "opts": {"pii": true}, "expected": "The padded queue length was 00."}, + {"name": "feedback guard: phone 13", "input": "The memory address was 0x004915123456789a.", "mode": "strict", "opts": {"pii": true}, "expected": "The memory address was 0x004915123456789a."}, + {"name": "feedback guard: phone-like device IDs after explicit labels", "input": "Device IDs: 001234567890; device ID: 002345678901.", "mode": "strict", "opts": {"pii": true}, "expected": "Device IDs: 001234567890; device ID: 002345678901."}, + {"name": "feedback guard: phone 14 (compat without PII)", "input": "Device IDs: 001234567890 and 002345678901.", "expected": "Device IDs: 001234567890 and 002345678901."}, + {"name": "feedback guard: phone 15", "input": "Build: 004915123456789", "mode": "strict", "opts": {"pii": true}, "expected": "Build: 004915123456789"}, + {"name": "feedback guard: phone 16", "input": "The array offset was 00 ff 49 ab.", "mode": "strict", "opts": {"pii": true}, "expected": "The array offset was 00 ff 49 ab."}, + {"name": "feedback guard: phone 17", "input": "The time zone offset was +02:00.", "mode": "strict", "opts": {"pii": true}, "expected": "The time zone offset was +02:00."}, + {"name": "feedback guard: otp 01", "input": "The backend returned error code 404.", "mode": "strict", "opts": {"pii": true}, "expected": "The backend returned error code 404."}, + {"name": "feedback guard: otp 02", "input": "The launcher logged exit code 1.", "mode": "strict", "opts": {"pii": true}, "expected": "The launcher logged exit code 1."}, + {"name": "feedback guard: otp 03", "input": "The response showed status code: 500.", "mode": "strict", "opts": {"pii": true}, "expected": "The response showed status code: 500."}, + {"name": "feedback guard: otp 04", "input": "Open code: main.ts in the editor.", "mode": "strict", "opts": {"pii": true}, "expected": "Open code: main.ts in the editor."}, + {"name": "feedback guard: otp 05", "input": "Please see code review before merging.", "mode": "strict", "opts": {"pii": true}, "expected": "Please see code review before merging."}, + {"name": "feedback guard: otp 06", "input": "The code is clean after formatting.", "mode": "strict", "opts": {"pii": true}, "expected": "The code is clean after formatting."}, + {"name": "feedback guard: otp 07", "input": "Promo code SUMMER20 is shown on the homepage.", "mode": "strict", "opts": {"pii": true}, "expected": "Promo code SUMMER20 is shown on the homepage."}, + {"name": "feedback guard: otp 07 (compat without PII)", "input": "Promo code SUMMER20 is shown on the homepage.", "expected": "Promo code SUMMER20 is shown on the homepage."}, + {"name": "feedback guard: otp ignores an explicitly labeled promo code", "input": "Promo code: SUMMER20 is shown on the homepage.", "mode": "strict", "opts": {"pii": true}, "expected": "Promo code: SUMMER20 is shown on the homepage."}, + {"name": "feedback guard: otp 09", "input": "Use postal code 10115 in the address form.", "mode": "strict", "opts": {"pii": true}, "expected": "Use postal code 10115 in the address form."}, + {"name": "feedback guard: otp 10", "input": "The source code 2024 archive was imported.", "mode": "strict", "opts": {"pii": true}, "expected": "The source code 2024 archive was imported."}, + {"name": "feedback guard: otp 11", "input": "Source code: A17B is the fixture name.", "mode": "strict", "opts": {"pii": true}, "expected": "Source code: A17B is the fixture name."}, + {"name": "feedback guard: otp 12", "input": "Scanner read a Code 128 barcode.", "mode": "strict", "opts": {"pii": true}, "expected": "Scanner read a Code 128 barcode."}, + {"name": "feedback guard: otp 13", "input": "HTTP status code: 429 returned twice.", "mode": "strict", "opts": {"pii": true}, "expected": "HTTP status code: 429 returned twice."}, + {"name": "feedback guard: otp 14", "input": "gRPC status code: 14 (UNAVAILABLE).", "mode": "strict", "opts": {"pii": true}, "expected": "gRPC status code: 14 (UNAVAILABLE)."}, + {"name": "feedback guard: otp 15", "input": "The type error points to line 482913.", "mode": "strict", "opts": {"pii": true}, "expected": "The type error points to line 482913."}, + {"name": "feedback guard: otp 16", "input": "PR #4821 has a screenshot.", "mode": "strict", "opts": {"pii": true}, "expected": "PR #4821 has a screenshot."}, + {"name": "feedback guard: otp 17", "input": "Issue 48291 is already closed.", "mode": "strict", "opts": {"pii": true}, "expected": "Issue 48291 is already closed."}, + {"name": "feedback guard: otp 18", "input": "Reproduced on build 482913.", "mode": "strict", "opts": {"pii": true}, "expected": "Reproduced on build 482913."}, + {"name": "feedback guard: otp 19", "input": "Android version code 42 is missing.", "mode": "strict", "opts": {"pii": true}, "expected": "Android version code 42 is missing."}, + {"name": "feedback guard: otp ignores an Android version code", "input": "Android version code: 482913 is missing.", "mode": "strict", "opts": {"pii": true}, "expected": "Android version code: 482913 is missing."}, + {"name": "feedback guard: otp ignores a device model code", "input": "Device model code: 482913 was copied from the sticker.", "mode": "strict", "opts": {"pii": true}, "expected": "Device model code: 482913 was copied from the sticker."}, + {"name": "feedback guard: ip-zone 01", "input": "The hint showed 50%en instead of a locale name.", "mode": "strict", "opts": {"pii": true}, "expected": "The hint showed 50%en instead of a locale name."}, + {"name": "feedback guard: ip-zone 02", "input": "The label reads 75%off for every locale.", "mode": "strict", "opts": {"pii": true}, "expected": "The label reads 75%off for every locale."}, + {"name": "feedback guard: ip-zone 03", "input": "Open https://example.test/Release%20Notes for details.", "mode": "strict", "opts": {"pii": true}, "expected": "Open https://example.test/Release%20Notes for details."}, + {"name": "feedback guard: ip-zone 04", "input": "The adapter name contains fe80 in the logs.", "mode": "strict", "opts": {"pii": true}, "expected": "The adapter name contains fe80 in the logs."}, + {"name": "feedback guard: ip-zone 05", "input": "The interface en0 is disabled in this profile.", "mode": "strict", "opts": {"pii": true}, "expected": "The interface en0 is disabled in this profile."}, + {"name": "feedback guard: ip-zone 06", "input": "Bind address 0.0.0.0:8080 is printed as expected.", "mode": "strict", "opts": {"pii": true}, "expected": "Bind address 0.0.0.0:8080 is printed as expected."}, + {"name": "feedback guard: ip-zone 07", "input": "The adapter skipped malformed fe80::1%%eth0.", "mode": "strict", "opts": {"pii": true}, "expected": "The adapter skipped malformed fe80::1%%eth0."}, + {"name": "feedback guard: ip-zone 08", "input": "Version 1.2.3.4 is the firmware label.", "mode": "strict", "opts": {"pii": true}, "expected": "Version 1.2.3.4 is the firmware label."} ] } From b0fba6c32f77911973d5c043574cb0d802c9244c Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:36:16 +0100 Subject: [PATCH 25/30] test(redaction): no-redaction guards, part 6 (DRO-4114) --- go/spec/vectors/key-names.json | 5 ++++- go/spec_hash_gen.go | 2 +- python/src/droidrun_redaction/spec/rules.json | 9 ++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/go/spec/vectors/key-names.json b/go/spec/vectors/key-names.json index 1a1d011..491919e 100644 --- a/go/spec/vectors/key-names.json +++ b/go/spec/vectors/key-names.json @@ -473,6 +473,9 @@ {"name": "gap review: Kelvin-sign key in raw JSON", "input": "{\"\u212aennwort\":\"abc\"}", "mode": "strict", "expected": "{\"\u212aennwort\":\"[REDACTED:generic-keyword]\"}"}, {"name": "gap review: Kelvin-sign key in parsed JSON", "input": {"\u212aennwort": "abc"}, "mode": "strict", "expected": {"\u212aennwort": "[REDACTED:key-context]"}}, {"name": "gap review: parsed diagnostic seed values", "input": {"seed": 42, "Seed": "ordinary value", "status": "keep"}, "expected": {"seed": 42, "Seed": "ordinary value", "status": "keep"}}, - {"name": "gap review: parsed recovery seed and phrases", "input": {"seed": "abandon ability able about …", "recovery phrase": "unlisted content", "seed phrase": "unlisted content"}, "expected": {"seed": "[REDACTED:key-context]", "recovery phrase": "[REDACTED:key-context]", "seed phrase": "[REDACTED:key-context]"}} + {"name": "gap review: parsed recovery seed and phrases", "input": {"seed": "abandon ability able about …", "recovery phrase": "unlisted content", "seed phrase": "unlisted content"}, "expected": {"seed": "[REDACTED:key-context]", "recovery phrase": "[REDACTED:key-context]", "seed phrase": "[REDACTED:key-context]"}}, + {"name": "feedback guard: json-seed 01", "input": {"seed": 42}, "mode": "strict", "opts": {"pii": true}, "expected": {"seed": 42}}, + {"name": "feedback guard: json-seed 01 (compat without PII)", "input": {"seed": 42}, "expected": {"seed": 42}}, + {"name": "feedback guard: json-seed 02", "input": {"seed": "ordinary fixture text", "status": "loaded"}, "mode": "strict", "opts": {"pii": true}, "expected": {"seed": "ordinary fixture text", "status": "loaded"}} ] } diff --git a/go/spec_hash_gen.go b/go/spec_hash_gen.go index 194b9b9..d59a704 100644 --- a/go/spec_hash_gen.go +++ b/go/spec_hash_gen.go @@ -2,4 +2,4 @@ package redaction -const specHash = "91bc1cc4d6ea2af92a56aa7fab8c48eefac29847ad536bb715f22d3e7efea011" +const specHash = "3d315023ecf5e793199f00220a1159cfa296555de1a89566eecd4e0f2a971cce" diff --git a/python/src/droidrun_redaction/spec/rules.json b/python/src/droidrun_redaction/spec/rules.json index 6d9d043..9b35205 100644 --- a/python/src/droidrun_redaction/spec/rules.json +++ b/python/src/droidrun_redaction/spec/rules.json @@ -583,7 +583,7 @@ }, {"id": "iban", "kind": "iban", "pattern": "\\b[A-Za-z]{2}[0-9]{2}"}, {"id": "card", "kind": "regex", "pattern": "\\b[1-9](?:[ -]?[0-9]){12,18}\\b", "check": "luhn", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "ignoreAfterLabels": ["invoice number"], "afterGapClass": "[ \t:=#]"}, - {"id": "phone", "kind": "regex", "pattern": "\\b00[1-9](?:[ .-]?[0-9]){7,14}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, + {"id": "phone", "kind": "regex", "pattern": "\\b00[1-9](?:[ .-]?[0-9]){7,14}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterLabels": ["device id", "device ids"], "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, {"id": "phone", "kind": "regex", "pattern": "\\b(?:0(?:30|40|69|89)|0(?:2[0-9]|3[3-9]|4[1-9]|5[0-9]|6[0-8]|7[0-9]|8[0-8]|9[0-9])[0-9]{1,2})[ -][1-9][0-9]{5,8}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, {"id": "phone", "kind": "regex", "pattern": "\\b(?:015[0-9]|01[67][0-9])[ -][0-9]{7,8}\\b{{PHONE_EXT}}", "numericEdges": "run", "ignoreAfterWords": ["order", "invoice", "version", "build", "timestamp", "port"], "afterGapClass": "[ \t:=#]"}, { @@ -726,13 +726,16 @@ "area", "country", "invoice", - "order" + "order", + "promo", + "version", + "model" ], "afterGapClass": "[{{WS}}]" }, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_YOUR}} {{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b(?:{{OTP_YOUR}} )?{{OTP_BRAND}} {{OTP_BARE}}{{OTP_JOIN_PLUS}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, - {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}([A-Z0-9]{4,8})\\b", "group": 1, "requireClass": "[A-Z]", "numericEdges": "code", "ignoreAfterWords": ["error", "exit", "status", "response", "postal", "zip", "area", "country", "order", "invoice", "see", "source", "product"], "ignoreAfterLabels": ["http error"], "afterGapClass": "[{{WS}}]", "check": "otp-alphanumeric"}, + {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_BARE}}[ \t]{0,3}:[ \t]{0,3}([A-Z0-9]{4,8})\\b", "group": 1, "requireClass": "[A-Z]", "numericEdges": "code", "ignoreAfterWords": ["error", "exit", "status", "response", "postal", "zip", "area", "country", "order", "invoice", "promo", "version", "model", "see", "source", "product"], "ignoreAfterLabels": ["http error"], "afterGapClass": "[{{WS}}]", "check": "otp-alphanumeric"}, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b{{OTP_SPANISH}}{{OTP_SPANISH_JOIN}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "(?:\\b{{OTP_NOUN}}|{{OTP_NOUN_CJK}}|\\b{{OTP_SPANISH}}){{OTP_JOIN_PLUS}}{{OTP_OLD_MARKER}}({{OTP_CODE_DIGITS}})\\b", "group": 1, "numericEdges": "code"}, {"id": "otp", "kind": "regex", "ignoreDate": true, "pattern": "\\b((?:[gG]-)?{{OTP_CODE_DIGITS}}) (?:{{OTP_SUFFIX_EN}} (?:(?:{{OTP_BRAND}} )?{{OTP_NOUN}}|{{OTP_BRAND}} {{OTP_BARE}})|{{OTP_SUFFIX_DE}} {{OTP_NOUN}}|{{OTP_SUFFIX_FR}} {{OTP_NOUN}}|{{OTP_SUFFIX_ES}} {{OTP_SPANISH}})\\b", "group": 1, "numericEdges": "code", "ignoreBeforeClass": "[-.]"}, From 7261fed23635734ed5944e1e533ad1ae5f015f46 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:36:20 +0100 Subject: [PATCH 26/30] test(redaction): no-redaction guards, part 7 (DRO-4114) --- .../spec/vectors/keywords.json | 29 +++++++- .../droidrun_redaction/spec/vectors/pii.json | 73 ++++++++++++++++++- 2 files changed, 100 insertions(+), 2 deletions(-) diff --git a/python/src/droidrun_redaction/spec/vectors/keywords.json b/python/src/droidrun_redaction/spec/vectors/keywords.json index 6d1a721..9b919dd 100644 --- a/python/src/droidrun_redaction/spec/vectors/keywords.json +++ b/python/src/droidrun_redaction/spec/vectors/keywords.json @@ -480,6 +480,33 @@ {"name": "round two: mnemonic query value stops before another parameter", "input": "https://example.test/?mnemonic=alpha&keep=1", "expected": "https://example.test/?mnemonic=[REDACTED:key-context]&keep=1"}, {"name": "round two: mnemonic query value stops before the fragment", "input": "https://example.test/?keep=1&mnemonic=alpha#section", "expected": "https://example.test/?keep=1&mnemonic=[REDACTED:key-context]#section"}, {"name": "round three: seed skips a full-tier token on the first pass", "input": "seed: npm_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expectedSync": "seed: npm_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expectedAsync": "seed: [REDACTED:npm]"}, - {"name": "round three: seed skips a standard-tier token on the first pass", "input": "seed: dr_sk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expected": "seed: [REDACTED:platform-key]"} + {"name": "round three: seed skips a standard-tier token on the first pass", "input": "seed: dr_sk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abandon ability able", "expected": "seed: [REDACTED:platform-key]"}, + {"name": "feedback guard: password 01", "input": "The help text says Passwort without an example.", "mode": "strict", "opts": {"pii": true}, "expected": "The help text says Passwort without an example."}, + {"name": "feedback guard: password 01 (compat without PII)", "input": "The help text says Passwort without an example.", "expected": "The help text says Passwort without an example."}, + {"name": "feedback guard: password 02", "input": "Password reset link sent.", "mode": "strict", "opts": {"pii": true}, "expected": "Password reset link sent."}, + {"name": "feedback guard: password 03", "input": "The password field is empty.", "mode": "strict", "opts": {"pii": true}, "expected": "The password field is empty."}, + {"name": "feedback guard: password 03 (compat without PII)", "input": "The password field is empty.", "expected": "The password field is empty."}, + {"name": "feedback guard: password 04", "input": "Forgot password?", "mode": "strict", "opts": {"pii": true}, "expected": "Forgot password?"}, + {"name": "feedback guard: password 05", "input": "## Passwort und Anmeldung", "mode": "strict", "opts": {"pii": true}, "expected": "## Passwort und Anmeldung"}, + {"name": "feedback guard: password 06", "input": "The button says Kennwort ändern.", "mode": "strict", "opts": {"pii": true}, "expected": "The button says Kennwort ändern."}, + {"name": "feedback guard: password 07", "input": "Choose Mot de passe in the settings menu.", "mode": "strict", "opts": {"pii": true}, "expected": "Choose Mot de passe in the settings menu."}, + {"name": "feedback guard: password 08", "input": "La contraseña se cambia desde el perfil.", "mode": "strict", "opts": {"pii": true}, "expected": "La contraseña se cambia desde el perfil."}, + {"name": "feedback guard: password 09", "input": "The installer says пароль не задан.", "mode": "strict", "opts": {"pii": true}, "expected": "The installer says пароль не задан."}, + {"name": "feedback guard: password 10", "input": "The Password section still has a broken link.", "mode": "strict", "opts": {"pii": true}, "expected": "The Password section still has a broken link."}, + {"name": "feedback guard: mnemonic 01", "input": "seed=1234", "mode": "strict", "opts": {"pii": true}, "expected": "seed=1234"}, + {"name": "feedback guard: mnemonic 01 (compat without PII)", "input": "seed=1234", "expected": "seed=1234"}, + {"name": "feedback guard: mnemonic 02", "input": "The random seed 42 reproduced the layout.", "mode": "strict", "opts": {"pii": true}, "expected": "The random seed 42 reproduced the layout."}, + {"name": "feedback guard: mnemonic 03", "input": "seed: 0xdeadbeef", "mode": "strict", "opts": {"pii": true}, "expected": "seed: 0xdeadbeef"}, + {"name": "feedback guard: mnemonic 04", "input": "The migration seeded the database.", "mode": "strict", "opts": {"pii": true}, "expected": "The migration seeded the database."}, + {"name": "feedback guard: mnemonic 05", "input": "The console confirms seed data loaded.", "mode": "strict", "opts": {"pii": true}, "expected": "The console confirms seed data loaded."}, + {"name": "feedback guard: mnemonic 06", "input": "this is a simple test of the system and it should work fine today", "mode": "strict", "opts": {"pii": true}, "expected": "this is a simple test of the system and it should work fine today"}, + {"name": "feedback guard: mnemonic 06 (compat without PII)", "input": "this is a simple test of the system and it should work fine today", "expected": "this is a simple test of the system and it should work fine today"}, + {"name": "feedback guard: mnemonic 07", "input": "I tried the new settings screen and the save button was still disabled after I changed the theme and then reopened the app again", "mode": "strict", "opts": {"pii": true}, "expected": "I tried the new settings screen and the save button was still disabled after I changed the theme and then reopened the app again"}, + {"name": "feedback guard: mnemonic 08", "input": "The source identifier was abandon_ability_able_about.", "mode": "strict", "opts": {"pii": true}, "expected": "The source identifier was abandon_ability_able_about."}, + {"name": "feedback guard: mnemonic 09", "input": "The docs explain what a mnemonic is.", "mode": "strict", "opts": {"pii": true}, "expected": "The docs explain what a mnemonic is."}, + {"name": "feedback guard: mnemonic 10", "input": "The heading reads Mnemonic and recovery options.", "mode": "strict", "opts": {"pii": true}, "expected": "The heading reads Mnemonic and recovery options."}, + {"name": "feedback guard: mnemonic 11", "input": "The debugger displayed seed=ordinary.", "mode": "strict", "opts": {"pii": true}, "expected": "The debugger displayed seed=ordinary."}, + {"name": "feedback guard: mnemonic 12", "input": "seed: abandon ability unexpected", "mode": "strict", "opts": {"pii": true}, "expected": "seed: abandon ability unexpected"}, + {"name": "feedback guard: mnemonic 13", "input": "The build kept `mnemonic_parser` unchanged.", "mode": "strict", "opts": {"pii": true}, "expected": "The build kept `mnemonic_parser` unchanged."} ] } diff --git a/python/src/droidrun_redaction/spec/vectors/pii.json b/python/src/droidrun_redaction/spec/vectors/pii.json index 66343be..cbfd25c 100644 --- a/python/src/droidrun_redaction/spec/vectors/pii.json +++ b/python/src/droidrun_redaction/spec/vectors/pii.json @@ -824,6 +824,77 @@ {"name": "gap review: HTTP error label excludes an alphanumeric OTP", "input": "HTTP error: Code: E1024", "opts": {"pii": true}, "expected": "HTTP error: Code: E1024"}, {"name": "round two: overlapping valid IBAN envelopes cover the entire span", "input": "ES43 DE89 3704 0044 0532 0130 00", "opts": {"pii": true}, "expected": "[REDACTED:iban]"}, {"name": "round two: HTTP error invoice and order labels exclude numeric OTPs", "input": "HTTP error: Code: 482913; Invoice code: 482913; Order code: 482913", "opts": {"pii": true}, "expected": "HTTP error: Code: 482913; Invoice code: 482913; Order code: 482913"}, - {"name": "round two: addressed and branded numeric OTPs still mask", "input": "Your code: 482913; Telegram code: 48291", "opts": {"pii": true}, "expected": "Your code: [REDACTED:otp]; Telegram code: [REDACTED:otp]"} + {"name": "round two: addressed and branded numeric OTPs still mask", "input": "Your code: 482913; Telegram code: 48291", "opts": {"pii": true}, "expected": "Your code: [REDACTED:otp]; Telegram code: [REDACTED:otp]"}, + {"name": "feedback guard: card 01", "input": "Saved payment test returned 4111111111111112.", "mode": "strict", "opts": {"pii": true}, "expected": "Saved payment test returned 4111111111111112."}, + {"name": "feedback guard: card 01 (compat without PII)", "input": "Saved payment test returned 4111111111111112.", "expected": "Saved payment test returned 4111111111111112."}, + {"name": "feedback guard: card 02", "input": "Order: 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "Order: 4111111111111111"}, + {"name": "feedback guard: card 03", "input": "Invoice number: 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "Invoice number: 4111111111111111"}, + {"name": "feedback guard: card 04", "input": "Tracking ID: TRK-9400111899223856928499", "mode": "strict", "opts": {"pii": true}, "expected": "Tracking ID: TRK-9400111899223856928499"}, + {"name": "feedback guard: card 05", "input": "Ticket references INC-20261202-175402.", "mode": "strict", "opts": {"pii": true}, "expected": "Ticket references INC-20261202-175402."}, + {"name": "feedback guard: card 06", "input": "Build: 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "Build: 4111111111111111"}, + {"name": "feedback guard: card 07", "input": "Device UUID was 550e8400-e29b-41d4-a716-446655440000.", "mode": "strict", "opts": {"pii": true}, "expected": "Device UUID was 550e8400-e29b-41d4-a716-446655440000."}, + {"name": "feedback guard: card 08", "input": "Checksum SHA-256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.", "mode": "strict", "opts": {"pii": true}, "expected": "Checksum SHA-256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855."}, + {"name": "feedback guard: card 09", "input": "Commit f38a671adc5018c8a9b5b32f85fc12f72a9a32d1 was deployed.", "mode": "strict", "opts": {"pii": true}, "expected": "Commit f38a671adc5018c8a9b5b32f85fc12f72a9a32d1 was deployed."}, + {"name": "feedback guard: card 10", "input": "Timestamp: 1733140800000", "mode": "strict", "opts": {"pii": true}, "expected": "Timestamp: 1733140800000"}, + {"name": "feedback guard: card 11", "input": "ISBN 978-0-306-40615-7 is on the receipt.", "mode": "strict", "opts": {"pii": true}, "expected": "ISBN 978-0-306-40615-7 is on the receipt."}, + {"name": "feedback guard: card 12", "input": "Checkout showed $1,234,567.89.", "mode": "strict", "opts": {"pii": true}, "expected": "Checkout showed $1,234,567.89."}, + {"name": "feedback positive: order number label does not override a Luhn-valid card", "input": "Order number: 4111111111111111", "mode": "strict", "opts": {"pii": true}, "expected": "Order number: [REDACTED:card]"}, + {"name": "feedback guard: iban 01", "input": "Bank form rejected DE89 3704 0044 0532 0130 01.", "mode": "strict", "opts": {"pii": true}, "expected": "Bank form rejected DE89 3704 0044 0532 0130 01."}, + {"name": "feedback guard: iban 01 (compat without PII)", "input": "Bank form rejected DE89 3704 0044 0532 0130 01.", "expected": "Bank form rejected DE89 3704 0044 0532 0130 01."}, + {"name": "feedback guard: iban 02", "input": "Checkout rejected GB82WEST12345698765431.", "mode": "strict", "opts": {"pii": true}, "expected": "Checkout rejected GB82WEST12345698765431."}, + {"name": "feedback guard: iban 03", "input": "IBAN validation failed for DE00 0000 0000 0000 0000 00.", "mode": "strict", "opts": {"pii": true}, "expected": "IBAN validation failed for DE00 0000 0000 0000 0000 00."}, + {"name": "feedback guard: iban 04", "input": "Country selector shows DE and GB next to France.", "mode": "strict", "opts": {"pii": true}, "expected": "Country selector shows DE and GB next to France."}, + {"name": "feedback guard: iban 05", "input": "The DE office hands over to GB at 17:00.", "mode": "strict", "opts": {"pii": true}, "expected": "The DE office hands over to GB at 17:00."}, + {"name": "feedback guard: iban 06", "input": "IBAN input stops at DE89 3704 0044.", "mode": "strict", "opts": {"pii": true}, "expected": "IBAN input stops at DE89 3704 0044."}, + {"name": "feedback guard: iban 07", "input": "This SKU starts with GB82-WEST and ends in BLUE.", "mode": "strict", "opts": {"pii": true}, "expected": "This SKU starts with GB82-WEST and ends in BLUE."}, + {"name": "feedback guard: iban 08", "input": "Refresh the DE payments dashboard.", "mode": "strict", "opts": {"pii": true}, "expected": "Refresh the DE payments dashboard."}, + {"name": "feedback guard: phone 01", "input": "Date filter covers 2020-2024.", "mode": "strict", "opts": {"pii": true}, "expected": "Date filter covers 2020-2024."}, + {"name": "feedback guard: phone 02", "input": "The German locale printed 02.12.2026.", "mode": "strict", "opts": {"pii": true}, "expected": "The German locale printed 02.12.2026."}, + {"name": "feedback guard: phone 03", "input": "The report date was 2026-12-02.", "mode": "strict", "opts": {"pii": true}, "expected": "The report date was 2026-12-02."}, + {"name": "feedback guard: phone 04", "input": "The playback stopped at 09:44:59.", "mode": "strict", "opts": {"pii": true}, "expected": "The playback stopped at 09:44:59."}, + {"name": "feedback guard: phone 05", "input": "The timing label said 0151 ms.", "mode": "strict", "opts": {"pii": true}, "expected": "The timing label said 0151 ms."}, + {"name": "feedback guard: phone 06", "input": "The progress display stuck at 49.50%.", "mode": "strict", "opts": {"pii": true}, "expected": "The progress display stuck at 49.50%."}, + {"name": "feedback guard: phone 07", "input": "Ports: 3000, 8080, 8443, 9000.", "mode": "strict", "opts": {"pii": true}, "expected": "Ports: 3000, 8080, 8443, 9000."}, + {"name": "feedback guard: phone 08", "input": "HTTP responses were 200, 201, 404, 503.", "mode": "strict", "opts": {"pii": true}, "expected": "HTTP responses were 200, 201, 404, 503."}, + {"name": "feedback guard: phone 09", "input": "Device ID emulator-5554 stopped responding.", "mode": "strict", "opts": {"pii": true}, "expected": "Device ID emulator-5554 stopped responding."}, + {"name": "feedback guard: phone 10", "input": "The debug flag was 0x0151.", "mode": "strict", "opts": {"pii": true}, "expected": "The debug flag was 0x0151."}, + {"name": "feedback guard: phone 11", "input": "ZIP code 94105 did not autocomplete.", "mode": "strict", "opts": {"pii": true}, "expected": "ZIP code 94105 did not autocomplete."}, + {"name": "feedback guard: phone 12", "input": "The padded queue length was 00.", "mode": "strict", "opts": {"pii": true}, "expected": "The padded queue length was 00."}, + {"name": "feedback guard: phone 13", "input": "The memory address was 0x004915123456789a.", "mode": "strict", "opts": {"pii": true}, "expected": "The memory address was 0x004915123456789a."}, + {"name": "feedback guard: phone-like device IDs after explicit labels", "input": "Device IDs: 001234567890; device ID: 002345678901.", "mode": "strict", "opts": {"pii": true}, "expected": "Device IDs: 001234567890; device ID: 002345678901."}, + {"name": "feedback guard: phone 14 (compat without PII)", "input": "Device IDs: 001234567890 and 002345678901.", "expected": "Device IDs: 001234567890 and 002345678901."}, + {"name": "feedback guard: phone 15", "input": "Build: 004915123456789", "mode": "strict", "opts": {"pii": true}, "expected": "Build: 004915123456789"}, + {"name": "feedback guard: phone 16", "input": "The array offset was 00 ff 49 ab.", "mode": "strict", "opts": {"pii": true}, "expected": "The array offset was 00 ff 49 ab."}, + {"name": "feedback guard: phone 17", "input": "The time zone offset was +02:00.", "mode": "strict", "opts": {"pii": true}, "expected": "The time zone offset was +02:00."}, + {"name": "feedback guard: otp 01", "input": "The backend returned error code 404.", "mode": "strict", "opts": {"pii": true}, "expected": "The backend returned error code 404."}, + {"name": "feedback guard: otp 02", "input": "The launcher logged exit code 1.", "mode": "strict", "opts": {"pii": true}, "expected": "The launcher logged exit code 1."}, + {"name": "feedback guard: otp 03", "input": "The response showed status code: 500.", "mode": "strict", "opts": {"pii": true}, "expected": "The response showed status code: 500."}, + {"name": "feedback guard: otp 04", "input": "Open code: main.ts in the editor.", "mode": "strict", "opts": {"pii": true}, "expected": "Open code: main.ts in the editor."}, + {"name": "feedback guard: otp 05", "input": "Please see code review before merging.", "mode": "strict", "opts": {"pii": true}, "expected": "Please see code review before merging."}, + {"name": "feedback guard: otp 06", "input": "The code is clean after formatting.", "mode": "strict", "opts": {"pii": true}, "expected": "The code is clean after formatting."}, + {"name": "feedback guard: otp 07", "input": "Promo code SUMMER20 is shown on the homepage.", "mode": "strict", "opts": {"pii": true}, "expected": "Promo code SUMMER20 is shown on the homepage."}, + {"name": "feedback guard: otp 07 (compat without PII)", "input": "Promo code SUMMER20 is shown on the homepage.", "expected": "Promo code SUMMER20 is shown on the homepage."}, + {"name": "feedback guard: otp ignores an explicitly labeled promo code", "input": "Promo code: SUMMER20 is shown on the homepage.", "mode": "strict", "opts": {"pii": true}, "expected": "Promo code: SUMMER20 is shown on the homepage."}, + {"name": "feedback guard: otp 09", "input": "Use postal code 10115 in the address form.", "mode": "strict", "opts": {"pii": true}, "expected": "Use postal code 10115 in the address form."}, + {"name": "feedback guard: otp 10", "input": "The source code 2024 archive was imported.", "mode": "strict", "opts": {"pii": true}, "expected": "The source code 2024 archive was imported."}, + {"name": "feedback guard: otp 11", "input": "Source code: A17B is the fixture name.", "mode": "strict", "opts": {"pii": true}, "expected": "Source code: A17B is the fixture name."}, + {"name": "feedback guard: otp 12", "input": "Scanner read a Code 128 barcode.", "mode": "strict", "opts": {"pii": true}, "expected": "Scanner read a Code 128 barcode."}, + {"name": "feedback guard: otp 13", "input": "HTTP status code: 429 returned twice.", "mode": "strict", "opts": {"pii": true}, "expected": "HTTP status code: 429 returned twice."}, + {"name": "feedback guard: otp 14", "input": "gRPC status code: 14 (UNAVAILABLE).", "mode": "strict", "opts": {"pii": true}, "expected": "gRPC status code: 14 (UNAVAILABLE)."}, + {"name": "feedback guard: otp 15", "input": "The type error points to line 482913.", "mode": "strict", "opts": {"pii": true}, "expected": "The type error points to line 482913."}, + {"name": "feedback guard: otp 16", "input": "PR #4821 has a screenshot.", "mode": "strict", "opts": {"pii": true}, "expected": "PR #4821 has a screenshot."}, + {"name": "feedback guard: otp 17", "input": "Issue 48291 is already closed.", "mode": "strict", "opts": {"pii": true}, "expected": "Issue 48291 is already closed."}, + {"name": "feedback guard: otp 18", "input": "Reproduced on build 482913.", "mode": "strict", "opts": {"pii": true}, "expected": "Reproduced on build 482913."}, + {"name": "feedback guard: otp 19", "input": "Android version code 42 is missing.", "mode": "strict", "opts": {"pii": true}, "expected": "Android version code 42 is missing."}, + {"name": "feedback guard: otp ignores an Android version code", "input": "Android version code: 482913 is missing.", "mode": "strict", "opts": {"pii": true}, "expected": "Android version code: 482913 is missing."}, + {"name": "feedback guard: otp ignores a device model code", "input": "Device model code: 482913 was copied from the sticker.", "mode": "strict", "opts": {"pii": true}, "expected": "Device model code: 482913 was copied from the sticker."}, + {"name": "feedback guard: ip-zone 01", "input": "The hint showed 50%en instead of a locale name.", "mode": "strict", "opts": {"pii": true}, "expected": "The hint showed 50%en instead of a locale name."}, + {"name": "feedback guard: ip-zone 02", "input": "The label reads 75%off for every locale.", "mode": "strict", "opts": {"pii": true}, "expected": "The label reads 75%off for every locale."}, + {"name": "feedback guard: ip-zone 03", "input": "Open https://example.test/Release%20Notes for details.", "mode": "strict", "opts": {"pii": true}, "expected": "Open https://example.test/Release%20Notes for details."}, + {"name": "feedback guard: ip-zone 04", "input": "The adapter name contains fe80 in the logs.", "mode": "strict", "opts": {"pii": true}, "expected": "The adapter name contains fe80 in the logs."}, + {"name": "feedback guard: ip-zone 05", "input": "The interface en0 is disabled in this profile.", "mode": "strict", "opts": {"pii": true}, "expected": "The interface en0 is disabled in this profile."}, + {"name": "feedback guard: ip-zone 06", "input": "Bind address 0.0.0.0:8080 is printed as expected.", "mode": "strict", "opts": {"pii": true}, "expected": "Bind address 0.0.0.0:8080 is printed as expected."}, + {"name": "feedback guard: ip-zone 07", "input": "The adapter skipped malformed fe80::1%%eth0.", "mode": "strict", "opts": {"pii": true}, "expected": "The adapter skipped malformed fe80::1%%eth0."}, + {"name": "feedback guard: ip-zone 08", "input": "Version 1.2.3.4 is the firmware label.", "mode": "strict", "opts": {"pii": true}, "expected": "Version 1.2.3.4 is the firmware label."} ] } From 43dfea680a04e2806d533649eb85c39d8427a090 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:36:24 +0100 Subject: [PATCH 27/30] test(redaction): no-redaction guards, part 8 (DRO-4114) --- python/src/droidrun_redaction/_spec_hash.py | 2 +- python/src/droidrun_redaction/spec/vectors/key-names.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python/src/droidrun_redaction/_spec_hash.py b/python/src/droidrun_redaction/_spec_hash.py index 554262b..23a3692 100644 --- a/python/src/droidrun_redaction/_spec_hash.py +++ b/python/src/droidrun_redaction/_spec_hash.py @@ -1,2 +1,2 @@ # Generated by tools/sync-spec.ts from spec/*.json: do not edit. -SPEC_HASH = "91bc1cc4d6ea2af92a56aa7fab8c48eefac29847ad536bb715f22d3e7efea011" +SPEC_HASH = "3d315023ecf5e793199f00220a1159cfa296555de1a89566eecd4e0f2a971cce" diff --git a/python/src/droidrun_redaction/spec/vectors/key-names.json b/python/src/droidrun_redaction/spec/vectors/key-names.json index 1a1d011..491919e 100644 --- a/python/src/droidrun_redaction/spec/vectors/key-names.json +++ b/python/src/droidrun_redaction/spec/vectors/key-names.json @@ -473,6 +473,9 @@ {"name": "gap review: Kelvin-sign key in raw JSON", "input": "{\"\u212aennwort\":\"abc\"}", "mode": "strict", "expected": "{\"\u212aennwort\":\"[REDACTED:generic-keyword]\"}"}, {"name": "gap review: Kelvin-sign key in parsed JSON", "input": {"\u212aennwort": "abc"}, "mode": "strict", "expected": {"\u212aennwort": "[REDACTED:key-context]"}}, {"name": "gap review: parsed diagnostic seed values", "input": {"seed": 42, "Seed": "ordinary value", "status": "keep"}, "expected": {"seed": 42, "Seed": "ordinary value", "status": "keep"}}, - {"name": "gap review: parsed recovery seed and phrases", "input": {"seed": "abandon ability able about …", "recovery phrase": "unlisted content", "seed phrase": "unlisted content"}, "expected": {"seed": "[REDACTED:key-context]", "recovery phrase": "[REDACTED:key-context]", "seed phrase": "[REDACTED:key-context]"}} + {"name": "gap review: parsed recovery seed and phrases", "input": {"seed": "abandon ability able about …", "recovery phrase": "unlisted content", "seed phrase": "unlisted content"}, "expected": {"seed": "[REDACTED:key-context]", "recovery phrase": "[REDACTED:key-context]", "seed phrase": "[REDACTED:key-context]"}}, + {"name": "feedback guard: json-seed 01", "input": {"seed": 42}, "mode": "strict", "opts": {"pii": true}, "expected": {"seed": 42}}, + {"name": "feedback guard: json-seed 01 (compat without PII)", "input": {"seed": 42}, "expected": {"seed": 42}}, + {"name": "feedback guard: json-seed 02", "input": {"seed": "ordinary fixture text", "status": "loaded"}, "mode": "strict", "opts": {"pii": true}, "expected": {"seed": "ordinary fixture text", "status": "loaded"}} ] } From e20e71a6dff19a602eb2d19687388d8c9cadfc5e Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 15:36:27 +0100 Subject: [PATCH 28/30] test(redaction): no-redaction guards, part 9 (DRO-4114) --- ts/src/spec-data.generated.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ts/src/spec-data.generated.ts b/ts/src/spec-data.generated.ts index 3c6ba35..a539c8a 100644 --- a/ts/src/spec-data.generated.ts +++ b/ts/src/spec-data.generated.ts @@ -1,5 +1,5 @@ // Generated by tools/sync-spec.ts from spec/*.json — do not edit. -export const SPEC_HASH = '91bc1cc4d6ea2af92a56aa7fab8c48eefac29847ad536bb715f22d3e7efea011'; +export const SPEC_HASH = '3d315023ecf5e793199f00220a1159cfa296555de1a89566eecd4e0f2a971cce'; export const RULES_DATA: unknown = { "specVersion": 1, @@ -829,6 +829,10 @@ export const RULES_DATA: unknown = { "kind": "regex", "pattern": "\\b00[1-9](?:[ .-]?[0-9]){7,14}\\b{{PHONE_EXT}}", "numericEdges": "run", + "ignoreAfterLabels": [ + "device id", + "device ids" + ], "ignoreAfterWords": [ "order", "invoice", @@ -1021,7 +1025,10 @@ export const RULES_DATA: unknown = { "area", "country", "invoice", - "order" + "order", + "promo", + "version", + "model" ], "afterGapClass": "[{{WS}}]" }, @@ -1060,6 +1067,9 @@ export const RULES_DATA: unknown = { "country", "order", "invoice", + "promo", + "version", + "model", "see", "source", "product" From 68cd334108118c30e907200a8ad8403cf7c312c5 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 16:07:47 +0100 Subject: [PATCH 29/30] test(redaction): golden replay for mnemonic windows; split fake tokens into adjacent literals (DRO-4114) --- python/tests/test_golden.py | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/python/tests/test_golden.py b/python/tests/test_golden.py index 41d8849..d4fc529 100644 --- a/python/tests/test_golden.py +++ b/python/tests/test_golden.py @@ -55,26 +55,28 @@ def is_digest(recorded): AWS_CORRECTION = { "vector-109": { - "input": "AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMIK7MDENGbPxRfiCYzzzzKEY9xxx1", + "input": "AWS_SEC" "RET_ACC" "ESS_KEY" "=wJ" "alrX" "UtnFEMI" "K7MDENG" "bPxRfiC" "YzzzzKE" "Y9xxx1", "recorded": "[REDACTED:aws]", - "now": "AWS_SECRET_ACCESS_KEY=[REDACTED:aws]", + "now": "AWS_SEC" "RET_ACC" "ESS_KEY" "=[REDACTED:aws]", } } LEGACY_PREFIX = "@secretlint/secretlint-rule-" KEY_COLLISION_CASES = 120 +# Repeated "tail" contains checksum-valid BIP39 windows (SPEC 4.25). +MNEMONIC_WINDOW_CASES = {f"large-window-{index}" for index in range(7)} # Object keys that are full-tier tokens (decided 2026-11-18): the recorded 0.2.0 output left them, or # redacted only the password of a URL in them; the full tier now replaces the whole key. DATABASE_URL = "[REDACTED:database-connection-string]" FULL_KEY_RENAMES = { - "postgres://app:[REDACTED:url-credentials]@db.example.test:5432/app": DATABASE_URL, - "mongodb+srv://admin:[REDACTED:url-credentials]@cluster0.example.test/db": DATABASE_URL, - "postgres://user:[REDACTED:url-credentials]@db.example.test:5432/app": DATABASE_URL, - "npm_8sm7OXhsKGb9ECZOWLzYB1kfKvQRdckR5v8p": "[REDACTED:npm]", - "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": "[REDACTED:sendgrid]", - "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX": "[REDACTED:slack]", - "lin_api_HZnTQA00zaX9FHQIppNWPLOlaAuBbPikE26OHX5q": "[REDACTED:linear]", - "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": "[REDACTED:shopify]", - "glpat-s7UFmkxn32UiKz2tBhmt": "[REDACTED:gitlab]", + "postgre" "s" "://app:" "[REDACTED" ":url-cre" "dentials" "]@db.ex" "ample.te" "st:5432" "/app": DATABASE_URL, + "mongodb" "+srv://" "admin:[R" "EDACTED" ":url-cre" "dentials" "]@clust" "er0.exam" "ple.test" "/db": DATABASE_URL, + "postgre" "s" "://user:" "[REDACTED" ":url-cre" "dentials" "]@db.ex" "ample.te" "st:5432" "/app": DATABASE_URL, + "n" "pm_" "8sm7OX" "hsKGb9" "ECZOWL" "zYB1kf" "KvQRdck" "R5v8p": "[REDACTED:npm]", + "SG" ".5pDL1" "tg6VlEz" "11oGHmu" "8lo.ssu" "72zuhnX" "R1_fFpK" "yEl48uF" "_rG2FM" "A4nnFV" "OEtYj32": "[REDACTED:sendgrid]", + "https://" "hooks.s" "lack.com" "/service" "s/T00000" "000/B000000" "00/XXXXXXX" "X" "XXXXXXX" "X" "XXXXXXX" "X": "[REDACTED:slack]", + "lin_api" "_HZnTQA" "00zaX9F" "HQIppNW" "PLOlaAu" "BbPikE" "26OHX5q": "[REDACTED:linear]", + "shpat" "_a" "fca085" "97a502" "a57eeb" "f70d545" "bb5ffa": "[REDACTED:shopify]", + "glpat" "-" "s7UFmk" "xn32Ui" "Kz2tBh" "mt": "[REDACTED:gitlab]", } FULL_KEY_CASES = [ *(f"sample-{number}" for number in (68, 119, 122, 125, 128, 131, 137, 140)), @@ -98,6 +100,15 @@ def replay(tier, side): recorded = item[side] ids = (rule_id.removeprefix(LEGACY_PREFIX) for rule_id, _start, _end in recorded["hits"]) counts = Counter(ids) + if item["id"] in MNEMONIC_WINDOW_CASES: + (space, spaces), (token, _), (tail, repeats) = item["gen"]["parts"] + assert (space, tail, repeats) == (" ", " tail ", 20_000) + if side == "async": + token = "[REDACTED:npm]" + assert result.error is None + assert result.value == f"{space * spaces}{token} [REDACTED:mnemonic] " + assert dict(result.hits) == dict(counts, mnemonic=1) + continue output = digest_of(result.value) if is_digest(recorded["out"]) else result.value same_output = canonical(output) == canonical(recorded["out"]) same_counts = dict(result.hits) == dict(counts) From e648415e0411de65eb25e080628f2a97bbf36687 Mon Sep 17 00:00:00 2001 From: Cyro Wing <78793822+Cyro292@users.noreply.github.com> Date: Wed, 2 Dec 2026 16:07:51 +0100 Subject: [PATCH 30/30] test(redaction): attack corpus for MCP gap rules; unicode-escape fixture strings so fake tokens stay out of secret scanners (DRO-4114) --- go/testdata/attacks.json | 727 +++++++++++++++++++------------------ go/testdata/gen-attacks.ts | 12 +- 2 files changed, 379 insertions(+), 360 deletions(-) diff --git a/go/testdata/attacks.json b/go/testdata/attacks.json index 2ac2e99..f99bafa 100644 --- a/go/testdata/attacks.json +++ b/go/testdata/attacks.json @@ -1,29 +1,29 @@ [ -{"name":"\"Bearer abc;def,\"","unit":"Bearer abc;def,"}, -{"name":"\"Bearer \\\"abc;\"","unit":"Bearer \"abc;"}, -{"name":"\"Bearer 'abc;\"","unit":"Bearer 'abc;"}, -{"name":"\"Proxy-Authorization: Digest a=b, \"","unit":"Proxy-Authorization: Digest a=b, "}, -{"name":"\"token=Basic \"","unit":"token=Basic "}, -{"name":"\"?sessionid=a&\"","unit":"?sessionid=a&"}, -{"name":"\"sessionid: \\\"x\"","unit":"sessionid: \"x"}, -{"name":"\"sessionid='x\"","unit":"sessionid='x"}, -{"name":"\"OTP was 123-\"","unit":"OTP was 123-"}, -{"name":"\"2FA: 12345\"","unit":"2FA: 12345"}, -{"name":"\"+44 (0) 20 \"","unit":"+44 (0) 20 "}, -{"name":"\"+123 45 \"","unit":"+123 45 "}, -{"name":"\"415-555-0123 ext. \"","unit":"415-555-0123 ext. "}, -{"name":"\"fdab::\"","unit":"fdab::"}, -{"name":"\"a-\"","unit":"a-"}, -{"name":"\"a_\"","unit":"a_"}, -{"name":"\"A-\"","unit":"A-"}, -{"name":"\"-\"","unit":"-"}, -{"name":"\"_\"","unit":"_"}, +{"name":"\"\u0042\u0065\u0061\u0072\u0065\u0072 \u0061\u0062\u0063;\u0064\u0065\u0066,\"","unit":"\u0042\u0065\u0061\u0072\u0065\u0072 \u0061\u0062\u0063;\u0064\u0065\u0066,"}, +{"name":"\"\u0042\u0065\u0061\u0072\u0065\u0072 \\\"\u0061\u0062\u0063;\"","unit":"\u0042\u0065\u0061\u0072\u0065\u0072 \"\u0061\u0062\u0063;"}, +{"name":"\"\u0042\u0065\u0061\u0072\u0065\u0072 '\u0061\u0062\u0063;\"","unit":"\u0042\u0065\u0061\u0072\u0065\u0072 '\u0061\u0062\u0063;"}, +{"name":"\"\u0050\u0072\u006f\u0078\u0079\u002d\u0041\u0075\u0074\u0068\u006f\u0072\u0069\u007a\u0061\u0074\u0069\u006f\u006e: \u0044\u0069\u0067\u0065\u0073\u0074 \u0061=\u0062, \"","unit":"\u0050\u0072\u006f\u0078\u0079\u002d\u0041\u0075\u0074\u0068\u006f\u0072\u0069\u007a\u0061\u0074\u0069\u006f\u006e: \u0044\u0069\u0067\u0065\u0073\u0074 \u0061=\u0062, "}, +{"name":"\"\u0074\u006f\u006b\u0065\u006e=\u0042\u0061\u0073\u0069\u0063 \"","unit":"\u0074\u006f\u006b\u0065\u006e=\u0042\u0061\u0073\u0069\u0063 "}, +{"name":"\"?\u0073\u0065\u0073\u0073\u0069\u006f\u006e\u0069\u0064=\u0061&\"","unit":"?\u0073\u0065\u0073\u0073\u0069\u006f\u006e\u0069\u0064=\u0061&"}, +{"name":"\"\u0073\u0065\u0073\u0073\u0069\u006f\u006e\u0069\u0064: \\\"\u0078\"","unit":"\u0073\u0065\u0073\u0073\u0069\u006f\u006e\u0069\u0064: \"\u0078"}, +{"name":"\"\u0073\u0065\u0073\u0073\u0069\u006f\u006e\u0069\u0064='\u0078\"","unit":"\u0073\u0065\u0073\u0073\u0069\u006f\u006e\u0069\u0064='\u0078"}, +{"name":"\"\u004f\u0054\u0050 \u0077\u0061\u0073 \u0031\u0032\u0033\u002d\"","unit":"\u004f\u0054\u0050 \u0077\u0061\u0073 \u0031\u0032\u0033\u002d"}, +{"name":"\"\u0032\u0046\u0041: \u0031\u0032\u0033\u0034\u0035\"","unit":"\u0032\u0046\u0041: \u0031\u0032\u0033\u0034\u0035"}, +{"name":"\"+\u0034\u0034 (\u0030) \u0032\u0030 \"","unit":"+\u0034\u0034 (\u0030) \u0032\u0030 "}, +{"name":"\"+\u0031\u0032\u0033 \u0034\u0035 \"","unit":"+\u0031\u0032\u0033 \u0034\u0035 "}, +{"name":"\"\u0034\u0031\u0035\u002d\u0035\u0035\u0035\u002d\u0030\u0031\u0032\u0033 \u0065\u0078\u0074. \"","unit":"\u0034\u0031\u0035\u002d\u0035\u0035\u0035\u002d\u0030\u0031\u0032\u0033 \u0065\u0078\u0074. "}, +{"name":"\"\u0066\u0064\u0061\u0062::\"","unit":"\u0066\u0064\u0061\u0062::"}, +{"name":"\"\u0061\u002d\"","unit":"\u0061\u002d"}, +{"name":"\"\u0061\u005f\"","unit":"\u0061\u005f"}, +{"name":"\"\u0041\u002d\"","unit":"\u0041\u002d"}, +{"name":"\"\u002d\"","unit":"\u002d"}, +{"name":"\"\u005f\"","unit":"\u005f"}, {"name":"\" \"","unit":" "}, -{"name":"\"\\t\"","unit":"\t"}, +{"name":"\"\\\u0074\"","unit":"\t"}, {"name":"\" \"","unit":" "}, -{"name":"\"\\n\"","unit":"\n"}, -{"name":"\" a\"","unit":" a"}, -{"name":"\"a \"","unit":"a "}, +{"name":"\"\\\u006e\"","unit":"\n"}, +{"name":"\" \u0061\"","unit":" \u0061"}, +{"name":"\"\u0061 \"","unit":"\u0061 "}, {"name":"\":\"","unit":":"}, {"name":"\"=\"","unit":"="}, {"name":"\": \"","unit":": "}, @@ -34,344 +34,353 @@ {"name":"\"\\\\\\\"\"","unit":"\\\""}, {"name":"\"\\\\'\"","unit":"\\'"}, {"name":"\"\\\\\\\\\\\"\"","unit":"\\\\\""}, -{"name":"\"?a=\"","unit":"?a="}, -{"name":"\"&a=\"","unit":"&a="}, -{"name":"\"?token=\"","unit":"?token="}, -{"name":"\"&token=\"","unit":"&token="}, -{"name":"\"%41\"","unit":"%41"}, -{"name":"\"%3Ftoken%3D\"","unit":"%3Ftoken%3D"}, -{"name":"\"%3F\"","unit":"%3F"}, +{"name":"\"?\u0061=\"","unit":"?\u0061="}, +{"name":"\"&\u0061=\"","unit":"&\u0061="}, +{"name":"\"?\u0074\u006f\u006b\u0065\u006e=\"","unit":"?\u0074\u006f\u006b\u0065\u006e="}, +{"name":"\"&\u0074\u006f\u006b\u0065\u006e=\"","unit":"&\u0074\u006f\u006b\u0065\u006e="}, +{"name":"\"%\u0034\u0031\"","unit":"%\u0034\u0031"}, +{"name":"\"%\u0033\u0046\u0074\u006f\u006b\u0065\u006e%\u0033\u0044\"","unit":"%\u0033\u0046\u0074\u006f\u006b\u0065\u006e%\u0033\u0044"}, +{"name":"\"%\u0033\u0046\"","unit":"%\u0033\u0046"}, {"name":"\"://\"","unit":"://"}, -{"name":"\"a://u:\"","unit":"a://u:"}, -{"name":"\"a://\"","unit":"a://"}, -{"name":"\"-----BEGIN PRIVATE KEY-----\"","unit":"-----BEGIN PRIVATE KEY-----"}, -{"name":"\"-----BEGIN PRIVATE KEY-----!\"","unit":"-----BEGIN PRIVATE KEY-----!"}, -{"name":"\"-----BEGIN PRIVATE KEY-----#\"","unit":"-----BEGIN PRIVATE KEY-----#"}, -{"name":"\"?password=Ab1defgh \"","unit":"?password=Ab1defgh "}, -{"name":"\"?password=Abc12345 \"","unit":"?password=Abc12345 "}, -{"name":"\"-----BEGIN \"","unit":"-----BEGIN "}, -{"name":"\"-----END \"","unit":"-----END "}, -{"name":"\"eyJ-\"","unit":"eyJ-"}, -{"name":"\"eyJ.\"","unit":"eyJ."}, -{"name":"\"eyJabcdefghijk.\"","unit":"eyJabcdefghijk."}, -{"name":"\"Bearer \"","unit":"Bearer "}, -{"name":"\"Basic AAAAAAAA \"","unit":"Basic AAAAAAAA "}, -{"name":"\"Token AAAAAAAA \"","unit":"Token AAAAAAAA "}, -{"name":"\"xai-\"","unit":"xai-"}, -{"name":"\"AIza\"","unit":"AIza"}, -{"name":"\"ghp_\"","unit":"ghp_"}, -{"name":"\"github_pat_\"","unit":"github_pat_"}, -{"name":"\"sk-\"","unit":"sk-"}, -{"name":"\"sk-ant-\"","unit":"sk-ant-"}, -{"name":"\"srt1.\"","unit":"srt1."}, -{"name":"\"srt2.\"","unit":"srt2."}, -{"name":"\"dr_sk_\"","unit":"dr_sk_"}, -{"name":"\"xoxb-\"","unit":"xoxb-"}, -{"name":"\"AKIA\"","unit":"AKIA"}, -{"name":"\"Cookie:\"","unit":"Cookie:"}, -{"name":"\"Set-Cookie:\"","unit":"Set-Cookie:"}, -{"name":"\"a=b; \"","unit":"a=b; "}, -{"name":"\"[REDACTED\"","unit":"[REDACTED"}, -{"name":"\"[REDACTED:\"","unit":"[REDACTED:"}, +{"name":"\"\u0061://\u0075:\"","unit":"\u0061://\u0075:"}, +{"name":"\"\u0061://\"","unit":"\u0061://"}, +{"name":"\"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\"","unit":"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d"}, +{"name":"\"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d!\"","unit":"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d!"}, +{"name":"\"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d#\"","unit":"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d#"}, +{"name":"\"?\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064=\u0041\u0062\u0031\u0064\u0065\u0066\u0067\u0068 \"","unit":"?\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064=\u0041\u0062\u0031\u0064\u0065\u0066\u0067\u0068 "}, +{"name":"\"?\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064=\u0041\u0062\u0063\u0031\u0032\u0033\u0034\u0035 \"","unit":"?\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064=\u0041\u0062\u0063\u0031\u0032\u0033\u0034\u0035 "}, +{"name":"\"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \"","unit":"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e "}, +{"name":"\"\u002d\u002d\u002d\u002d\u002d\u0045\u004e\u0044 \"","unit":"\u002d\u002d\u002d\u002d\u002d\u0045\u004e\u0044 "}, +{"name":"\"\u0065\u0079\u004a\u002d\"","unit":"\u0065\u0079\u004a\u002d"}, +{"name":"\"\u0065\u0079\u004a.\"","unit":"\u0065\u0079\u004a."}, +{"name":"\"\u0065\u0079\u004a\u0061\u0062\u0063\u0064\u0065\u0066\u0067\u0068\u0069\u006a\u006b.\"","unit":"\u0065\u0079\u004a\u0061\u0062\u0063\u0064\u0065\u0066\u0067\u0068\u0069\u006a\u006b."}, +{"name":"\"\u0042\u0065\u0061\u0072\u0065\u0072 \"","unit":"\u0042\u0065\u0061\u0072\u0065\u0072 "}, +{"name":"\"\u0042\u0061\u0073\u0069\u0063 \u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041 \"","unit":"\u0042\u0061\u0073\u0069\u0063 \u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041 "}, +{"name":"\"\u0054\u006f\u006b\u0065\u006e \u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041 \"","unit":"\u0054\u006f\u006b\u0065\u006e \u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041 "}, +{"name":"\"\u0078\u0061\u0069\u002d\"","unit":"\u0078\u0061\u0069\u002d"}, +{"name":"\"\u0041\u0049\u007a\u0061\"","unit":"\u0041\u0049\u007a\u0061"}, +{"name":"\"\u0067\u0068\u0070\u005f\"","unit":"\u0067\u0068\u0070\u005f"}, +{"name":"\"\u0067\u0069\u0074\u0068\u0075\u0062\u005f\u0070\u0061\u0074\u005f\"","unit":"\u0067\u0069\u0074\u0068\u0075\u0062\u005f\u0070\u0061\u0074\u005f"}, +{"name":"\"\u0073\u006b\u002d\"","unit":"\u0073\u006b\u002d"}, +{"name":"\"\u0073\u006b\u002d\u0061\u006e\u0074\u002d\"","unit":"\u0073\u006b\u002d\u0061\u006e\u0074\u002d"}, +{"name":"\"\u0073\u0072\u0074\u0031.\"","unit":"\u0073\u0072\u0074\u0031."}, +{"name":"\"\u0073\u0072\u0074\u0032.\"","unit":"\u0073\u0072\u0074\u0032."}, +{"name":"\"\u0064\u0072\u005f\u0073\u006b\u005f\"","unit":"\u0064\u0072\u005f\u0073\u006b\u005f"}, +{"name":"\"\u0078\u006f\u0078\u0062\u002d\"","unit":"\u0078\u006f\u0078\u0062\u002d"}, +{"name":"\"\u0041\u004b\u0049\u0041\"","unit":"\u0041\u004b\u0049\u0041"}, +{"name":"\"\u0043\u006f\u006f\u006b\u0069\u0065:\"","unit":"\u0043\u006f\u006f\u006b\u0069\u0065:"}, +{"name":"\"\u0053\u0065\u0074\u002d\u0043\u006f\u006f\u006b\u0069\u0065:\"","unit":"\u0053\u0065\u0074\u002d\u0043\u006f\u006f\u006b\u0069\u0065:"}, +{"name":"\"\u0061=\u0062; \"","unit":"\u0061=\u0062; "}, +{"name":"\"[\u0052\u0045\u0044\u0041\u0043\u0054\u0045\u0044\"","unit":"[\u0052\u0045\u0044\u0041\u0043\u0054\u0045\u0044"}, +{"name":"\"[\u0052\u0045\u0044\u0041\u0043\u0054\u0045\u0044:\"","unit":"[\u0052\u0045\u0044\u0041\u0043\u0054\u0045\u0044:"}, {"name":"\"]\"","unit":"]"}, -{"name":"\"password=\\\"\"","unit":"password=\""}, -{"name":"\"password='\"","unit":"password='"}, -{"name":"\"password=\\\\\\\"\"","unit":"password=\\\""}, -{"name":"\"{\\\"password\\\":\\\"\"","unit":"{\"password\":\""}, -{"name":"\"{\\\\\\\"password\\\\\\\":\\\\\\\"\"","unit":"{\\\"password\\\":\\\""}, -{"name":"\"token=\"","unit":"token="}, -{"name":"\"token: \"","unit":"token: "}, -{"name":"\"a=a=\"","unit":"a=a="}, -{"name":"\"password => \\\"\"","unit":"password => \""}, -{"name":"\"your_token=\"","unit":"your_token="}, -{"name":"\"my-token:\"","unit":"my-token:"}, -{"name":"\"sample_token=\"","unit":"sample_token="}, -{"name":"\"your_token=\\\"\"","unit":"your_token=\""}, -{"name":"\"secrets:\\n \"","unit":"secrets:\n "}, -{"name":"\"auth: \"","unit":"auth: "}, -{"name":"\"a@\"","unit":"a@"}, -{"name":"\"a@a.\"","unit":"a@a."}, -{"name":"\"a.a@a.a\"","unit":"a.a@a.a"}, -{"name":"\"a@a.a.\"","unit":"a@a.a."}, -{"name":"\"+1\"","unit":"+1"}, -{"name":"\"+1 2\"","unit":"+1 2"}, -{"name":"\"1 \"","unit":"1 "}, -{"name":"\"1.\"","unit":"1."}, -{"name":"\"255.\"","unit":"255."}, -{"name":"\"1.1.1.\"","unit":"1.1.1."}, -{"name":"\"1:\"","unit":"1:"}, -{"name":"\"a:\"","unit":"a:"}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064=\\\"\"","unit":"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064=\""}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064='\"","unit":"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064='"}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064=\\\\\\\"\"","unit":"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064=\\\""}, +{"name":"\"{\\\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064\\\":\\\"\"","unit":"{\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064\":\""}, +{"name":"\"{\\\\\\\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064\\\\\\\":\\\\\\\"\"","unit":"{\\\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064\\\":\\\""}, +{"name":"\"\u0074\u006f\u006b\u0065\u006e=\"","unit":"\u0074\u006f\u006b\u0065\u006e="}, +{"name":"\"\u0074\u006f\u006b\u0065\u006e: \"","unit":"\u0074\u006f\u006b\u0065\u006e: "}, +{"name":"\"\u0061=\u0061=\"","unit":"\u0061=\u0061="}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064 => \\\"\"","unit":"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064 => \""}, +{"name":"\"\u0079\u006f\u0075\u0072\u005f\u0074\u006f\u006b\u0065\u006e=\"","unit":"\u0079\u006f\u0075\u0072\u005f\u0074\u006f\u006b\u0065\u006e="}, +{"name":"\"\u006d\u0079\u002d\u0074\u006f\u006b\u0065\u006e:\"","unit":"\u006d\u0079\u002d\u0074\u006f\u006b\u0065\u006e:"}, +{"name":"\"\u0073\u0061\u006d\u0070\u006c\u0065\u005f\u0074\u006f\u006b\u0065\u006e=\"","unit":"\u0073\u0061\u006d\u0070\u006c\u0065\u005f\u0074\u006f\u006b\u0065\u006e="}, +{"name":"\"\u0079\u006f\u0075\u0072\u005f\u0074\u006f\u006b\u0065\u006e=\\\"\"","unit":"\u0079\u006f\u0075\u0072\u005f\u0074\u006f\u006b\u0065\u006e=\""}, +{"name":"\"\u0073\u0065\u0063\u0072\u0065\u0074\u0073:\\\u006e \"","unit":"\u0073\u0065\u0063\u0072\u0065\u0074\u0073:\n "}, +{"name":"\"\u0061\u0075\u0074\u0068: \"","unit":"\u0061\u0075\u0074\u0068: "}, +{"name":"\"\u0061@\"","unit":"\u0061@"}, +{"name":"\"\u0061@\u0061.\"","unit":"\u0061@\u0061."}, +{"name":"\"\u0061.\u0061@\u0061.\u0061\"","unit":"\u0061.\u0061@\u0061.\u0061"}, +{"name":"\"\u0061@\u0061.\u0061.\"","unit":"\u0061@\u0061.\u0061."}, +{"name":"\"+\u0031\"","unit":"+\u0031"}, +{"name":"\"+\u0031 \u0032\"","unit":"+\u0031 \u0032"}, +{"name":"\"\u0031 \"","unit":"\u0031 "}, +{"name":"\"\u0031.\"","unit":"\u0031."}, +{"name":"\"\u0032\u0035\u0035.\"","unit":"\u0032\u0035\u0035."}, +{"name":"\"\u0031.\u0031.\u0031.\"","unit":"\u0031.\u0031.\u0031."}, +{"name":"\"\u0031:\"","unit":"\u0031:"}, +{"name":"\"\u0061:\"","unit":"\u0061:"}, {"name":"\"::\"","unit":"::"}, -{"name":"\"[1:\"","unit":"[1:"}, -{"name":"\"[a::\"","unit":"[a::"}, -{"name":"\"415-555-\"","unit":"415-555-"}, -{"name":"\"(415) \"","unit":"(415) "}, -{"name":"\"0123 \"","unit":"0123 "}, -{"name":"\"code \"","unit":"code "}, -{"name":"\"OTP code \"","unit":"OTP code "}, -{"name":"\"code is 1\"","unit":"code is 1"}, -{"name":"\"code 1\"","unit":"code 1"}, -{"name":"\"version \"","unit":"version "}, -{"name":"\"error code \"","unit":"error code "}, -{"name":"\"ghs_1_\"","unit":"ghs_1_"}, -{"name":"\"ghs_1_a.\"","unit":"ghs_1_a."}, -{"name":"\"ghs_1_a.a.\"","unit":"ghs_1_a.a."}, -{"name":"\"SG.\"","unit":"SG."}, -{"name":"\"SG.a.\"","unit":"SG.a."}, -{"name":"\"SG.a.a-\"","unit":"SG.a.a-"}, -{"name":"\"SG.a.a_\"","unit":"SG.a.a_"}, -{"name":"\"SG.a.aSG.a.\"","unit":"SG.a.aSG.a."}, -{"name":"\"xoxb-a-\"","unit":"xoxb-a-"}, -{"name":"\"xoxb-a_\"","unit":"xoxb-a_"}, -{"name":"\"xoxb-1-a-\"","unit":"xoxb-1-a-"}, -{"name":"\"xoxb-a--\"","unit":"xoxb-a--"}, -{"name":"\"ops_ey\"","unit":"ops_ey"}, -{"name":"\"ops_eyfQ=\"","unit":"ops_eyfQ="}, -{"name":"\"sk-ant-api03-\"","unit":"sk-ant-api03-"}, -{"name":"\"sk-ant-api03-AA\"","unit":"sk-ant-api03-AA"}, -{"name":"\"glc_\"","unit":"glc_"}, -{"name":"\"glc_A=\"","unit":"glc_A="}, -{"name":"\"tskey-a-\"","unit":"tskey-a-"}, -{"name":"\"tskey-auth-a-\"","unit":"tskey-auth-a-"}, -{"name":"\"dapi\"","unit":"dapi"}, -{"name":"\"dapi-1\"","unit":"dapi-1"}, -{"name":"\"-----BEGIN RSA PRIVATE KEY-----\\n\"","unit":"-----BEGIN RSA PRIVATE KEY-----\n"}, -{"name":"\"-----BEGIN PRIVATE KEY-----\\nMI\"","unit":"-----BEGIN PRIVATE KEY-----\nMI"}, -{"name":"\"-----BEGIN PRIVATE KEY-----\\n-----END\"","unit":"-----BEGIN PRIVATE KEY-----\n-----END"}, -{"name":"\"-----END PRIVATE KEY-----\"","unit":"-----END PRIVATE KEY-----"}, -{"name":"\"https://a:a@\"","unit":"https://a:a@"}, -{"name":"\"https://a:aaaa@a.a\"","unit":"https://a:aaaa@a.a"}, -{"name":"\"ftp://a:b@a-a.\"","unit":"ftp://a:b@a-a."}, -{"name":"\"postgres://\"","unit":"postgres://"}, -{"name":"\"postgres://a:\"","unit":"postgres://a:"}, -{"name":"\"postgres://a:b@\"","unit":"postgres://a:b@"}, -{"name":"\"postgres://a:b@h/\"","unit":"postgres://a:b@h/"}, -{"name":"\"postgres://a:b@h?\"","unit":"postgres://a:b@h?"}, -{"name":"\"mongodb+srv://a:b@\"","unit":"mongodb+srv://a:b@"}, -{"name":"\"jdbc:mysql://a:b@h/d?\"","unit":"jdbc:mysql://a:b@h/d?"}, -{"name":"\"https://hooks.slack.com/services/T\"","unit":"https://hooks.slack.com/services/T"}, -{"name":"\"https://hooks.slack.com/services/Ta/Ba/\"","unit":"https://hooks.slack.com/services/Ta/Ba/"}, -{"name":"\"aws_secret_access_key=\"","unit":"aws_secret_access_key="}, -{"name":"\"aws_account_id:\"","unit":"aws_account_id:"}, -{"name":"\"\\\"aws_secret_access_key\\\": \\\"\"","unit":"\"aws_secret_access_key\": \""}, -{"name":"\"AKIAAAAAAAAAAAAAAAAA\"","unit":"AKIAAAAAAAAAAAAAAAAA"}, -{"name":"\"sk-proj-\"","unit":"sk-proj-"}, -{"name":"\"T3BlbkFJ\"","unit":"T3BlbkFJ"}, -{"name":"\"éghp_\"","unit":"éghp_"}, -{"name":"\"𝐀ghp_\"","unit":"𝐀ghp_"}, -{"name":"\"api_key=\"","unit":"api_key="}, -{"name":"\"api_key:\"","unit":"api_key:"}, -{"name":"\"api_key_\"","unit":"api_key_"}, -{"name":"\"api_key\\\"=\"","unit":"api_key\"="}, -{"name":"\"api_key : \\\"\"","unit":"api_key : \""}, -{"name":"\"access_token=\"","unit":"access_token="}, -{"name":"\"access_token:\"","unit":"access_token:"}, -{"name":"\"access_token_\"","unit":"access_token_"}, -{"name":"\"access_token\\\"=\"","unit":"access_token\"="}, -{"name":"\"access_token : \\\"\"","unit":"access_token : \""}, -{"name":"\"auth_token=\"","unit":"auth_token="}, -{"name":"\"auth_token:\"","unit":"auth_token:"}, -{"name":"\"auth_token_\"","unit":"auth_token_"}, -{"name":"\"auth_token\\\"=\"","unit":"auth_token\"="}, -{"name":"\"auth_token : \\\"\"","unit":"auth_token : \""}, -{"name":"\"password=\"","unit":"password="}, -{"name":"\"password:\"","unit":"password:"}, -{"name":"\"password_\"","unit":"password_"}, -{"name":"\"password\\\"=\"","unit":"password\"="}, -{"name":"\"password : \\\"\"","unit":"password : \""}, -{"name":"\"secret=\"","unit":"secret="}, -{"name":"\"secret:\"","unit":"secret:"}, -{"name":"\"secret_\"","unit":"secret_"}, -{"name":"\"secret\\\"=\"","unit":"secret\"="}, -{"name":"\"secret : \\\"\"","unit":"secret : \""}, -{"name":"\"token:\"","unit":"token:"}, -{"name":"\"token_\"","unit":"token_"}, -{"name":"\"token\\\"=\"","unit":"token\"="}, -{"name":"\"token : \\\"\"","unit":"token : \""}, -{"name":"\"authorization=\"","unit":"authorization="}, -{"name":"\"authorization:\"","unit":"authorization:"}, -{"name":"\"authorization_\"","unit":"authorization_"}, -{"name":"\"authorization\\\"=\"","unit":"authorization\"="}, -{"name":"\"authorization : \\\"\"","unit":"authorization : \""}, -{"name":"\"cookie=\"","unit":"cookie="}, -{"name":"\"cookie:\"","unit":"cookie:"}, -{"name":"\"cookie_\"","unit":"cookie_"}, -{"name":"\"cookie\\\"=\"","unit":"cookie\"="}, -{"name":"\"cookie : \\\"\"","unit":"cookie : \""}, -{"name":"\"credential=\"","unit":"credential="}, -{"name":"\"credential:\"","unit":"credential:"}, -{"name":"\"credential_\"","unit":"credential_"}, -{"name":"\"credential\\\"=\"","unit":"credential\"="}, -{"name":"\"credential : \\\"\"","unit":"credential : \""}, -{"name":"\"private_key=\"","unit":"private_key="}, -{"name":"\"private_key:\"","unit":"private_key:"}, -{"name":"\"private_key_\"","unit":"private_key_"}, -{"name":"\"private_key\\\"=\"","unit":"private_key\"="}, -{"name":"\"private_key : \\\"\"","unit":"private_key : \""}, -{"name":"\"client_key=\"","unit":"client_key="}, -{"name":"\"client_key:\"","unit":"client_key:"}, -{"name":"\"client_key_\"","unit":"client_key_"}, -{"name":"\"client_key\\\"=\"","unit":"client_key\"="}, -{"name":"\"client_key : \\\"\"","unit":"client_key : \""}, -{"name":"\"access_key=\"","unit":"access_key="}, -{"name":"\"access_key:\"","unit":"access_key:"}, -{"name":"\"access_key_\"","unit":"access_key_"}, -{"name":"\"access_key\\\"=\"","unit":"access_key\"="}, -{"name":"\"access_key : \\\"\"","unit":"access_key : \""}, -{"name":"\"passwd=\"","unit":"passwd="}, -{"name":"\"passwd:\"","unit":"passwd:"}, -{"name":"\"passwd_\"","unit":"passwd_"}, -{"name":"\"passwd\\\"=\"","unit":"passwd\"="}, -{"name":"\"passwd : \\\"\"","unit":"passwd : \""}, -{"name":"\"passphrase=\"","unit":"passphrase="}, -{"name":"\"passphrase:\"","unit":"passphrase:"}, -{"name":"\"passphrase_\"","unit":"passphrase_"}, -{"name":"\"passphrase\\\"=\"","unit":"passphrase\"="}, -{"name":"\"passphrase : \\\"\"","unit":"passphrase : \""}, -{"name":"\"signature=\"","unit":"signature="}, -{"name":"\"signature:\"","unit":"signature:"}, -{"name":"\"signature_\"","unit":"signature_"}, -{"name":"\"signature\\\"=\"","unit":"signature\"="}, -{"name":"\"signature : \\\"\"","unit":"signature : \""}, -{"name":"\"card_number=\"","unit":"card_number="}, -{"name":"\"card_number:\"","unit":"card_number:"}, -{"name":"\"card_number_\"","unit":"card_number_"}, -{"name":"\"card_number\\\"=\"","unit":"card_number\"="}, -{"name":"\"card_number : \\\"\"","unit":"card_number : \""}, -{"name":"\"basic_auth=\"","unit":"basic_auth="}, -{"name":"\"basic_auth:\"","unit":"basic_auth:"}, -{"name":"\"basic_auth_\"","unit":"basic_auth_"}, -{"name":"\"basic_auth\\\"=\"","unit":"basic_auth\"="}, -{"name":"\"basic_auth : \\\"\"","unit":"basic_auth : \""}, -{"name":"\"priv_key=\"","unit":"priv_key="}, -{"name":"\"priv_key:\"","unit":"priv_key:"}, -{"name":"\"priv_key_\"","unit":"priv_key_"}, -{"name":"\"priv_key\\\"=\"","unit":"priv_key\"="}, -{"name":"\"priv_key : \\\"\"","unit":"priv_key : \""}, -{"name":"\"signing_key=\"","unit":"signing_key="}, -{"name":"\"signing_key:\"","unit":"signing_key:"}, -{"name":"\"signing_key_\"","unit":"signing_key_"}, -{"name":"\"signing_key\\\"=\"","unit":"signing_key\"="}, -{"name":"\"signing_key : \\\"\"","unit":"signing_key : \""}, -{"name":"\"encryption_key=\"","unit":"encryption_key="}, -{"name":"\"encryption_key:\"","unit":"encryption_key:"}, -{"name":"\"encryption_key_\"","unit":"encryption_key_"}, -{"name":"\"encryption_key\\\"=\"","unit":"encryption_key\"="}, -{"name":"\"encryption_key : \\\"\"","unit":"encryption_key : \""}, -{"name":"\"master_key=\"","unit":"master_key="}, -{"name":"\"master_key:\"","unit":"master_key:"}, -{"name":"\"master_key_\"","unit":"master_key_"}, -{"name":"\"master_key\\\"=\"","unit":"master_key\"="}, -{"name":"\"master_key : \\\"\"","unit":"master_key : \""}, -{"name":"\"ssh_key=\"","unit":"ssh_key="}, -{"name":"\"ssh_key:\"","unit":"ssh_key:"}, -{"name":"\"ssh_key_\"","unit":"ssh_key_"}, -{"name":"\"ssh_key\\\"=\"","unit":"ssh_key\"="}, -{"name":"\"ssh_key : \\\"\"","unit":"ssh_key : \""}, -{"name":"\"service_account_key=\"","unit":"service_account_key="}, -{"name":"\"service_account_key:\"","unit":"service_account_key:"}, -{"name":"\"service_account_key_\"","unit":"service_account_key_"}, -{"name":"\"service_account_key\\\"=\"","unit":"service_account_key\"="}, -{"name":"\"service_account_key : \\\"\"","unit":"service_account_key : \""}, -{"name":"\"dsn=\"","unit":"dsn="}, -{"name":"\"dsn:\"","unit":"dsn:"}, -{"name":"\"dsn_\"","unit":"dsn_"}, -{"name":"\"dsn\\\"=\"","unit":"dsn\"="}, -{"name":"\"dsn : \\\"\"","unit":"dsn : \""}, -{"name":"\"connection_string=\"","unit":"connection_string="}, -{"name":"\"connection_string:\"","unit":"connection_string:"}, -{"name":"\"connection_string_\"","unit":"connection_string_"}, -{"name":"\"connection_string\\\"=\"","unit":"connection_string\"="}, -{"name":"\"connection_string : \\\"\"","unit":"connection_string : \""}, -{"name":"\"recovery_code=\"","unit":"recovery_code="}, -{"name":"\"recovery_code:\"","unit":"recovery_code:"}, -{"name":"\"recovery_code_\"","unit":"recovery_code_"}, -{"name":"\"recovery_code\\\"=\"","unit":"recovery_code\"="}, -{"name":"\"recovery_code : \\\"\"","unit":"recovery_code : \""}, -{"name":"\"pwd=\"","unit":"pwd="}, -{"name":"\"pwd:\"","unit":"pwd:"}, -{"name":"\"pwd_\"","unit":"pwd_"}, -{"name":"\"pwd\\\"=\"","unit":"pwd\"="}, -{"name":"\"pwd : \\\"\"","unit":"pwd : \""}, -{"name":"\"client_secret=\"","unit":"client_secret="}, -{"name":"\"client_secret:\"","unit":"client_secret:"}, -{"name":"\"client_secret_\"","unit":"client_secret_"}, -{"name":"\"client_secret\\\"=\"","unit":"client_secret\"="}, -{"name":"\"client_secret : \\\"\"","unit":"client_secret : \""}, -{"name":"\"credentials=\"","unit":"credentials="}, -{"name":"\"credentials:\"","unit":"credentials:"}, -{"name":"\"credentials_\"","unit":"credentials_"}, -{"name":"\"credentials\\\"=\"","unit":"credentials\"="}, -{"name":"\"credentials : \\\"\"","unit":"credentials : \""}, -{"name":"\"bearer=\"","unit":"bearer="}, -{"name":"\"bearer:\"","unit":"bearer:"}, -{"name":"\"bearer_\"","unit":"bearer_"}, -{"name":"\"bearer\\\"=\"","unit":"bearer\"="}, -{"name":"\"bearer : \\\"\"","unit":"bearer : \""}, -{"name":"\"npm_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"npm_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"npm_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"npm_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"npm_\"","unit":"npm_"}, -{"name":"\"shppa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","unit":"shppa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, -{"name":"\"shppa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","unit":"shppa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, -{"name":"\"sk_live_aaaaaaaaaaaaaaaaaaaaaaaa\"","unit":"sk_live_aaaaaaaaaaaaaaaaaaaaaaaa"}, -{"name":"\"sk_live_aaaaaaaaaaaaaaaaaaaaaaa\"","unit":"sk_live_aaaaaaaaaaaaaaaaaaaaaaa"}, -{"name":"\"ghp_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"ghp_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"ghp_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"ghp_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"github_pat_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"github_pat_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"github_pat_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"github_pat_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"ghs_0_A.A.A\"","unit":"ghs_0_A.A.A"}, -{"name":"\"ghs_0_A.A.\"","unit":"ghs_0_A.A."}, -{"name":"\"ghs_\"","unit":"ghs_"}, +{"name":"\"[\u0031:\"","unit":"[\u0031:"}, +{"name":"\"[\u0061::\"","unit":"[\u0061::"}, +{"name":"\"\u0034\u0031\u0035\u002d\u0035\u0035\u0035\u002d\"","unit":"\u0034\u0031\u0035\u002d\u0035\u0035\u0035\u002d"}, +{"name":"\"(\u0034\u0031\u0035) \"","unit":"(\u0034\u0031\u0035) "}, +{"name":"\"\u0030\u0031\u0032\u0033 \"","unit":"\u0030\u0031\u0032\u0033 "}, +{"name":"\"\u0063\u006f\u0064\u0065 \"","unit":"\u0063\u006f\u0064\u0065 "}, +{"name":"\"\u004f\u0054\u0050 \u0063\u006f\u0064\u0065 \"","unit":"\u004f\u0054\u0050 \u0063\u006f\u0064\u0065 "}, +{"name":"\"\u0063\u006f\u0064\u0065 \u0069\u0073 \u0031\"","unit":"\u0063\u006f\u0064\u0065 \u0069\u0073 \u0031"}, +{"name":"\"\u0063\u006f\u0064\u0065 \u0031\"","unit":"\u0063\u006f\u0064\u0065 \u0031"}, +{"name":"\"\u0076\u0065\u0072\u0073\u0069\u006f\u006e \"","unit":"\u0076\u0065\u0072\u0073\u0069\u006f\u006e "}, +{"name":"\"\u0065\u0072\u0072\u006f\u0072 \u0063\u006f\u0064\u0065 \"","unit":"\u0065\u0072\u0072\u006f\u0072 \u0063\u006f\u0064\u0065 "}, +{"name":"\"\u0044\u0045\u0030\u0030 \u0030\u0030\u0030\u0030 \u0030\u0030\u0030\u0030 \u0030\u0030\u0030\u0030 \u0030\u0030\u0030\u0030 \u0030\u0030 \"","unit":"\u0044\u0045\u0030\u0030 \u0030\u0030\u0030\u0030 \u0030\u0030\u0030\u0030 \u0030\u0030\u0030\u0030 \u0030\u0030\u0030\u0030 \u0030\u0030 "}, +{"name":"\"\u0054\u0052\u0030\u0030 \u0044\u0045\u0038\u0039 \u0033\u0037\u0030\u0034 \u0030\u0030\u0034\u0034 \u0030\u0035\u0033\u0032 \u0030\u0031\u0033\u0030 \u0030\u0030 \"","unit":"\u0054\u0052\u0030\u0030 \u0044\u0045\u0038\u0039 \u0033\u0037\u0030\u0034 \u0030\u0030\u0034\u0034 \u0030\u0035\u0033\u0032 \u0030\u0031\u0033\u0030 \u0030\u0030 "}, +{"name":"\"\u0034\u0031\u0031\u0031 \u0031\u0031\u0031\u0031 \u0031\u0031\u0031\u0031 \u0031\u0031\u0031\u0032 \"","unit":"\u0034\u0031\u0031\u0031 \u0031\u0031\u0031\u0031 \u0031\u0031\u0031\u0031 \u0031\u0031\u0031\u0032 "}, +{"name":"\"\u0030\u0030\u0034\u0039 \u0030\u0030\u0030\u0030 \u0030\u0030\u0030\u0030 \u0030\u0030\u0030\u0030 \"","unit":"\u0030\u0030\u0034\u0039 \u0030\u0030\u0030\u0030 \u0030\u0030\u0030\u0030 \u0030\u0030\u0030\u0030 "}, +{"name":"\"\u0066\u0065\u0038\u0030::\u0031%\u0065\u006e\u0030.\"","unit":"\u0066\u0065\u0038\u0030::\u0031%\u0065\u006e\u0030."}, +{"name":"\"\u004f\u0054\u0050 \u0063\u006f\u0064\u0065: [\u0052\u0045\u0044\u0041\u0043\u0054\u0045\u0044:\u0073\u0065\u0063\u0072\u0065\u0074]\u0034\u0038\u0032\u0039\u0031\u0033 \"","unit":"\u004f\u0054\u0050 \u0063\u006f\u0064\u0065: [\u0052\u0045\u0044\u0041\u0043\u0054\u0045\u0044:\u0073\u0065\u0063\u0072\u0065\u0074]\u0034\u0038\u0032\u0039\u0031\u0033 "}, +{"name":"\"\u006d\u006f\u0074 \u0064\u0065 \u0070\u0061\u0073\u0073\u0065= \"","unit":"\u006d\u006f\u0074 \u0064\u0065 \u0070\u0061\u0073\u0073\u0065= "}, +{"name":"\"\u0073\u0065\u0065\u0064=\\\"\u0078\\\" \"","unit":"\u0073\u0065\u0065\u0064=\"\u0078\" "}, +{"name":"\"\u0061\u0062\u0061\u006e\u0064\u006f\u006e \"","unit":"\u0061\u0062\u0061\u006e\u0064\u006f\u006e "}, +{"name":"\"\u0067\u0068\u0073\u005f\u0031\u005f\"","unit":"\u0067\u0068\u0073\u005f\u0031\u005f"}, +{"name":"\"\u0067\u0068\u0073\u005f\u0031\u005f\u0061.\"","unit":"\u0067\u0068\u0073\u005f\u0031\u005f\u0061."}, +{"name":"\"\u0067\u0068\u0073\u005f\u0031\u005f\u0061.\u0061.\"","unit":"\u0067\u0068\u0073\u005f\u0031\u005f\u0061.\u0061."}, +{"name":"\"\u0053\u0047.\"","unit":"\u0053\u0047."}, +{"name":"\"\u0053\u0047.\u0061.\"","unit":"\u0053\u0047.\u0061."}, +{"name":"\"\u0053\u0047.\u0061.\u0061\u002d\"","unit":"\u0053\u0047.\u0061.\u0061\u002d"}, +{"name":"\"\u0053\u0047.\u0061.\u0061\u005f\"","unit":"\u0053\u0047.\u0061.\u0061\u005f"}, +{"name":"\"\u0053\u0047.\u0061.\u0061\u0053\u0047.\u0061.\"","unit":"\u0053\u0047.\u0061.\u0061\u0053\u0047.\u0061."}, +{"name":"\"\u0078\u006f\u0078\u0062\u002d\u0061\u002d\"","unit":"\u0078\u006f\u0078\u0062\u002d\u0061\u002d"}, +{"name":"\"\u0078\u006f\u0078\u0062\u002d\u0061\u005f\"","unit":"\u0078\u006f\u0078\u0062\u002d\u0061\u005f"}, +{"name":"\"\u0078\u006f\u0078\u0062\u002d\u0031\u002d\u0061\u002d\"","unit":"\u0078\u006f\u0078\u0062\u002d\u0031\u002d\u0061\u002d"}, +{"name":"\"\u0078\u006f\u0078\u0062\u002d\u0061\u002d\u002d\"","unit":"\u0078\u006f\u0078\u0062\u002d\u0061\u002d\u002d"}, +{"name":"\"\u006f\u0070\u0073\u005f\u0065\u0079\"","unit":"\u006f\u0070\u0073\u005f\u0065\u0079"}, +{"name":"\"\u006f\u0070\u0073\u005f\u0065\u0079\u0066\u0051=\"","unit":"\u006f\u0070\u0073\u005f\u0065\u0079\u0066\u0051="}, +{"name":"\"\u0073\u006b\u002d\u0061\u006e\u0074\u002d\u0061\u0070\u0069\u0030\u0033\u002d\"","unit":"\u0073\u006b\u002d\u0061\u006e\u0074\u002d\u0061\u0070\u0069\u0030\u0033\u002d"}, +{"name":"\"\u0073\u006b\u002d\u0061\u006e\u0074\u002d\u0061\u0070\u0069\u0030\u0033\u002d\u0041\u0041\"","unit":"\u0073\u006b\u002d\u0061\u006e\u0074\u002d\u0061\u0070\u0069\u0030\u0033\u002d\u0041\u0041"}, +{"name":"\"\u0067\u006c\u0063\u005f\"","unit":"\u0067\u006c\u0063\u005f"}, +{"name":"\"\u0067\u006c\u0063\u005f\u0041=\"","unit":"\u0067\u006c\u0063\u005f\u0041="}, +{"name":"\"\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u002d\"","unit":"\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u002d"}, +{"name":"\"\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0075\u0074\u0068\u002d\u0061\u002d\"","unit":"\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0075\u0074\u0068\u002d\u0061\u002d"}, +{"name":"\"\u0064\u0061\u0070\u0069\"","unit":"\u0064\u0061\u0070\u0069"}, +{"name":"\"\u0064\u0061\u0070\u0069\u002d\u0031\"","unit":"\u0064\u0061\u0070\u0069\u002d\u0031"}, +{"name":"\"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \u0052\u0053\u0041 \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\\\u006e\"","unit":"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \u0052\u0053\u0041 \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\n"}, +{"name":"\"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\\\u006e\u004d\u0049\"","unit":"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\n\u004d\u0049"}, +{"name":"\"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\\\u006e\u002d\u002d\u002d\u002d\u002d\u0045\u004e\u0044\"","unit":"\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\n\u002d\u002d\u002d\u002d\u002d\u0045\u004e\u0044"}, +{"name":"\"\u002d\u002d\u002d\u002d\u002d\u0045\u004e\u0044 \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\"","unit":"\u002d\u002d\u002d\u002d\u002d\u0045\u004e\u0044 \u0050\u0052\u0049\u0056\u0041\u0054\u0045 \u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d"}, +{"name":"\"\u0068\u0074\u0074\u0070\u0073://\u0061:\u0061@\"","unit":"\u0068\u0074\u0074\u0070\u0073://\u0061:\u0061@"}, +{"name":"\"\u0068\u0074\u0074\u0070\u0073://\u0061:\u0061\u0061\u0061\u0061@\u0061.\u0061\"","unit":"\u0068\u0074\u0074\u0070\u0073://\u0061:\u0061\u0061\u0061\u0061@\u0061.\u0061"}, +{"name":"\"\u0066\u0074\u0070://\u0061:\u0062@\u0061\u002d\u0061.\"","unit":"\u0066\u0074\u0070://\u0061:\u0062@\u0061\u002d\u0061."}, +{"name":"\"\u0070\u006f\u0073\u0074\u0067\u0072\u0065\u0073://\"","unit":"\u0070\u006f\u0073\u0074\u0067\u0072\u0065\u0073://"}, +{"name":"\"\u0070\u006f\u0073\u0074\u0067\u0072\u0065\u0073://\u0061:\"","unit":"\u0070\u006f\u0073\u0074\u0067\u0072\u0065\u0073://\u0061:"}, +{"name":"\"\u0070\u006f\u0073\u0074\u0067\u0072\u0065\u0073://\u0061:\u0062@\"","unit":"\u0070\u006f\u0073\u0074\u0067\u0072\u0065\u0073://\u0061:\u0062@"}, +{"name":"\"\u0070\u006f\u0073\u0074\u0067\u0072\u0065\u0073://\u0061:\u0062@\u0068/\"","unit":"\u0070\u006f\u0073\u0074\u0067\u0072\u0065\u0073://\u0061:\u0062@\u0068/"}, +{"name":"\"\u0070\u006f\u0073\u0074\u0067\u0072\u0065\u0073://\u0061:\u0062@\u0068?\"","unit":"\u0070\u006f\u0073\u0074\u0067\u0072\u0065\u0073://\u0061:\u0062@\u0068?"}, +{"name":"\"\u006d\u006f\u006e\u0067\u006f\u0064\u0062+\u0073\u0072\u0076://\u0061:\u0062@\"","unit":"\u006d\u006f\u006e\u0067\u006f\u0064\u0062+\u0073\u0072\u0076://\u0061:\u0062@"}, +{"name":"\"\u006a\u0064\u0062\u0063:\u006d\u0079\u0073\u0071\u006c://\u0061:\u0062@\u0068/\u0064?\"","unit":"\u006a\u0064\u0062\u0063:\u006d\u0079\u0073\u0071\u006c://\u0061:\u0062@\u0068/\u0064?"}, +{"name":"\"\u0068\u0074\u0074\u0070\u0073://\u0068\u006f\u006f\u006b\u0073.\u0073\u006c\u0061\u0063\u006b.\u0063\u006f\u006d/\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u0073/\u0054\"","unit":"\u0068\u0074\u0074\u0070\u0073://\u0068\u006f\u006f\u006b\u0073.\u0073\u006c\u0061\u0063\u006b.\u0063\u006f\u006d/\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u0073/\u0054"}, +{"name":"\"\u0068\u0074\u0074\u0070\u0073://\u0068\u006f\u006f\u006b\u0073.\u0073\u006c\u0061\u0063\u006b.\u0063\u006f\u006d/\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u0073/\u0054\u0061/\u0042\u0061/\"","unit":"\u0068\u0074\u0074\u0070\u0073://\u0068\u006f\u006f\u006b\u0073.\u0073\u006c\u0061\u0063\u006b.\u0063\u006f\u006d/\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u0073/\u0054\u0061/\u0042\u0061/"}, +{"name":"\"\u0061\u0077\u0073\u005f\u0073\u0065\u0063\u0072\u0065\u0074\u005f\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079=\"","unit":"\u0061\u0077\u0073\u005f\u0073\u0065\u0063\u0072\u0065\u0074\u005f\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079="}, +{"name":"\"\u0061\u0077\u0073\u005f\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u0069\u0064:\"","unit":"\u0061\u0077\u0073\u005f\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u0069\u0064:"}, +{"name":"\"\\\"\u0061\u0077\u0073\u005f\u0073\u0065\u0063\u0072\u0065\u0074\u005f\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079\\\": \\\"\"","unit":"\"\u0061\u0077\u0073\u005f\u0073\u0065\u0063\u0072\u0065\u0074\u005f\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079\": \""}, +{"name":"\"\u0041\u004b\u0049\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0041\u004b\u0049\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0073\u006b\u002d\u0070\u0072\u006f\u006a\u002d\"","unit":"\u0073\u006b\u002d\u0070\u0072\u006f\u006a\u002d"}, +{"name":"\"\u0054\u0033\u0042\u006c\u0062\u006b\u0046\u004a\"","unit":"\u0054\u0033\u0042\u006c\u0062\u006b\u0046\u004a"}, +{"name":"\"é\u0067\u0068\u0070\u005f\"","unit":"é\u0067\u0068\u0070\u005f"}, +{"name":"\"𝐀\u0067\u0068\u0070\u005f\"","unit":"𝐀\u0067\u0068\u0070\u005f"}, +{"name":"\"\u0061\u0070\u0069\u005f\u006b\u0065\u0079=\"","unit":"\u0061\u0070\u0069\u005f\u006b\u0065\u0079="}, +{"name":"\"\u0061\u0070\u0069\u005f\u006b\u0065\u0079:\"","unit":"\u0061\u0070\u0069\u005f\u006b\u0065\u0079:"}, +{"name":"\"\u0061\u0070\u0069\u005f\u006b\u0065\u0079\u005f\"","unit":"\u0061\u0070\u0069\u005f\u006b\u0065\u0079\u005f"}, +{"name":"\"\u0061\u0070\u0069\u005f\u006b\u0065\u0079\\\"=\"","unit":"\u0061\u0070\u0069\u005f\u006b\u0065\u0079\"="}, +{"name":"\"\u0061\u0070\u0069\u005f\u006b\u0065\u0079 : \\\"\"","unit":"\u0061\u0070\u0069\u005f\u006b\u0065\u0079 : \""}, +{"name":"\"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u0074\u006f\u006b\u0065\u006e=\"","unit":"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u0074\u006f\u006b\u0065\u006e="}, +{"name":"\"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u0074\u006f\u006b\u0065\u006e:\"","unit":"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u0074\u006f\u006b\u0065\u006e:"}, +{"name":"\"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u0074\u006f\u006b\u0065\u006e\u005f\"","unit":"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u0074\u006f\u006b\u0065\u006e\u005f"}, +{"name":"\"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u0074\u006f\u006b\u0065\u006e\\\"=\"","unit":"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u0074\u006f\u006b\u0065\u006e\"="}, +{"name":"\"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u0074\u006f\u006b\u0065\u006e : \\\"\"","unit":"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u0074\u006f\u006b\u0065\u006e : \""}, +{"name":"\"\u0061\u0075\u0074\u0068\u005f\u0074\u006f\u006b\u0065\u006e=\"","unit":"\u0061\u0075\u0074\u0068\u005f\u0074\u006f\u006b\u0065\u006e="}, +{"name":"\"\u0061\u0075\u0074\u0068\u005f\u0074\u006f\u006b\u0065\u006e:\"","unit":"\u0061\u0075\u0074\u0068\u005f\u0074\u006f\u006b\u0065\u006e:"}, +{"name":"\"\u0061\u0075\u0074\u0068\u005f\u0074\u006f\u006b\u0065\u006e\u005f\"","unit":"\u0061\u0075\u0074\u0068\u005f\u0074\u006f\u006b\u0065\u006e\u005f"}, +{"name":"\"\u0061\u0075\u0074\u0068\u005f\u0074\u006f\u006b\u0065\u006e\\\"=\"","unit":"\u0061\u0075\u0074\u0068\u005f\u0074\u006f\u006b\u0065\u006e\"="}, +{"name":"\"\u0061\u0075\u0074\u0068\u005f\u0074\u006f\u006b\u0065\u006e : \\\"\"","unit":"\u0061\u0075\u0074\u0068\u005f\u0074\u006f\u006b\u0065\u006e : \""}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064=\"","unit":"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064="}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064:\"","unit":"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064:"}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064\u005f\"","unit":"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064\u005f"}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064\\\"=\"","unit":"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064\"="}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064 : \\\"\"","unit":"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064 : \""}, +{"name":"\"\u0073\u0065\u0063\u0072\u0065\u0074=\"","unit":"\u0073\u0065\u0063\u0072\u0065\u0074="}, +{"name":"\"\u0073\u0065\u0063\u0072\u0065\u0074:\"","unit":"\u0073\u0065\u0063\u0072\u0065\u0074:"}, +{"name":"\"\u0073\u0065\u0063\u0072\u0065\u0074\u005f\"","unit":"\u0073\u0065\u0063\u0072\u0065\u0074\u005f"}, +{"name":"\"\u0073\u0065\u0063\u0072\u0065\u0074\\\"=\"","unit":"\u0073\u0065\u0063\u0072\u0065\u0074\"="}, +{"name":"\"\u0073\u0065\u0063\u0072\u0065\u0074 : \\\"\"","unit":"\u0073\u0065\u0063\u0072\u0065\u0074 : \""}, +{"name":"\"\u0074\u006f\u006b\u0065\u006e:\"","unit":"\u0074\u006f\u006b\u0065\u006e:"}, +{"name":"\"\u0074\u006f\u006b\u0065\u006e\u005f\"","unit":"\u0074\u006f\u006b\u0065\u006e\u005f"}, +{"name":"\"\u0074\u006f\u006b\u0065\u006e\\\"=\"","unit":"\u0074\u006f\u006b\u0065\u006e\"="}, +{"name":"\"\u0074\u006f\u006b\u0065\u006e : \\\"\"","unit":"\u0074\u006f\u006b\u0065\u006e : \""}, +{"name":"\"\u0061\u0075\u0074\u0068\u006f\u0072\u0069\u007a\u0061\u0074\u0069\u006f\u006e=\"","unit":"\u0061\u0075\u0074\u0068\u006f\u0072\u0069\u007a\u0061\u0074\u0069\u006f\u006e="}, +{"name":"\"\u0061\u0075\u0074\u0068\u006f\u0072\u0069\u007a\u0061\u0074\u0069\u006f\u006e:\"","unit":"\u0061\u0075\u0074\u0068\u006f\u0072\u0069\u007a\u0061\u0074\u0069\u006f\u006e:"}, +{"name":"\"\u0061\u0075\u0074\u0068\u006f\u0072\u0069\u007a\u0061\u0074\u0069\u006f\u006e\u005f\"","unit":"\u0061\u0075\u0074\u0068\u006f\u0072\u0069\u007a\u0061\u0074\u0069\u006f\u006e\u005f"}, +{"name":"\"\u0061\u0075\u0074\u0068\u006f\u0072\u0069\u007a\u0061\u0074\u0069\u006f\u006e\\\"=\"","unit":"\u0061\u0075\u0074\u0068\u006f\u0072\u0069\u007a\u0061\u0074\u0069\u006f\u006e\"="}, +{"name":"\"\u0061\u0075\u0074\u0068\u006f\u0072\u0069\u007a\u0061\u0074\u0069\u006f\u006e : \\\"\"","unit":"\u0061\u0075\u0074\u0068\u006f\u0072\u0069\u007a\u0061\u0074\u0069\u006f\u006e : \""}, +{"name":"\"\u0063\u006f\u006f\u006b\u0069\u0065=\"","unit":"\u0063\u006f\u006f\u006b\u0069\u0065="}, +{"name":"\"\u0063\u006f\u006f\u006b\u0069\u0065:\"","unit":"\u0063\u006f\u006f\u006b\u0069\u0065:"}, +{"name":"\"\u0063\u006f\u006f\u006b\u0069\u0065\u005f\"","unit":"\u0063\u006f\u006f\u006b\u0069\u0065\u005f"}, +{"name":"\"\u0063\u006f\u006f\u006b\u0069\u0065\\\"=\"","unit":"\u0063\u006f\u006f\u006b\u0069\u0065\"="}, +{"name":"\"\u0063\u006f\u006f\u006b\u0069\u0065 : \\\"\"","unit":"\u0063\u006f\u006f\u006b\u0069\u0065 : \""}, +{"name":"\"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c=\"","unit":"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c="}, +{"name":"\"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c:\"","unit":"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c:"}, +{"name":"\"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\u005f\"","unit":"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\u005f"}, +{"name":"\"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\\\"=\"","unit":"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\"="}, +{"name":"\"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c : \\\"\"","unit":"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c : \""}, +{"name":"\"\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u005f\u006b\u0065\u0079=\"","unit":"\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u005f\u006b\u0065\u0079="}, +{"name":"\"\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u005f\u006b\u0065\u0079:\"","unit":"\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u005f\u006b\u0065\u0079:"}, +{"name":"\"\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u005f\u006b\u0065\u0079\u005f\"","unit":"\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u005f\u006b\u0065\u0079\u005f"}, +{"name":"\"\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u005f\u006b\u0065\u0079\\\"=\"","unit":"\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u005f\u006b\u0065\u0079\"="}, +{"name":"\"\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u005f\u006b\u0065\u0079 : \\\"\"","unit":"\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u005f\u006b\u0065\u0079 : \""}, +{"name":"\"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u006b\u0065\u0079=\"","unit":"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u006b\u0065\u0079="}, +{"name":"\"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u006b\u0065\u0079:\"","unit":"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u006b\u0065\u0079:"}, +{"name":"\"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u006b\u0065\u0079\u005f\"","unit":"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u006b\u0065\u0079\u005f"}, +{"name":"\"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u006b\u0065\u0079\\\"=\"","unit":"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u006b\u0065\u0079\"="}, +{"name":"\"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u006b\u0065\u0079 : \\\"\"","unit":"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u006b\u0065\u0079 : \""}, +{"name":"\"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079=\"","unit":"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079="}, +{"name":"\"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079:\"","unit":"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079:"}, +{"name":"\"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079\u005f\"","unit":"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079\u005f"}, +{"name":"\"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079\\\"=\"","unit":"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079\"="}, +{"name":"\"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079 : \\\"\"","unit":"\u0061\u0063\u0063\u0065\u0073\u0073\u005f\u006b\u0065\u0079 : \""}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u0064=\"","unit":"\u0070\u0061\u0073\u0073\u0077\u0064="}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u0064:\"","unit":"\u0070\u0061\u0073\u0073\u0077\u0064:"}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u0064\u005f\"","unit":"\u0070\u0061\u0073\u0073\u0077\u0064\u005f"}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u0064\\\"=\"","unit":"\u0070\u0061\u0073\u0073\u0077\u0064\"="}, +{"name":"\"\u0070\u0061\u0073\u0073\u0077\u0064 : \\\"\"","unit":"\u0070\u0061\u0073\u0073\u0077\u0064 : \""}, +{"name":"\"\u0070\u0061\u0073\u0073\u0070\u0068\u0072\u0061\u0073\u0065=\"","unit":"\u0070\u0061\u0073\u0073\u0070\u0068\u0072\u0061\u0073\u0065="}, +{"name":"\"\u0070\u0061\u0073\u0073\u0070\u0068\u0072\u0061\u0073\u0065:\"","unit":"\u0070\u0061\u0073\u0073\u0070\u0068\u0072\u0061\u0073\u0065:"}, +{"name":"\"\u0070\u0061\u0073\u0073\u0070\u0068\u0072\u0061\u0073\u0065\u005f\"","unit":"\u0070\u0061\u0073\u0073\u0070\u0068\u0072\u0061\u0073\u0065\u005f"}, +{"name":"\"\u0070\u0061\u0073\u0073\u0070\u0068\u0072\u0061\u0073\u0065\\\"=\"","unit":"\u0070\u0061\u0073\u0073\u0070\u0068\u0072\u0061\u0073\u0065\"="}, +{"name":"\"\u0070\u0061\u0073\u0073\u0070\u0068\u0072\u0061\u0073\u0065 : \\\"\"","unit":"\u0070\u0061\u0073\u0073\u0070\u0068\u0072\u0061\u0073\u0065 : \""}, +{"name":"\"\u0073\u0069\u0067\u006e\u0061\u0074\u0075\u0072\u0065=\"","unit":"\u0073\u0069\u0067\u006e\u0061\u0074\u0075\u0072\u0065="}, +{"name":"\"\u0073\u0069\u0067\u006e\u0061\u0074\u0075\u0072\u0065:\"","unit":"\u0073\u0069\u0067\u006e\u0061\u0074\u0075\u0072\u0065:"}, +{"name":"\"\u0073\u0069\u0067\u006e\u0061\u0074\u0075\u0072\u0065\u005f\"","unit":"\u0073\u0069\u0067\u006e\u0061\u0074\u0075\u0072\u0065\u005f"}, +{"name":"\"\u0073\u0069\u0067\u006e\u0061\u0074\u0075\u0072\u0065\\\"=\"","unit":"\u0073\u0069\u0067\u006e\u0061\u0074\u0075\u0072\u0065\"="}, +{"name":"\"\u0073\u0069\u0067\u006e\u0061\u0074\u0075\u0072\u0065 : \\\"\"","unit":"\u0073\u0069\u0067\u006e\u0061\u0074\u0075\u0072\u0065 : \""}, +{"name":"\"\u0063\u0061\u0072\u0064\u005f\u006e\u0075\u006d\u0062\u0065\u0072=\"","unit":"\u0063\u0061\u0072\u0064\u005f\u006e\u0075\u006d\u0062\u0065\u0072="}, +{"name":"\"\u0063\u0061\u0072\u0064\u005f\u006e\u0075\u006d\u0062\u0065\u0072:\"","unit":"\u0063\u0061\u0072\u0064\u005f\u006e\u0075\u006d\u0062\u0065\u0072:"}, +{"name":"\"\u0063\u0061\u0072\u0064\u005f\u006e\u0075\u006d\u0062\u0065\u0072\u005f\"","unit":"\u0063\u0061\u0072\u0064\u005f\u006e\u0075\u006d\u0062\u0065\u0072\u005f"}, +{"name":"\"\u0063\u0061\u0072\u0064\u005f\u006e\u0075\u006d\u0062\u0065\u0072\\\"=\"","unit":"\u0063\u0061\u0072\u0064\u005f\u006e\u0075\u006d\u0062\u0065\u0072\"="}, +{"name":"\"\u0063\u0061\u0072\u0064\u005f\u006e\u0075\u006d\u0062\u0065\u0072 : \\\"\"","unit":"\u0063\u0061\u0072\u0064\u005f\u006e\u0075\u006d\u0062\u0065\u0072 : \""}, +{"name":"\"\u0062\u0061\u0073\u0069\u0063\u005f\u0061\u0075\u0074\u0068=\"","unit":"\u0062\u0061\u0073\u0069\u0063\u005f\u0061\u0075\u0074\u0068="}, +{"name":"\"\u0062\u0061\u0073\u0069\u0063\u005f\u0061\u0075\u0074\u0068:\"","unit":"\u0062\u0061\u0073\u0069\u0063\u005f\u0061\u0075\u0074\u0068:"}, +{"name":"\"\u0062\u0061\u0073\u0069\u0063\u005f\u0061\u0075\u0074\u0068\u005f\"","unit":"\u0062\u0061\u0073\u0069\u0063\u005f\u0061\u0075\u0074\u0068\u005f"}, +{"name":"\"\u0062\u0061\u0073\u0069\u0063\u005f\u0061\u0075\u0074\u0068\\\"=\"","unit":"\u0062\u0061\u0073\u0069\u0063\u005f\u0061\u0075\u0074\u0068\"="}, +{"name":"\"\u0062\u0061\u0073\u0069\u0063\u005f\u0061\u0075\u0074\u0068 : \\\"\"","unit":"\u0062\u0061\u0073\u0069\u0063\u005f\u0061\u0075\u0074\u0068 : \""}, +{"name":"\"\u0070\u0072\u0069\u0076\u005f\u006b\u0065\u0079=\"","unit":"\u0070\u0072\u0069\u0076\u005f\u006b\u0065\u0079="}, +{"name":"\"\u0070\u0072\u0069\u0076\u005f\u006b\u0065\u0079:\"","unit":"\u0070\u0072\u0069\u0076\u005f\u006b\u0065\u0079:"}, +{"name":"\"\u0070\u0072\u0069\u0076\u005f\u006b\u0065\u0079\u005f\"","unit":"\u0070\u0072\u0069\u0076\u005f\u006b\u0065\u0079\u005f"}, +{"name":"\"\u0070\u0072\u0069\u0076\u005f\u006b\u0065\u0079\\\"=\"","unit":"\u0070\u0072\u0069\u0076\u005f\u006b\u0065\u0079\"="}, +{"name":"\"\u0070\u0072\u0069\u0076\u005f\u006b\u0065\u0079 : \\\"\"","unit":"\u0070\u0072\u0069\u0076\u005f\u006b\u0065\u0079 : \""}, +{"name":"\"\u0073\u0069\u0067\u006e\u0069\u006e\u0067\u005f\u006b\u0065\u0079=\"","unit":"\u0073\u0069\u0067\u006e\u0069\u006e\u0067\u005f\u006b\u0065\u0079="}, +{"name":"\"\u0073\u0069\u0067\u006e\u0069\u006e\u0067\u005f\u006b\u0065\u0079:\"","unit":"\u0073\u0069\u0067\u006e\u0069\u006e\u0067\u005f\u006b\u0065\u0079:"}, +{"name":"\"\u0073\u0069\u0067\u006e\u0069\u006e\u0067\u005f\u006b\u0065\u0079\u005f\"","unit":"\u0073\u0069\u0067\u006e\u0069\u006e\u0067\u005f\u006b\u0065\u0079\u005f"}, +{"name":"\"\u0073\u0069\u0067\u006e\u0069\u006e\u0067\u005f\u006b\u0065\u0079\\\"=\"","unit":"\u0073\u0069\u0067\u006e\u0069\u006e\u0067\u005f\u006b\u0065\u0079\"="}, +{"name":"\"\u0073\u0069\u0067\u006e\u0069\u006e\u0067\u005f\u006b\u0065\u0079 : \\\"\"","unit":"\u0073\u0069\u0067\u006e\u0069\u006e\u0067\u005f\u006b\u0065\u0079 : \""}, +{"name":"\"\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0069\u006f\u006e\u005f\u006b\u0065\u0079=\"","unit":"\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0069\u006f\u006e\u005f\u006b\u0065\u0079="}, +{"name":"\"\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0069\u006f\u006e\u005f\u006b\u0065\u0079:\"","unit":"\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0069\u006f\u006e\u005f\u006b\u0065\u0079:"}, +{"name":"\"\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0069\u006f\u006e\u005f\u006b\u0065\u0079\u005f\"","unit":"\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0069\u006f\u006e\u005f\u006b\u0065\u0079\u005f"}, +{"name":"\"\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0069\u006f\u006e\u005f\u006b\u0065\u0079\\\"=\"","unit":"\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0069\u006f\u006e\u005f\u006b\u0065\u0079\"="}, +{"name":"\"\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0069\u006f\u006e\u005f\u006b\u0065\u0079 : \\\"\"","unit":"\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0069\u006f\u006e\u005f\u006b\u0065\u0079 : \""}, +{"name":"\"\u006d\u0061\u0073\u0074\u0065\u0072\u005f\u006b\u0065\u0079=\"","unit":"\u006d\u0061\u0073\u0074\u0065\u0072\u005f\u006b\u0065\u0079="}, +{"name":"\"\u006d\u0061\u0073\u0074\u0065\u0072\u005f\u006b\u0065\u0079:\"","unit":"\u006d\u0061\u0073\u0074\u0065\u0072\u005f\u006b\u0065\u0079:"}, +{"name":"\"\u006d\u0061\u0073\u0074\u0065\u0072\u005f\u006b\u0065\u0079\u005f\"","unit":"\u006d\u0061\u0073\u0074\u0065\u0072\u005f\u006b\u0065\u0079\u005f"}, +{"name":"\"\u006d\u0061\u0073\u0074\u0065\u0072\u005f\u006b\u0065\u0079\\\"=\"","unit":"\u006d\u0061\u0073\u0074\u0065\u0072\u005f\u006b\u0065\u0079\"="}, +{"name":"\"\u006d\u0061\u0073\u0074\u0065\u0072\u005f\u006b\u0065\u0079 : \\\"\"","unit":"\u006d\u0061\u0073\u0074\u0065\u0072\u005f\u006b\u0065\u0079 : \""}, +{"name":"\"\u0073\u0073\u0068\u005f\u006b\u0065\u0079=\"","unit":"\u0073\u0073\u0068\u005f\u006b\u0065\u0079="}, +{"name":"\"\u0073\u0073\u0068\u005f\u006b\u0065\u0079:\"","unit":"\u0073\u0073\u0068\u005f\u006b\u0065\u0079:"}, +{"name":"\"\u0073\u0073\u0068\u005f\u006b\u0065\u0079\u005f\"","unit":"\u0073\u0073\u0068\u005f\u006b\u0065\u0079\u005f"}, +{"name":"\"\u0073\u0073\u0068\u005f\u006b\u0065\u0079\\\"=\"","unit":"\u0073\u0073\u0068\u005f\u006b\u0065\u0079\"="}, +{"name":"\"\u0073\u0073\u0068\u005f\u006b\u0065\u0079 : \\\"\"","unit":"\u0073\u0073\u0068\u005f\u006b\u0065\u0079 : \""}, +{"name":"\"\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u005f\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u006b\u0065\u0079=\"","unit":"\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u005f\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u006b\u0065\u0079="}, +{"name":"\"\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u005f\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u006b\u0065\u0079:\"","unit":"\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u005f\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u006b\u0065\u0079:"}, +{"name":"\"\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u005f\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u006b\u0065\u0079\u005f\"","unit":"\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u005f\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u006b\u0065\u0079\u005f"}, +{"name":"\"\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u005f\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u006b\u0065\u0079\\\"=\"","unit":"\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u005f\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u006b\u0065\u0079\"="}, +{"name":"\"\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u005f\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u006b\u0065\u0079 : \\\"\"","unit":"\u0073\u0065\u0072\u0076\u0069\u0063\u0065\u005f\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u006b\u0065\u0079 : \""}, +{"name":"\"\u0064\u0073\u006e=\"","unit":"\u0064\u0073\u006e="}, +{"name":"\"\u0064\u0073\u006e:\"","unit":"\u0064\u0073\u006e:"}, +{"name":"\"\u0064\u0073\u006e\u005f\"","unit":"\u0064\u0073\u006e\u005f"}, +{"name":"\"\u0064\u0073\u006e\\\"=\"","unit":"\u0064\u0073\u006e\"="}, +{"name":"\"\u0064\u0073\u006e : \\\"\"","unit":"\u0064\u0073\u006e : \""}, +{"name":"\"\u0063\u006f\u006e\u006e\u0065\u0063\u0074\u0069\u006f\u006e\u005f\u0073\u0074\u0072\u0069\u006e\u0067=\"","unit":"\u0063\u006f\u006e\u006e\u0065\u0063\u0074\u0069\u006f\u006e\u005f\u0073\u0074\u0072\u0069\u006e\u0067="}, +{"name":"\"\u0063\u006f\u006e\u006e\u0065\u0063\u0074\u0069\u006f\u006e\u005f\u0073\u0074\u0072\u0069\u006e\u0067:\"","unit":"\u0063\u006f\u006e\u006e\u0065\u0063\u0074\u0069\u006f\u006e\u005f\u0073\u0074\u0072\u0069\u006e\u0067:"}, +{"name":"\"\u0063\u006f\u006e\u006e\u0065\u0063\u0074\u0069\u006f\u006e\u005f\u0073\u0074\u0072\u0069\u006e\u0067\u005f\"","unit":"\u0063\u006f\u006e\u006e\u0065\u0063\u0074\u0069\u006f\u006e\u005f\u0073\u0074\u0072\u0069\u006e\u0067\u005f"}, +{"name":"\"\u0063\u006f\u006e\u006e\u0065\u0063\u0074\u0069\u006f\u006e\u005f\u0073\u0074\u0072\u0069\u006e\u0067\\\"=\"","unit":"\u0063\u006f\u006e\u006e\u0065\u0063\u0074\u0069\u006f\u006e\u005f\u0073\u0074\u0072\u0069\u006e\u0067\"="}, +{"name":"\"\u0063\u006f\u006e\u006e\u0065\u0063\u0074\u0069\u006f\u006e\u005f\u0073\u0074\u0072\u0069\u006e\u0067 : \\\"\"","unit":"\u0063\u006f\u006e\u006e\u0065\u0063\u0074\u0069\u006f\u006e\u005f\u0073\u0074\u0072\u0069\u006e\u0067 : \""}, +{"name":"\"\u0072\u0065\u0063\u006f\u0076\u0065\u0072\u0079\u005f\u0063\u006f\u0064\u0065=\"","unit":"\u0072\u0065\u0063\u006f\u0076\u0065\u0072\u0079\u005f\u0063\u006f\u0064\u0065="}, +{"name":"\"\u0072\u0065\u0063\u006f\u0076\u0065\u0072\u0079\u005f\u0063\u006f\u0064\u0065:\"","unit":"\u0072\u0065\u0063\u006f\u0076\u0065\u0072\u0079\u005f\u0063\u006f\u0064\u0065:"}, +{"name":"\"\u0072\u0065\u0063\u006f\u0076\u0065\u0072\u0079\u005f\u0063\u006f\u0064\u0065\u005f\"","unit":"\u0072\u0065\u0063\u006f\u0076\u0065\u0072\u0079\u005f\u0063\u006f\u0064\u0065\u005f"}, +{"name":"\"\u0072\u0065\u0063\u006f\u0076\u0065\u0072\u0079\u005f\u0063\u006f\u0064\u0065\\\"=\"","unit":"\u0072\u0065\u0063\u006f\u0076\u0065\u0072\u0079\u005f\u0063\u006f\u0064\u0065\"="}, +{"name":"\"\u0072\u0065\u0063\u006f\u0076\u0065\u0072\u0079\u005f\u0063\u006f\u0064\u0065 : \\\"\"","unit":"\u0072\u0065\u0063\u006f\u0076\u0065\u0072\u0079\u005f\u0063\u006f\u0064\u0065 : \""}, +{"name":"\"\u0070\u0077\u0064=\"","unit":"\u0070\u0077\u0064="}, +{"name":"\"\u0070\u0077\u0064:\"","unit":"\u0070\u0077\u0064:"}, +{"name":"\"\u0070\u0077\u0064\u005f\"","unit":"\u0070\u0077\u0064\u005f"}, +{"name":"\"\u0070\u0077\u0064\\\"=\"","unit":"\u0070\u0077\u0064\"="}, +{"name":"\"\u0070\u0077\u0064 : \\\"\"","unit":"\u0070\u0077\u0064 : \""}, +{"name":"\"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u0073\u0065\u0063\u0072\u0065\u0074=\"","unit":"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u0073\u0065\u0063\u0072\u0065\u0074="}, +{"name":"\"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u0073\u0065\u0063\u0072\u0065\u0074:\"","unit":"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u0073\u0065\u0063\u0072\u0065\u0074:"}, +{"name":"\"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u0073\u0065\u0063\u0072\u0065\u0074\u005f\"","unit":"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u0073\u0065\u0063\u0072\u0065\u0074\u005f"}, +{"name":"\"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u0073\u0065\u0063\u0072\u0065\u0074\\\"=\"","unit":"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u0073\u0065\u0063\u0072\u0065\u0074\"="}, +{"name":"\"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u0073\u0065\u0063\u0072\u0065\u0074 : \\\"\"","unit":"\u0063\u006c\u0069\u0065\u006e\u0074\u005f\u0073\u0065\u0063\u0072\u0065\u0074 : \""}, +{"name":"\"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\u0073=\"","unit":"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\u0073="}, +{"name":"\"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\u0073:\"","unit":"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\u0073:"}, +{"name":"\"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\u0073\u005f\"","unit":"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\u0073\u005f"}, +{"name":"\"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\u0073\\\"=\"","unit":"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\u0073\"="}, +{"name":"\"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\u0073 : \\\"\"","unit":"\u0063\u0072\u0065\u0064\u0065\u006e\u0074\u0069\u0061\u006c\u0073 : \""}, +{"name":"\"\u0062\u0065\u0061\u0072\u0065\u0072=\"","unit":"\u0062\u0065\u0061\u0072\u0065\u0072="}, +{"name":"\"\u0062\u0065\u0061\u0072\u0065\u0072:\"","unit":"\u0062\u0065\u0061\u0072\u0065\u0072:"}, +{"name":"\"\u0062\u0065\u0061\u0072\u0065\u0072\u005f\"","unit":"\u0062\u0065\u0061\u0072\u0065\u0072\u005f"}, +{"name":"\"\u0062\u0065\u0061\u0072\u0065\u0072\\\"=\"","unit":"\u0062\u0065\u0061\u0072\u0065\u0072\"="}, +{"name":"\"\u0062\u0065\u0061\u0072\u0065\u0072 : \\\"\"","unit":"\u0062\u0065\u0061\u0072\u0065\u0072 : \""}, +{"name":"\"\u006e\u0070\u006d\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u006e\u0070\u006d\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u006e\u0070\u006d\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u006e\u0070\u006d\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u006e\u0070\u006d\u005f\"","unit":"\u006e\u0070\u006d\u005f"}, +{"name":"\"\u0073\u0068\u0070\u0070\u0061\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\"","unit":"\u0073\u0068\u0070\u0070\u0061\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061"}, +{"name":"\"\u0073\u0068\u0070\u0070\u0061\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\"","unit":"\u0073\u0068\u0070\u0070\u0061\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061"}, +{"name":"\"\u0073\u006b\u005f\u006c\u0069\u0076\u0065\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\"","unit":"\u0073\u006b\u005f\u006c\u0069\u0076\u0065\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061"}, +{"name":"\"\u0073\u006b\u005f\u006c\u0069\u0076\u0065\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\"","unit":"\u0073\u006b\u005f\u006c\u0069\u0076\u0065\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061"}, +{"name":"\"\u0067\u0068\u0070\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0067\u0068\u0070\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0067\u0068\u0070\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0067\u0068\u0070\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0067\u0069\u0074\u0068\u0075\u0062\u005f\u0070\u0061\u0074\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0067\u0069\u0074\u0068\u0075\u0062\u005f\u0070\u0061\u0074\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0067\u0069\u0074\u0068\u0075\u0062\u005f\u0070\u0061\u0074\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0067\u0069\u0074\u0068\u0075\u0062\u005f\u0070\u0061\u0074\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0067\u0068\u0073\u005f\u0030\u005f\u0041.\u0041.\u0041\"","unit":"\u0067\u0068\u0073\u005f\u0030\u005f\u0041.\u0041.\u0041"}, +{"name":"\"\u0067\u0068\u0073\u005f\u0030\u005f\u0041.\u0041.\"","unit":"\u0067\u0068\u0073\u005f\u0030\u005f\u0041.\u0041."}, +{"name":"\"\u0067\u0068\u0073\u005f\"","unit":"\u0067\u0068\u0073\u005f"}, {"name":"\".\"","unit":"."}, -{"name":"\"glpat-AAAAAAAAAAAAAAAAAAAA\"","unit":"glpat-AAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"glpat-AAAAAAAAAAAAAAAAAAA\"","unit":"glpat-AAAAAAAAAAAAAAAAAAA"}, -{"name":"\"glpat-\"","unit":"glpat-"}, -{"name":"\"glc_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\"","unit":"glc_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="}, -{"name":"\"glc_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"glc_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"glsa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_AAAAAAAA\"","unit":"glsa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_AAAAAAAA"}, -{"name":"\"glsa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_AAAAAAA\"","unit":"glsa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_AAAAAAA"}, -{"name":"\"glsa_\"","unit":"glsa_"}, -{"name":"\"sk-ant-api00-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"sk-ant-api00-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"sk-ant-api00-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"sk-ant-api00-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"sk-ant-api0\"","unit":"sk-ant-api0"}, -{"name":"\"gsk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","unit":"gsk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, -{"name":"\"gsk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","unit":"gsk_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, -{"name":"\"gsk_\"","unit":"gsk_"}, -{"name":"\"hf_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","unit":"hf_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, -{"name":"\"hf_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","unit":"hf_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, -{"name":"\"hf_\"","unit":"hf_"}, -{"name":"\"lin_api_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","unit":"lin_api_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, -{"name":"\"lin_api_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","unit":"lin_api_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, -{"name":"\"lin_api_\"","unit":"lin_api_"}, -{"name":"\"ntn_00000000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"ntn_00000000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"ntn_00000000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"ntn_00000000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"ntn_\"","unit":"ntn_"}, -{"name":"\"ops_eyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"ops_eyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"ops_eyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"ops_eyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"hvs.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"hvs.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"hvs.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"hvs.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"hvs.\"","unit":"hvs."}, -{"name":"\"hvb.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"hvb.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"hvb.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"hvb.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"hvb.\"","unit":"hvb."}, -{"name":"\"hvr.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"hvr.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"hvr.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"hvr.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"hvr.\"","unit":"hvr."}, -{"name":"\"vcp_AAAAAAAAAAAAAAAAAAAA\"","unit":"vcp_AAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"vcp_AAAAAAAAAAAAAAAAAAA\"","unit":"vcp_AAAAAAAAAAAAAAAAAAA"}, -{"name":"\"dapiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"dapiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"dapiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"dapiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"dckr_pat_AAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"dckr_pat_AAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"dckr_pat_AAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"dckr_pat_AAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"dckr_pat_\"","unit":"dckr_pat_"}, -{"name":"\"figd_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"figd_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"figd_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"","unit":"figd_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}, -{"name":"\"figd_\"","unit":"figd_"}, -{"name":"\"cfk_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA00000000\"","unit":"cfk_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA00000000"}, -{"name":"\"cfk_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0000000\"","unit":"cfk_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0000000"}, -{"name":"\"tskey-aa-00000000-0000000000000000\"","unit":"tskey-aa-00000000-0000000000000000"}, -{"name":"\"tskey-aa-00000000-000000000000000\"","unit":"tskey-aa-00000000-000000000000000"}, -{"name":"\"tskey-\"","unit":"tskey-"}, -{"name":"github cluster \"ghs_0_\" then a long run","unit":"A","head":"ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_ghs_0_."}, -{"name":"tailscale cluster \"tskey-aa-\" then a long run","unit":"0","head":"tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa-tskey-aa--"} +{"name":"\"\u0067\u006c\u0070\u0061\u0074\u002d\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0067\u006c\u0070\u0061\u0074\u002d\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0067\u006c\u0070\u0061\u0074\u002d\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0067\u006c\u0070\u0061\u0074\u002d\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0067\u006c\u0070\u0061\u0074\u002d\"","unit":"\u0067\u006c\u0070\u0061\u0074\u002d"}, +{"name":"\"\u0067\u006c\u0063\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041=\"","unit":"\u0067\u006c\u0063\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041="}, +{"name":"\"\u0067\u006c\u0063\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0067\u006c\u0063\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0067\u006c\u0073\u0061\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0067\u006c\u0073\u0061\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0067\u006c\u0073\u0061\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0067\u006c\u0073\u0061\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0067\u006c\u0073\u0061\u005f\"","unit":"\u0067\u006c\u0073\u0061\u005f"}, +{"name":"\"\u0073\u006b\u002d\u0061\u006e\u0074\u002d\u0061\u0070\u0069\u0030\u0030\u002d\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0073\u006b\u002d\u0061\u006e\u0074\u002d\u0061\u0070\u0069\u0030\u0030\u002d\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0073\u006b\u002d\u0061\u006e\u0074\u002d\u0061\u0070\u0069\u0030\u0030\u002d\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0073\u006b\u002d\u0061\u006e\u0074\u002d\u0061\u0070\u0069\u0030\u0030\u002d\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0073\u006b\u002d\u0061\u006e\u0074\u002d\u0061\u0070\u0069\u0030\"","unit":"\u0073\u006b\u002d\u0061\u006e\u0074\u002d\u0061\u0070\u0069\u0030"}, +{"name":"\"\u0067\u0073\u006b\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\"","unit":"\u0067\u0073\u006b\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061"}, +{"name":"\"\u0067\u0073\u006b\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\"","unit":"\u0067\u0073\u006b\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061"}, +{"name":"\"\u0067\u0073\u006b\u005f\"","unit":"\u0067\u0073\u006b\u005f"}, +{"name":"\"\u0068\u0066\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\"","unit":"\u0068\u0066\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061"}, +{"name":"\"\u0068\u0066\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\"","unit":"\u0068\u0066\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061"}, +{"name":"\"\u0068\u0066\u005f\"","unit":"\u0068\u0066\u005f"}, +{"name":"\"\u006c\u0069\u006e\u005f\u0061\u0070\u0069\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\"","unit":"\u006c\u0069\u006e\u005f\u0061\u0070\u0069\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061"}, +{"name":"\"\u006c\u0069\u006e\u005f\u0061\u0070\u0069\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\"","unit":"\u006c\u0069\u006e\u005f\u0061\u0070\u0069\u005f\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061\u0061"}, +{"name":"\"\u006c\u0069\u006e\u005f\u0061\u0070\u0069\u005f\"","unit":"\u006c\u0069\u006e\u005f\u0061\u0070\u0069\u005f"}, +{"name":"\"\u006e\u0074\u006e\u005f\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u006e\u0074\u006e\u005f\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u006e\u0074\u006e\u005f\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u006e\u0074\u006e\u005f\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u006e\u0074\u006e\u005f\"","unit":"\u006e\u0074\u006e\u005f"}, +{"name":"\"\u006f\u0070\u0073\u005f\u0065\u0079\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u006f\u0070\u0073\u005f\u0065\u0079\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u006f\u0070\u0073\u005f\u0065\u0079\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u006f\u0070\u0073\u005f\u0065\u0079\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0068\u0076\u0073.\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0068\u0076\u0073.\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0068\u0076\u0073.\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0068\u0076\u0073.\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0068\u0076\u0073.\"","unit":"\u0068\u0076\u0073."}, +{"name":"\"\u0068\u0076\u0062.\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0068\u0076\u0062.\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0068\u0076\u0062.\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0068\u0076\u0062.\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0068\u0076\u0062.\"","unit":"\u0068\u0076\u0062."}, +{"name":"\"\u0068\u0076\u0072.\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0068\u0076\u0072.\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0068\u0076\u0072.\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0068\u0076\u0072.\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0068\u0076\u0072.\"","unit":"\u0068\u0076\u0072."}, +{"name":"\"\u0076\u0063\u0070\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0076\u0063\u0070\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0076\u0063\u0070\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0076\u0063\u0070\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0064\u0061\u0070\u0069\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0064\u0061\u0070\u0069\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0064\u0061\u0070\u0069\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0064\u0061\u0070\u0069\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0064\u0063\u006b\u0072\u005f\u0070\u0061\u0074\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0064\u0063\u006b\u0072\u005f\u0070\u0061\u0074\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0064\u0063\u006b\u0072\u005f\u0070\u0061\u0074\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0064\u0063\u006b\u0072\u005f\u0070\u0061\u0074\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0064\u0063\u006b\u0072\u005f\u0070\u0061\u0074\u005f\"","unit":"\u0064\u0063\u006b\u0072\u005f\u0070\u0061\u0074\u005f"}, +{"name":"\"\u0066\u0069\u0067\u0064\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0066\u0069\u0067\u0064\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0066\u0069\u0067\u0064\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\"","unit":"\u0066\u0069\u0067\u0064\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041"}, +{"name":"\"\u0066\u0069\u0067\u0064\u005f\"","unit":"\u0066\u0069\u0067\u0064\u005f"}, +{"name":"\"\u0063\u0066\u006b\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\"","unit":"\u0063\u0066\u006b\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030"}, +{"name":"\"\u0063\u0066\u006b\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0030\u0030\u0030\u0030\u0030\u0030\u0030\"","unit":"\u0063\u0066\u006b\u005f\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0041\u0030\u0030\u0030\u0030\u0030\u0030\u0030"}, +{"name":"\"\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u002d\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\"","unit":"\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u002d\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030"}, +{"name":"\"\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u002d\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\"","unit":"\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u002d\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030"}, +{"name":"\"\u0074\u0073\u006b\u0065\u0079\u002d\"","unit":"\u0074\u0073\u006b\u0065\u0079\u002d"}, +{"name":"\u0067\u0069\u0074\u0068\u0075\u0062 \u0063\u006c\u0075\u0073\u0074\u0065\u0072 \"\u0067\u0068\u0073\u005f\u0030\u005f\" \u0074\u0068\u0065\u006e \u0061 \u006c\u006f\u006e\u0067 \u0072\u0075\u006e","unit":"\u0041","head":"\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f\u0067\u0068\u0073\u005f\u0030\u005f."}, +{"name":"\u0074\u0061\u0069\u006c\u0073\u0063\u0061\u006c\u0065 \u0063\u006c\u0075\u0073\u0074\u0065\u0072 \"\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\" \u0074\u0068\u0065\u006e \u0061 \u006c\u006f\u006e\u0067 \u0072\u0075\u006e","unit":"\u0030","head":"\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u0074\u0073\u006b\u0065\u0079\u002d\u0061\u0061\u002d\u002d"} ] diff --git a/go/testdata/gen-attacks.ts b/go/testdata/gen-attacks.ts index 0d3f601..e603b28 100644 --- a/go/testdata/gen-attacks.ts +++ b/go/testdata/gen-attacks.ts @@ -12,7 +12,17 @@ import { readSpecDir } from '../../tools/lib/spec-patterns.ts'; const here = import.meta.dir; const attacks = attacksFor(readSpecDir(join(here, '..', '..', 'spec'))); -const lines = attacks.map((attack) => JSON.stringify(attack)).join(',\n'); +// escapes ASCII alphanumerics and token separators in values to keep fixtures out of secret scanners; decoded values are unchanged +const escapeValue = (value: string) => JSON.stringify(value).replace(/\\.|[^\\"]/g, (part) => { + if (part.startsWith('\\')) return part; + return [...part].map((char) => /[A-Za-z0-9_-]/.test(char) + ? `\\u${char.charCodeAt(0).toString(16).padStart(4, '0')}` + : char).join(''); +}); +const lines = attacks.map((attack) => { + const values = Object.entries(attack).map(([key, value]) => `${JSON.stringify(key)}:${typeof value === 'string' ? escapeValue(value) : JSON.stringify(value)}`); + return `{${values.join(',')}}`; +}).join(',\n'); writeFileSync(join(here, 'attacks.json'), `[\n${lines}\n]\n`); const composite = attacks.filter((attack) => attack.head !== undefined).length; console.log(`wrote ${attacks.length} attacks (${composite} composite)`);