Radish alpha
r
rad:zwTxygwuz5LDGBq255RA2CbNGrz8
Radicle CI broker
Radicle
Git
feat: store sensitive environment variables in a new type
Merged liw opened 1 year ago

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

liw opened with revision 90f6ff0b on base 26d55f06 +148 -6 1 year ago

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

liw pushed revision 2 6b7894a9 on base 26d55f06 +148 -6 1 year ago
liw pushed revision 3 dfb02120 on base 26d55f06 +149 -6 1 year ago
liw merged revision dfb02120 at 5aea92df 1 year ago