Commit 80175ee
Fix findings from Maycon's AI review pass
- Redact Authorization/X-Admin-Secret/Cookie before the per-request debug
log — it was writing tenant JWTs, the Truvera API key (passthrough mode),
and the admin revoke secret to stderr/CloudWatch in plaintext on every
request. The top-priority finding.
- Extend the per-request session re-auth check (added in an earlier pass)
from JWT-only to passthrough mode too. It was gated on
authConfig?.mode === "jwt", so a reused Mcp-Session-Id in passthrough mode
skipped auth entirely — a leaked session ID rode the original client's
Truvera API key indefinitely, exactly the gap the code comment claimed
was closed. Added a mirrored test suite for passthrough alongside the
existing JWT one.
- Drop the full tool name/description list from the unauthenticated
/health response, keeping toolCount (which docs and an e2e test already
depend on). /health has to stay unauthenticated for load balancers and
uptime monitors, but it doesn't need to hand an unauthenticated caller
the entire tool surface (delegation, credential issuance, AP2 payment
tools) up front.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent eb8e0d7 commit 80175ee
2 files changed
Lines changed: 128 additions & 16 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
269 | 360 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
51 | 61 | | |
52 | 62 | | |
53 | 63 | | |
| |||
203 | 213 | | |
204 | 214 | | |
205 | 215 | | |
206 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
207 | 220 | | |
208 | 221 | | |
209 | 222 | | |
210 | | - | |
| 223 | + | |
211 | 224 | | |
212 | 225 | | |
213 | 226 | | |
| |||
222 | 235 | | |
223 | 236 | | |
224 | 237 | | |
225 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
226 | 243 | | |
227 | 244 | | |
228 | 245 | | |
| |||
232 | 249 | | |
233 | 250 | | |
234 | 251 | | |
235 | | - | |
236 | 252 | | |
237 | 253 | | |
238 | 254 | | |
| |||
317 | 333 | | |
318 | 334 | | |
319 | 335 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
325 | 343 | | |
326 | | - | |
| 344 | + | |
327 | 345 | | |
328 | 346 | | |
329 | 347 | | |
| |||
335 | 353 | | |
336 | 354 | | |
337 | 355 | | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
343 | 364 | | |
344 | | - | |
| 365 | + | |
345 | 366 | | |
346 | 367 | | |
347 | 368 | | |
| |||
0 commit comments