Documentation
¶
Overview ¶
Package testcred hands tests the tokens, passwords and passphrases they need, generated when the test binary runs rather than written in the source.
A secret scanner cannot tell a test value from a real one and does not try: it matches on shape (a ghp_ prefix, a long mixed string) and on name (any literal under something called password, secret or token). Each such literal is an incident somebody has to open and close by hand. A value that only exists at run time gives the scanner nothing to read.
Values are memoised per purpose, so every assertion in one run sees the same value for the same purpose, and distinct purposes get distinct values. Name each purpose with one plain lowercase word: a scanner reads a compound string in that position as the secret itself.
Only tests import this package, so it is never linked into the binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.