Commit c8ae4b5
authored
fix(e2e): minimize guard-chain evidence export (#9496)
<!-- markdownlint-disable MD041 -->
## Summary
Guard-chain recovery evidence previously returned the entire sandbox
proxy environment file. Pattern-based redaction did not recognize an
opaque runtime-minted gateway credential, which reached persisted
evidence artifacts. The fixture now validates every required marker
inside the sandbox and returns only a fixed credential-free sentinel,
while rejecting every incomplete or malformed result.
## Changes
- Check that the proxy environment file is readable and nonempty, then
pass every expected marker as a positional shell argument and match it
as a fixed string without returning the file contents.
- Reject an empty marker list, an empty marker, or a marker containing a
carriage return or line feed before starting a sandbox command.
- Accept only exit status 0, no signal, no timeout, the exact sentinel
on standard output, and empty standard error; report failures with fixed
diagnostics that do not include sandbox output.
- Exercise the generated shell command through the real `ShellProbe` and
`ArtifactSink`, confirming that an unregistered opaque synthetic
credential appears in neither the result nor any of the three evidence
artifacts.
## Type of Change
- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)
## Quality Gates
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: [independent
nine-category security review
PASS](#9496 (comment))
at commit under review `a51470f550f44d798cd3e145788b542e7d91560e`; no
findings.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:
## DGX Station Hardware Evidence
- [ ] Tested on DGX Station
- Tested commit: Not applicable.
- Station profile/scenario: Not applicable.
- Result: Not applicable.
- Supporting evidence: Not applicable.
## Verification
- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — results:
- Fail-first commit `2e02a68b5`: `npm exec -- vitest run --project
e2e-support test/e2e/support/e2e-recovery-helpers.test.ts` produced the
intended single security-regression failure; 38 tests passed.
- Commit under review `a51470f55`: `npm exec -- vitest run --project
e2e-support test/e2e/support/e2e-recovery-helpers.test.ts` passed 49
tests.
- `npm exec -- vitest run --project integration
test/growth-guardrails.test.ts` passed 32 tests.
- `npm --prefix nemoclaw run build` passed.
- `npm --prefix nemoclaw run typecheck` passed.
- `npm run typecheck:cli` passed.
- `npm run validate:pr` passed.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result: not applicable; the change
is limited to one E2E fixture method and its E2E-support tests.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
---
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
---------
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>1 parent 58b17d7 commit c8ae4b5
2 files changed
Lines changed: 249 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
310 | 314 | | |
311 | 315 | | |
312 | 316 | | |
313 | 317 | | |
314 | 318 | | |
315 | 319 | | |
316 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
317 | 323 | | |
318 | 324 | | |
319 | 325 | | |
320 | 326 | | |
321 | 327 | | |
322 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
323 | 342 | | |
324 | 343 | | |
325 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
326 | 353 | | |
327 | 354 | | |
328 | 355 | | |
329 | 356 | | |
330 | 357 | | |
331 | 358 | | |
332 | 359 | | |
333 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
334 | 373 | | |
335 | | - | |
| 374 | + | |
336 | 375 | | |
337 | 376 | | |
338 | | - | |
339 | | - | |
340 | | - | |
| 377 | + | |
341 | 378 | | |
342 | | - | |
| 379 | + | |
343 | 380 | | |
344 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
345 | 385 | | |
346 | 386 | | |
347 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| 14 | + | |
| 15 | + | |
8 | 16 | | |
9 | 17 | | |
10 | 18 | | |
11 | 19 | | |
12 | 20 | | |
| 21 | + | |
13 | 22 | | |
14 | 23 | | |
15 | 24 | | |
| |||
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
70 | 132 | | |
71 | 133 | | |
72 | 134 | | |
| |||
88 | 150 | | |
89 | 151 | | |
90 | 152 | | |
91 | | - | |
| 153 | + | |
92 | 154 | | |
93 | 155 | | |
94 | 156 | | |
| |||
235 | 297 | | |
236 | 298 | | |
237 | 299 | | |
238 | | - | |
| 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 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
239 | 374 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 375 | + | |
245 | 376 | | |
246 | 377 | | |
247 | 378 | | |
248 | 379 | | |
249 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
250 | 388 | | |
251 | 389 | | |
252 | 390 | | |
253 | 391 | | |
254 | | - | |
| 392 | + | |
255 | 393 | | |
256 | 394 | | |
257 | 395 | | |
258 | | - | |
| 396 | + | |
259 | 397 | | |
260 | 398 | | |
261 | 399 | | |
262 | 400 | | |
263 | 401 | | |
264 | | - | |
265 | | - | |
266 | | - | |
| 402 | + | |
267 | 403 | | |
268 | 404 | | |
269 | 405 | | |
270 | | - | |
| 406 | + | |
271 | 407 | | |
272 | 408 | | |
273 | 409 | | |
274 | 410 | | |
275 | 411 | | |
276 | | - | |
277 | | - | |
278 | | - | |
| 412 | + | |
279 | 413 | | |
280 | 414 | | |
281 | 415 | | |
282 | 416 | | |
283 | 417 | | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
284 | 463 | | |
285 | 464 | | |
286 | 465 | | |
| |||
0 commit comments