Only redact the non-sensitive bits of build args and env vars.
* `-e [REDACTED]` → `-e SOME_SECRET=[REDACTED]` * Replaces `Utils.redact` with `Utils.sensitive` to clarify that we're indicating redactability, not actually performing redaction. * Redacts from YAML output, including `mrsk config` (fixes #96)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
module Mrsk::Commands
|
||||
class Base
|
||||
delegate :redact, :argumentize, to: Mrsk::Utils
|
||||
delegate :sensitive, :argumentize, to: Mrsk::Utils
|
||||
|
||||
attr_accessor :config
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class Mrsk::Commands::Builder::Base < Mrsk::Commands::Base
|
||||
end
|
||||
|
||||
def build_args
|
||||
argumentize "--build-arg", args, redacted: true
|
||||
argumentize "--build-arg", args, sensitive: true
|
||||
end
|
||||
|
||||
def build_secrets
|
||||
|
||||
@@ -2,7 +2,7 @@ class Mrsk::Commands::Registry < Mrsk::Commands::Base
|
||||
delegate :registry, to: :config
|
||||
|
||||
def login
|
||||
docker :login, registry["server"], "-u", redact(lookup("username")), "-p", redact(lookup("password"))
|
||||
docker :login, registry["server"], "-u", sensitive(lookup("username")), "-p", sensitive(lookup("password"))
|
||||
end
|
||||
|
||||
def logout
|
||||
|
||||
Reference in New Issue
Block a user