| 19 |
25
|
|
redactTraceValue,
|
| 20 |
26
|
|
redactValue,
|
| 21 |
27
|
|
type RedactionResult,
|
| 22 |
|
- |
} from "./redaction.ts"
|
|
28
|
+ |
} from "./redaction.ts";
|
| 23 |
29
|
|
|
| 24 |
|
- |
const red = (s: string): RedactionResult<string> => redactString(s)
|
|
30
|
+ |
const red = (s: string): RedactionResult<string> => redactString(s);
|
| 25 |
31
|
|
|
|
32
|
+ |
/**
|
|
33
|
+ |
* The planted secrets are a SHARED fixture, not a list local to this file.
|
|
34
|
+ |
*
|
|
35
|
+ |
* `packages/openagents-cli` and `crates/openagents-cli` assert against the same
|
|
36
|
+ |
* file, so a token family added here is asserted in all three redaction paths
|
|
37
|
+ |
* rather than in whichever one the author happened to be editing. That is the
|
|
38
|
+ |
* fix for the drift that let `oa_pat_` and `smct_` through.
|
|
39
|
+ |
*/
|
| 26 |
40
|
|
const SECRET_FIXTURES: ReadonlyArray<{
|
| 27 |
|
- |
label: string
|
| 28 |
|
- |
raw: string
|
| 29 |
|
- |
leak: string
|
| 30 |
|
- |
category: string
|
| 31 |
|
- |
}> = [
|
| 32 |
|
- |
{
|
| 33 |
|
- |
label: "OpenAI sk- key",
|
| 34 |
|
- |
raw: "use sk-abcdefghijklmnop0123456789ABCD now",
|
| 35 |
|
- |
leak: "sk-abcdefghijklmnop",
|
| 36 |
|
- |
category: "provider_key",
|
| 37 |
|
- |
},
|
| 38 |
|
- |
{
|
| 39 |
|
- |
label: "OpenRouter sk-or- key",
|
| 40 |
|
- |
raw: "sk-or-v1-0011223344556677889900aabbccddeeff00112233",
|
| 41 |
|
- |
leak: "0011223344556677",
|
| 42 |
|
- |
category: "provider_key",
|
| 43 |
|
- |
},
|
| 44 |
|
- |
{
|
| 45 |
|
- |
label: "Anthropic sk-ant- key",
|
| 46 |
|
- |
raw: "key sk-ant-api03-AbCdEf0123456789AbCdEf done",
|
| 47 |
|
- |
leak: "AbCdEf0123456789",
|
| 48 |
|
- |
category: "provider_key",
|
| 49 |
|
- |
},
|
| 50 |
|
- |
{
|
| 51 |
|
- |
label: "Stripe sk_live_ key",
|
| 52 |
|
- |
raw: "STRIPE=sk_live_0123456789abcdefABCDEF rest",
|
| 53 |
|
- |
leak: "sk_live_0123456789",
|
| 54 |
|
- |
category: "provider_key",
|
| 55 |
|
- |
},
|
| 56 |
|
- |
{
|
| 57 |
|
- |
label: "oa_agent_ token",
|
| 58 |
|
- |
raw: "bearer creds oa_agent_AbCdEf123456789xyz end",
|
| 59 |
|
- |
leak: "oa_agent_AbCdEf",
|
| 60 |
|
- |
category: "oa_agent_token",
|
| 61 |
|
- |
},
|
| 62 |
|
- |
{
|
| 63 |
|
- |
label: "generic oa_ token",
|
| 64 |
|
- |
raw: "auth oa_live_abcdef0123456789abcdef next",
|
| 65 |
|
- |
leak: "oa_live_abcdef0123456789",
|
| 66 |
|
- |
category: "oa_token",
|
| 67 |
|
- |
},
|
| 68 |
|
- |
{
|
| 69 |
|
- |
label: "oa_pat_ personal access token",
|
| 70 |
|
- |
raw: "the token is oa_pat_abc123def456ghi789jkl012 here",
|
| 71 |
|
- |
leak: "oa_pat_abc123def456",
|
| 72 |
|
- |
category: "oa_token",
|
| 73 |
|
- |
},
|
| 74 |
|
- |
{
|
| 75 |
|
- |
// Minted by computer pairing. Hyphenated, which every other token rule
|
| 76 |
|
- |
// stops at, so it survived an export intact.
|
| 77 |
|
- |
label: "machine pairing token",
|
| 78 |
|
- |
raw: "the machine token is smct_machine-secret today",
|
| 79 |
|
- |
leak: "smct_machine-secret",
|
| 80 |
|
- |
category: "machine_token",
|
| 81 |
|
- |
},
|
| 82 |
|
- |
{
|
| 83 |
|
- |
label: "X verification code",
|
| 84 |
|
- |
raw: "Code: oa-x-9f2bc-defG",
|
| 85 |
|
- |
leak: "9f2bc-defG",
|
| 86 |
|
- |
category: "x_code",
|
| 87 |
|
- |
},
|
| 88 |
|
- |
{
|
| 89 |
|
- |
label: "owner identifier",
|
| 90 |
|
- |
raw: "owner github:12345678 claimed it",
|
| 91 |
|
- |
leak: "12345678",
|
| 92 |
|
- |
category: "owner_id",
|
| 93 |
|
- |
},
|
| 94 |
|
- |
{
|
| 95 |
|
- |
label: "AWS access key",
|
| 96 |
|
- |
raw: "AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE here",
|
| 97 |
|
- |
leak: "AKIAIOSFODNN7EXAMPLE",
|
| 98 |
|
- |
category: "aws_key",
|
| 99 |
|
- |
},
|
| 100 |
|
- |
{
|
| 101 |
|
- |
label: "Google API key",
|
| 102 |
|
- |
raw: "gkey AIzaSyA1234567890abcdefghijklmnopqrstuv ok",
|
| 103 |
|
- |
leak: "AIzaSyA1234567890",
|
| 104 |
|
- |
category: "google_key",
|
| 105 |
|
- |
},
|
| 106 |
|
- |
{
|
| 107 |
|
- |
label: "Slack token",
|
| 108 |
|
- |
raw: "slack xoxb-1234567890-abcdefghijkl set",
|
| 109 |
|
- |
leak: "xoxb-1234567890",
|
| 110 |
|
- |
category: "slack_token",
|
| 111 |
|
- |
},
|
| 112 |
|
- |
{
|
| 113 |
|
- |
label: "GitHub token",
|
| 114 |
|
- |
raw: "ghp_0123456789abcdefABCDEF0123456789abcd token",
|
| 115 |
|
- |
leak: "ghp_0123456789",
|
| 116 |
|
- |
category: "github_token",
|
| 117 |
|
- |
},
|
| 118 |
|
- |
{
|
| 119 |
|
- |
label: "JWT",
|
| 120 |
|
- |
raw: "token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
|
| 121 |
|
- |
leak: "SflKxwRJSMeKKF2QT4",
|
| 122 |
|
- |
category: "jwt",
|
| 123 |
|
- |
},
|
| 124 |
|
- |
{
|
| 125 |
|
- |
label: "Bearer credential",
|
| 126 |
|
- |
raw: "Authorization: Bearer abcdef0123456789ABCDEFxyz",
|
| 127 |
|
- |
leak: "abcdef0123456789ABCDEFxyz",
|
| 128 |
|
- |
category: "bearer",
|
| 129 |
|
- |
},
|
| 130 |
|
- |
{
|
| 131 |
|
- |
label: "env secret line",
|
| 132 |
|
- |
raw: "DATABASE_PASSWORD=hunter2supersecretvalue more",
|
| 133 |
|
- |
leak: "hunter2supersecretvalue",
|
| 134 |
|
- |
category: "env_secret",
|
| 135 |
|
- |
},
|
| 136 |
|
- |
{
|
| 137 |
|
- |
label: "email PII",
|
| 138 |
|
- |
raw: "contact me at jane.doe@example.com please",
|
| 139 |
|
- |
leak: "jane.doe@example.com",
|
| 140 |
|
- |
category: "email",
|
| 141 |
|
- |
},
|
| 142 |
|
- |
{
|
| 143 |
|
- |
label: "phone PII",
|
| 144 |
|
- |
raw: "call (312) 555-0198 after intake",
|
| 145 |
|
- |
leak: "312) 555-0198",
|
| 146 |
|
- |
category: "phone",
|
| 147 |
|
- |
},
|
| 148 |
|
- |
{
|
| 149 |
|
- |
label: "SSN PII",
|
| 150 |
|
- |
raw: "SSN: 123-45-6789 appears in the attachment",
|
| 151 |
|
- |
leak: "123-45-6789",
|
| 152 |
|
- |
category: "ssn",
|
| 153 |
|
- |
},
|
| 154 |
|
- |
{
|
| 155 |
|
- |
label: "date of birth PHI",
|
| 156 |
|
- |
raw: "DOB: 04/23/1978 on the health form",
|
| 157 |
|
- |
leak: "04/23/1978",
|
| 158 |
|
- |
category: "date_of_birth",
|
| 159 |
|
- |
},
|
| 160 |
|
- |
{
|
| 161 |
|
- |
label: "medical record PHI",
|
| 162 |
|
- |
raw: "MRN: HOSP-928374 belongs to the patient packet",
|
| 163 |
|
- |
leak: "HOSP-928374",
|
| 164 |
|
- |
category: "medical_record_id",
|
| 165 |
|
- |
},
|
| 166 |
|
- |
{
|
| 167 |
|
- |
label: "home path",
|
| 168 |
|
- |
raw: "open /Users/alice/work/secret.txt then",
|
| 169 |
|
- |
leak: "/Users/alice",
|
| 170 |
|
- |
category: "home_path",
|
| 171 |
|
- |
},
|
| 172 |
|
- |
{
|
| 173 |
|
- |
label: "linux home path",
|
| 174 |
|
- |
raw: "cat /home/bob/.ssh/id_rsa fails",
|
| 175 |
|
- |
leak: "/home/bob",
|
| 176 |
|
- |
category: "home_path",
|
| 177 |
|
- |
},
|
| 178 |
|
- |
{
|
| 179 |
|
- |
label: "file URL",
|
| 180 |
|
- |
raw: "see file:///Users/carol/private/doc.md now",
|
| 181 |
|
- |
leak: "carol",
|
| 182 |
|
- |
category: "file_url",
|
| 183 |
|
- |
},
|
| 184 |
|
- |
{
|
| 185 |
|
- |
label: ".secrets path",
|
| 186 |
|
- |
raw: "read .secrets/tailnet.env carefully",
|
| 187 |
|
- |
leak: ".secrets/tailnet.env",
|
| 188 |
|
- |
category: "secrets_path",
|
| 189 |
|
- |
},
|
| 190 |
|
- |
{
|
| 191 |
|
- |
label: "lightning invoice",
|
| 192 |
|
- |
raw: "pay lnbc2500u1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypq more",
|
| 193 |
|
- |
leak: "lnbc2500u1",
|
| 194 |
|
- |
category: "wallet_or_payment",
|
| 195 |
|
- |
},
|
| 196 |
|
- |
{
|
| 197 |
|
- |
label: "bolt12 offer",
|
| 198 |
|
- |
raw: "offer lno1pqpsgq0123456789abcdefghijklmnop here",
|
| 199 |
|
- |
leak: "lno1pqpsgq",
|
| 200 |
|
- |
category: "wallet_or_payment",
|
| 201 |
|
- |
},
|
| 202 |
|
- |
{
|
| 203 |
|
- |
label: "on-chain bc1 address",
|
| 204 |
|
- |
raw: "send to bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq please",
|
| 205 |
|
- |
leak: "bc1qar0srrr7xfkvy",
|
| 206 |
|
- |
category: "wallet_or_payment",
|
| 207 |
|
- |
},
|
| 208 |
|
- |
{
|
| 209 |
|
- |
label: "xpub",
|
| 210 |
|
- |
raw: "xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz key",
|
| 211 |
|
- |
leak: "xpub6CUGRUonZSQ4T",
|
| 212 |
|
- |
category: "wallet_or_payment",
|
| 213 |
|
- |
},
|
| 214 |
|
- |
{
|
| 215 |
|
- |
label: "private internal IP",
|
| 216 |
|
- |
raw: "host 10.0.0.42 and 100.96.1.2 internal",
|
| 217 |
|
- |
leak: "10.0.0.42",
|
| 218 |
|
- |
category: "ip",
|
| 219 |
|
- |
},
|
| 220 |
|
- |
{
|
| 221 |
|
- |
label: "PEM private key",
|
| 222 |
|
- |
raw: "k=-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEABBBBBBBB\nmoredata==\n-----END OPENSSH PRIVATE KEY-----\nend",
|
| 223 |
|
- |
leak: "b3BlbnNzaC1rZXkt",
|
| 224 |
|
- |
category: "private_key",
|
| 225 |
|
- |
},
|
| 226 |
|
- |
{
|
| 227 |
|
- |
label: "mnemonic seed phrase",
|
| 228 |
|
- |
raw: "seed legal winner thank year wave sausage worth useful legal winner thank yellow done",
|
| 229 |
|
- |
leak: "legal winner thank year wave sausage worth useful legal winner thank yellow",
|
| 230 |
|
- |
category: "mnemonic",
|
| 231 |
|
- |
},
|
| 232 |
|
- |
]
|
|
41
|
+ |
label: string;
|
|
42
|
+ |
raw: string;
|
|
43
|
+ |
leak: string;
|
|
44
|
+ |
category: string;
|
|
45
|
+ |
credential: boolean;
|
|
46
|
+ |
}> = JSON.parse(
|
|
47
|
+ |
readFileSync(
|
|
48
|
+ |
new URL("../../../fixtures/redaction/planted-secrets.json", import.meta.url),
|
|
49
|
+ |
"utf8",
|
|
50
|
+ |
),
|
|
51
|
+ |
).secrets;
|
|
52
|
+ |
|
|
53
|
+ |
describe("the shared planted-secret fixture", () => {
|
|
54
|
+ |
const ruleCategories = new Set(atifRedactionRules.map((rule) => rule.category));
|
|
55
|
+ |
const fixtureCategories = new Set(SECRET_FIXTURES.map((fx) => fx.category));
|
|
56
|
+ |
|
|
57
|
+ |
test("classifies every category, so a new one cannot arrive unclassified", () => {
|
|
58
|
+ |
// `REDACTION_CATEGORY_CLASS` is `Record<RedactionCategory, ...>`, so this is
|
|
59
|
+ |
// already a compile error; the runtime check catches a category that was
|
|
60
|
+ |
// added to the RULES list without being added to the union at all.
|
|
61
|
+ |
for (const category of ruleCategories) {
|
|
62
|
+ |
expect(
|
|
63
|
+ |
REDACTION_CATEGORY_CLASS[category],
|
|
64
|
+ |
`${category} has a rule but no entry in REDACTION_CATEGORY_CLASS`,
|
|
65
|
+ |
).toBeDefined();
|
|
66
|
+ |
}
|
|
67
|
+ |
});
|
|
68
|
+ |
|
|
69
|
+ |
test("plants a secret for every category that has a rule", () => {
|
|
70
|
+ |
const uncovered = [...ruleCategories].filter((c) => !fixtureCategories.has(c));
|
|
71
|
+ |
expect(
|
|
72
|
+ |
uncovered,
|
|
73
|
+ |
`these categories have a rule and no planted secret in ` +
|
|
74
|
+ |
`fixtures/redaction/planted-secrets.json, so nothing asserts that the ` +
|
|
75
|
+ |
`openagents-cli redaction paths cover them`,
|
|
76
|
+ |
).toEqual([]);
|
|
77
|
+ |
});
|
|
78
|
+ |
|
|
79
|
+ |
test("marks credential entries the same way the rule list does", () => {
|
|
80
|
+ |
for (const fx of SECRET_FIXTURES) {
|
|
81
|
+ |
expect(fx.credential, `${fx.label} is filed under ${fx.category}`).toBe(
|
|
82
|
+ |
isCredentialCategory(fx.category as RedactionCategory),
|
|
83
|
+ |
);
|
|
84
|
+ |
}
|
|
85
|
+ |
});
|
|
86
|
+ |
|
|
87
|
+ |
test("leaks name a fragment of the secret body, never only its prefix", () => {
|
|
88
|
+ |
// A test that asserts a MARKER appeared passes for a redaction that swapped
|
|
89
|
+ |
// `sk-liveSECRET` for `[REDACTED]liveSECRET`. Every leak here has to be
|
|
90
|
+ |
// something whose survival means the secret survived.
|
|
91
|
+ |
for (const fx of SECRET_FIXTURES) {
|
|
92
|
+ |
expect(fx.raw, `${fx.label} does not contain its own leak`).toContain(fx.leak);
|
|
93
|
+ |
expect(fx.leak.length, `${fx.label} has a trivially short leak`).toBeGreaterThan(7);
|
|
94
|
+ |
}
|
|
95
|
+ |
});
|
|
96
|
+ |
});
|
| 233 |
97
|
|
|
| 234 |
98
|
|
describe("redactString", () => {
|
| 235 |
99
|
|
for (const fx of SECRET_FIXTURES) {
|
| 236 |
100
|
|
test(`${fx.label} is scrubbed`, () => {
|
| 237 |
|
- |
const r = red(fx.raw)
|
| 238 |
|
- |
expect(r.value).not.toContain(fx.leak)
|
| 239 |
|
- |
expect(r.report.counts[fx.category] ?? 0).toBeGreaterThanOrEqual(1)
|
| 240 |
|
- |
expect(r.report.total).toBeGreaterThanOrEqual(1)
|
| 241 |
|
- |
})
|
|
101
|
+ |
const r = red(fx.raw);
|
|
102
|
+ |
expect(r.value).not.toContain(fx.leak);
|
|
103
|
+ |
expect(r.report.counts[fx.category] ?? 0).toBeGreaterThanOrEqual(1);
|
|
104
|
+ |
expect(r.report.total).toBeGreaterThanOrEqual(1);
|
|
105
|
+ |
});
|
| 242 |
106
|
|
}
|
| 243 |
107
|
|
|
| 244 |
108
|
|
test("slash-separated prose is not redacted as a long blob", () => {
|
| 245 |
109
|
|
const prose =
|
| 246 |
|
- |
"states: candidate/shadow/released/active/rejected/rolled and schema/service/IPC/process/PTY/task/test/output/redaction"
|
| 247 |
|
- |
const r = red(prose)
|
| 248 |
|
- |
expect(r.value).toBe(prose)
|
| 249 |
|
- |
expect(r.report.counts.long_blob ?? 0).toBe(0)
|
| 250 |
|
- |
})
|
|
110
|
+ |
"states: candidate/shadow/released/active/rejected/rolled and schema/service/IPC/process/PTY/task/test/output/redaction";
|
|
111
|
+ |
const r = red(prose);
|
|
112
|
+ |
expect(r.value).toBe(prose);
|
|
113
|
+ |
expect(r.report.counts.long_blob ?? 0).toBe(0);
|
|
114
|
+ |
});
|
| 251 |
115
|
|
|
| 252 |
116
|
|
test("a contiguous base64 blob is still redacted", () => {
|
| 253 |
|
- |
const blob = "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVowMTIzNDU2Nzg5YWJjZGVm"
|
| 254 |
|
- |
const r = red(`token=${blob} end`)
|
| 255 |
|
- |
expect(r.value).not.toContain(blob)
|
| 256 |
|
- |
expect(r.report.counts.long_blob ?? 0).toBeGreaterThanOrEqual(1)
|
| 257 |
|
- |
})
|
|
117
|
+ |
const blob = "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVowMTIzNDU2Nzg5YWJjZGVm";
|
|
118
|
+ |
const r = red(`token=${blob} end`);
|
|
119
|
+ |
expect(r.value).not.toContain(blob);
|
|
120
|
+ |
expect(r.report.counts.long_blob ?? 0).toBeGreaterThanOrEqual(1);
|
|
121
|
+ |
});
|
| 258 |
122
|
|
|
| 259 |
123
|
|
test("prose that only matches the mnemonic SHAPE is not redacted", () => {
|
| 260 |
124
|
|
// 12 short lowercase words, so it matches the candidate regex, but the words
|
| 261 |
125
|
|
// are not all BIP39 words -> it is ordinary prose and must be preserved.
|
| 262 |
|
- |
const prose = "the team will ship this year and then start over next month"
|
| 263 |
|
- |
const r = red(prose)
|
| 264 |
|
- |
expect(r.value).toBe(prose)
|
| 265 |
|
- |
expect(r.report.counts.mnemonic ?? 0).toBe(0)
|
| 266 |
|
- |
})
|
|
126
|
+ |
const prose = "the team will ship this year and then start over next month";
|
|
127
|
+ |
const r = red(prose);
|
|
128
|
+ |
expect(r.value).toBe(prose);
|
|
129
|
+ |
expect(r.report.counts.mnemonic ?? 0).toBe(0);
|
|
130
|
+ |
});
|
| 267 |
131
|
|
|
| 268 |
132
|
|
test("a real BIP39 seed phrase inside prose is still redacted", () => {
|
| 269 |
133
|
|
const r = red(
|
| 270 |
134
|
|
"backup phrase legal winner thank year wave sausage worth useful legal winner thank yellow now",
|
| 271 |
|
- |
)
|
| 272 |
|
- |
expect(r.value).not.toContain("legal winner thank year wave sausage")
|
| 273 |
|
- |
expect(r.report.counts.mnemonic ?? 0).toBeGreaterThanOrEqual(1)
|
| 274 |
|
- |
})
|
|
135
|
+ |
);
|
|
136
|
+ |
expect(r.value).not.toContain("legal winner thank year wave sausage");
|
|
137
|
+ |
expect(r.report.counts.mnemonic ?? 0).toBeGreaterThanOrEqual(1);
|
|
138
|
+ |
});
|
| 275 |
139
|
|
|
| 276 |
140
|
|
test("known public false positives are preserved", () => {
|
| 277 |
141
|
|
const r = red(
|
| 278 |
142
|
|
"See https://openagents.com/trace/abc-123 and https://github.com/OpenAgentsInc/openagents/issues/6219 on openagents/khala for #6219.",
|
| 279 |
|
- |
)
|
| 280 |
|
- |
expect(r.value).toContain("https://openagents.com/trace/abc-123")
|
| 281 |
|
- |
expect(r.value).toContain(
|
| 282 |
|
- |
"https://github.com/OpenAgentsInc/openagents/issues/6219",
|
| 283 |
|
- |
)
|
| 284 |
|
- |
expect(r.value).toContain("openagents/khala")
|
| 285 |
|
- |
expect(r.value).toContain("#6219")
|
| 286 |
|
- |
expect(r.report.total).toBe(0)
|
| 287 |
|
- |
})
|
|
143
|
+ |
);
|
|
144
|
+ |
expect(r.value).toContain("https://openagents.com/trace/abc-123");
|
|
145
|
+ |
expect(r.value).toContain("https://github.com/OpenAgentsInc/openagents/issues/6219");
|
|
146
|
+ |
expect(r.value).toContain("openagents/khala");
|
|
147
|
+ |
expect(r.value).toContain("#6219");
|
|
148
|
+ |
expect(r.report.total).toBe(0);
|
|
149
|
+ |
});
|
| 288 |
150
|
|
|
| 289 |
151
|
|
test("is deterministic", () => {
|
| 290 |
|
- |
const input = SECRET_FIXTURES.map(f => f.raw).join(" | ")
|
| 291 |
|
- |
const a = redactTraceString(input)
|
| 292 |
|
- |
const b = redactTraceString(input)
|
| 293 |
|
- |
expect(a.value).toBe(b.value)
|
| 294 |
|
- |
expect(a.report).toEqual(b.report)
|
| 295 |
|
- |
})
|
| 296 |
|
- |
})
|
|
152
|
+ |
const input = SECRET_FIXTURES.map((f) => f.raw).join(" | ");
|
|
153
|
+ |
const a = redactTraceString(input);
|
|
154
|
+ |
const b = redactTraceString(input);
|
|
155
|
+ |
expect(a.value).toBe(b.value);
|
|
156
|
+ |
expect(a.report).toEqual(b.report);
|
|
157
|
+ |
});
|
|
158
|
+ |
});
|
| 297 |
159
|
|
|
| 298 |
160
|
|
describe("redactValue", () => {
|
| 299 |
161
|
|
test("walks deeply, preserves numeric metrics, and redacts usernames", () => {
|