Add a new type for sensitive values.
The CI broker can define sensitive environment variables for each adapter. The idea is the this can be used to configure, say, API keys that the CI run needs. To avoid them leaking accidentally, the code tries to prevent the sensitive value from being printed. However, there have been case where this has failed to be done correctly.
The new type provides the protection in a more concentrated location. The value can be created via serde de-serialization, but can’t be printed using normal formatting, debug formatting, or serde serialization.
None of this makes it a good idea to use environment variables to
convey sensitive values. They’re just a bad idea and you should
probably find a better way to achieve the same thing. However, as long
as the CI broker provides the sensitive_envs configuration variable
the least it can do is try to make it hard to accidentally leak the
values.
This is not a breaking change.
Signed-off-by: Lars Wirzenius liw@liw.fi
Add a new type for sensitive values.
The CI broker can define sensitive environment variables for each adapter. The idea is the this can be used to configure, say, API keys that the CI run needs. To avoid them leaking accidentally, the code tries to prevent the sensitive value from being printed. However, there have been case where this has failed to be done correctly.
The new type provides the protection in a more concentrated location. The value can be created via serde de-serialization, but can’t be printed using normal formatting, debug formatting, or serde serialization.
None of this makes it a good idea to use environment variables to
convey sensitive values. They’re just a bad idea and you should
probably find a better way to achieve the same thing. However, as long
as the CI broker provides the sensitive_envs configuration variable
the least it can do is try to make it hard to accidentally leak the
values.
This is not a breaking change.
Signed-off-by: Lars Wirzenius liw@liw.fi