Commit c3fe57d
committed
docs: record the test-secret convention in the project guidelines
Secret scanning reads every commit in a PR, not the final tree, so a fixture
that merely looks like a real credential fails CI and keeps failing until the
commit that introduced it is rewritten out of the branch history. That is an
expensive lesson to learn per-person, and it was learned the expensive way.
Writes down what the existing tests already do - a named PLACEHOLDER_ constant
with an obviously-fake value and the TSDoc line seven test files already carry
- and the part that was not written down anywhere: never build a fixture out
of a real credential's structure, because a JWT header segment or a plausible
base64 blob reads as a live secret to the scanner.
The paragraph describes those shapes rather than quoting one, since a document
warning about credential-shaped literals is a poor place to leave one.1 parent e4019fa commit c3fe57d
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
475 | 490 | | |
476 | 491 | | |
477 | 492 | | |
| |||
0 commit comments