Closed shundhammer closed 7 months ago
I think SecretAttributes
mixin could be useful here, see https://github.com/yast/yast-yast2/blob/master/library/general/src/lib/yast2/secret_attributes.rb.
Superseded by PR #1360 which uses secret_attr
from YaST::SecretAttributes
.
Proof of Concept [superseded]
Problem
Secret attributes of the wifi connection object might leak to the logs, e.g. if methods like
inspect()
are used.Fix
Use a custom
inspect()
method that clones the original object and sanitizes all fields that should not be logged verbatim (replacing each one with a special string<sanitized>
).Related PR
Superseded by PR #1360 which uses
attr_secret
fromYaST2::SecretAttributes
.