feat(configcmd): Spec.SecretKeys redacts a program's own secret options
"config show" redacted only keys whose last segment is secrets, secret, token or password. A program's own secrets (database.url, oidc.client_secret, smtp.url, ...) were printed, so programs disabled show. Spec.SecretKeys names them as dotted keys (a key covers everything below it); Effective carries them to Values and Show. First consumer: yaemp and yaemp-mcp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
31dbc347e8
commit
8513b6db4c
5 files changed
+67
-4
No files matched your search
@@ -116,6 +116,12 @@ type Spec struct {
|
||||
// options (see Missing). Optional.
|
||||
Schema any
|
||||
|
||||
// SecretKeys are the program's own secret options, as dotted keys
|
||||
// ("database.url", "oidc.client_secret"): "config show" redacts them
|
||||
// like the keys it always treats as secret (a last segment secrets,
|
||||
// secret, token or password). A key also covers everything below it.
|
||||
SecretKeys []string
|
||||
|
||||
// Options are passed through to core/config; tests use them to
|
||||
// inject a platform, environment, root and working directory.
|
||||
Options []coreconfig.Option
|
||||
|
||||
Reference in new issue
Block a user