Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/auth_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func AuthenticatedApiKeyClient(ctx context.Context) sdpconnect.ApiKeyServiceClie
url = viper.GetString("url")
viper.Set("api-key-url", url)
}
log.WithContext(ctx).WithField("api-key-url", url).Debug("Connecting to overmind apikeys API")
log.WithContext(ctx).WithField("api-key-url", url).Debug("Connecting to overmind apikeys API (pre-authenticated)")
return sdpconnect.NewApiKeyServiceClient(httpClient, url)
}

Expand All @@ -33,7 +33,7 @@ func UnauthenticatedApiKeyClient(ctx context.Context) sdpconnect.ApiKeyServiceCl
url = viper.GetString("url")
viper.Set("api-key-url", url)
}
log.WithContext(ctx).WithField("api-key-url", url).Debug("Connecting to overmind apikeys API (unauthenticated)")
log.WithContext(ctx).WithField("api-key-url", url).Debug("Connecting to overmind apikeys API")
return sdpconnect.NewApiKeyServiceClient(otelhttp.DefaultClient, url)
}

Expand Down
13 changes: 11 additions & 2 deletions cmd/submitplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,23 @@ func changingItemQueriesFromPlan(ctx context.Context, planJSON []byte, lf log.Fi
}

u := uuid.New()
changing_items = append(changing_items, &sdp.Query{
newQuery := sdp.Query{
Type: mapData.Type,
Method: mapData.Method,
Query: query.(string),
Scope: scope,
RecursionBehaviour: &sdp.Query_RecursionBehaviour{},
UUID: u[:],
})
}

changing_items = append(changing_items, &newQuery)

log.WithContext(ctx).WithFields(log.Fields{

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

[Sensitive data returned by an access to apiKey](1) flows to a logging call.
"scope": newQuery.Scope,
"type": newQuery.Type,
"query": newQuery.Query,
"method": newQuery.Method.String(),
}).Debug("mapped terraform to query")
}
}

Expand Down