Repository navigation
Commit d400a1d
test: exclude fixture paths from credential redaction assertions
The Ubuntu 3.14t CI job rejected correctly redacted clone output because
its randomly generated `/tmp/.tmpg8ibob` fixture path contained `bob`.
The credential assertions scanned the whole error and trace, so ordinary
source and destination paths could masquerade as leaked credentials.
Replace only the known fixture directory with `<fixture>` before checking
the error and trace for credentials. Keep the exact redacted-option
assertions and the credential checks outside that directory. Include
`alice-bob-user-token` in the input paths so this false positive is covered
deterministically, rather than depending on a random name.
The Windows CLI and Gix jobs then failed all four trace subtests because
`Repo._clone()` uses `Git.polish_url()` for the source path: the command and
stderr contain forward slashes, while `str(directory)` contains backslashes.
Copilot's review requested: "Remove both the native and POSIX spellings of
the fixture directory before checking for credentials." Remove both exact
spellings from the error and trace to address that feedback without
weakening the credential checks elsewhere.
Focused CLI and Gix runs each pass three redaction tests and four subtests.
An assert-based check runs the new replacement loop against four actual
Windows CLI/Gix CI failure messages: all pass, and a credential outside the
fixture path remains visible. `ruff check`, `ruff format --check`, and
`git diff --check` also pass. Windows execution remains for remote CI.1 parent b03c608 commit d400a1d
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
535 | 538 | | |
536 | 539 | | |
537 | 540 | | |
| |||
0 commit comments