@@ -15,6 +15,7 @@ import (
1515 "github.com/netboxlabs/orb-agent/agent/backend"
1616 "github.com/netboxlabs/orb-agent/agent/config"
1717 "github.com/netboxlabs/orb-agent/agent/policies"
18+ "github.com/netboxlabs/orb-agent/agent/redact"
1819)
1920
2021var _ backend.Backend = (* workerBackend )(nil )
@@ -29,7 +30,6 @@ const (
2930 defaultExec = "orb-worker"
3031 defaultAPIHost = "localhost"
3132 defaultAPIPort = "8071"
32- maskedSecret = "********"
3333)
3434
3535type workerBackend struct {
@@ -160,7 +160,7 @@ func (d *workerBackend) Start(ctx context.Context, cancelFunc context.CancelFunc
160160 if ! d .diodeTargetFromOtel {
161161 opts = append (opts ,
162162 "--diode-client-id" , d .diodeClientID ,
163- "--diode-client-secret" , maskedSecret ,
163+ "--diode-client-secret" , d . diodeClientSecret ,
164164 )
165165 }
166166 dOptions = append (opts , dOptions ... )
@@ -170,17 +170,7 @@ func (d *workerBackend) Start(ctx context.Context, cancelFunc context.CancelFunc
170170 dOptions = append (dOptions , "--otel-endpoint" , d .diodeOtelEndpoint )
171171 }
172172
173- d .logger .Info ("worker startup" , "arguments" , dOptions )
174-
175- if ! d .diodeDryRun {
176- // Swap the masked secret used for logging with the real value before execution
177- for i , arg := range dOptions {
178- if arg == maskedSecret {
179- dOptions [i ] = d .diodeClientSecret
180- break
181- }
182- }
183- }
173+ d .logger .Info ("worker startup" , "arguments" , redact .Args (dOptions ))
184174
185175 d .proc = backend .NewCmdOptions (backend.CmdOptions {
186176 Buffered : false ,
0 commit comments