Radish alpha
r
rad:zwTxygwuz5LDGBq255RA2CbNGrz8
Radicle CI broker
Radicle
Git
Chore: Prohibit cib from logging sensitive configuration
Merged did:key:z6MkkpTP...arsB opened 1 year ago

Changed debug2 with a newly added func adapter_config in cib wchich logs adapter’s configuration without the sensitive environment variables.

Signed-off-by: Michalis Zampetakis mzampetakis@gmail.com

did:key:z6MkkpTP...arsB opened with revision bc2cc001 on base 975ce518 +5 -2 1 year ago

Changed debug2 with a newly added func adapter_config in cib wchich logs adapter’s configuration without the sensitive environment variables.

Signed-off-by: Michalis Zampetakis mzampetakis@gmail.com

liw commented on revision 1 1 year ago

This has clippy warnings:

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> src/bin/cib.rs:144:32
    |
144 |         logger::adapter_config(&config);
    |                                ^^^^^^^ help: change this to: `config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `-D clippy::needless-borrow` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> src/bin/cib.rs:218:32
    |
218 |         logger::adapter_config(&config);
    |                                ^^^^^^^ help: change this to: `config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

I’ll fix those.

liw commented on revision 1 1 year ago

I’m not sure this actually prevents sensitive environment variables from being logged. It would seem to require that the minimum logging level is higher than DEBUG. At the moment the CI broker doesn’t have a way of setting that, but that will happen fairly soon, so I’m not worried about that right now.

liw pushed revision 2 88a456a0 on base 975ce518 +6 -2 1 year ago

Fixes to prepare patch to be merged.

liw merged revision 88a456a0 at a9fea0fd 1 year ago