mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
* fix: update config struct to not decode password/key * test: update tests to confirm no secrets in output Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com> --------- Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
15 lines
419 B
Go
15 lines
419 B
Go
package config
|
|
|
|
import "github.com/spf13/viper"
|
|
|
|
type attest struct {
|
|
// IMPORTANT: do not show the attestation key/password in any YAML/JSON output (sensitive information)
|
|
Key string `yaml:"-" json:"-" mapstructure:"key"`
|
|
Password string `yaml:"-" json:"-" mapstructure:"password"`
|
|
}
|
|
|
|
func (cfg attest) loadDefaultValues(v *viper.Viper) {
|
|
v.SetDefault("attest.key", "")
|
|
v.SetDefault("attest.password", "")
|
|
}
|