You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7fc4d8e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: cmd/configure_azure.go
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -130,7 +130,7 @@ func storeAzureCredentials(ctx context.Context, store SecretsStore, stackName st
130
130
}
131
131
132
132
// Marshal credentials to JSON
133
-
credJSON, err:=json.Marshal(creds)
133
+
credJSON, err:=json.Marshal(creds)// #nosec G117 -- intentional: marshaling Azure credential struct (contains ClientSecret field) for secure storage in the credential store
134
134
iferr!=nil {
135
135
returnfmt.Errorf("failed to marshal credentials: %w", err)
136
136
}
@@ -341,7 +341,7 @@ func createAzureServicePrincipal(reader *bufio.Reader, subscriptionID string) er
cmd:=exec.Command(program, args...)// #nosec G204 -- configure CLI tool; program is always "az" (Azure CLI) per all callers; no user input reaches this function
credsData, err:=os.ReadFile(expandedPath)// #nosec G304 -- GCP credentials file path is operator-supplied via CLI argument; operator controls the value
214
214
iferr!=nil {
215
215
returnGCPCredentials{}, nil, fmt.Errorf("failed to read credentials file: %w", err)
credsData, err=json.Marshal(creds)// #nosec G117 -- intentional: marshaling GCP credential struct (contains PrivateKey field) for secure storage in the credential store
226
226
iferr!=nil {
227
227
returnGCPCredentials{}, nil, fmt.Errorf("failed to marshal updated credentials: %w", err)
cmd:=exec.Command(program, args...)// #nosec G204 -- configure CLI tool; program is always "gcloud" per all callers; no user input reaches this function
f, err:=os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0600)// #nosec G304 -- audit log path is operator-configured; value is not reachable from user input
537
537
iferr!=nil {
538
538
returnfmt.Errorf("audit log %q not writable: %w", path, err)
0 commit comments