File tree Expand file tree Collapse file tree 5 files changed +8
-10
lines changed
pkg/apis/postgres-operator.crunchydata.com/v1beta1 Expand file tree Collapse file tree 5 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -155,10 +155,9 @@ type ClusterRoleApiResource struct {
155155 ClusterId string `json:"cluster_id"`
156156 Flavor string `json:"flavor"`
157157 Name string `json:"name"`
158- //nolint:gosec // G117: JSON serialization field for API response, not a hardcoded credential.
159- Password string `json:"password"`
160- Team string `json:"team_id"`
161- URI string `json:"uri"`
158+ Password string `json:"password"`
159+ Team string `json:"team_id"`
160+ URI string `json:"uri"`
162161}
163162
164163// ClusterRoleList holds a slice of ClusterRoleApiResource
@@ -279,8 +278,7 @@ func (c *Client) doWithBackoff(
279278
280279 if err == nil {
281280 request .Header = headers .Clone ()
282-
283- //nolint:bodyclose,gosec // bodyclose: response returned to caller; G704: URL is from trusted Bridge API configuration.
281+ //nolint:bodyclose // response returned to caller.
284282 response , err = c .Do (request )
285283 }
286284
Original file line number Diff line number Diff line change @@ -1229,6 +1229,7 @@ func TestGetClusterRole(t *testing.T) {
12291229 }
12301230
12311231 t .Run ("WeSendCorrectData" , func (t * testing.T ) {
1232+ //nolint:gosec // G117: Password is part of the API resource struct, not a credential in test context.
12321233 responsePayloadJson , err := json .Marshal (clusterRoleApiResource )
12331234 assert .NilError (t , err )
12341235
@@ -1251,6 +1252,7 @@ func TestGetClusterRole(t *testing.T) {
12511252 })
12521253
12531254 t .Run ("OkResponse" , func (t * testing.T ) {
1255+ //nolint:gosec // G117: Password is part of the API resource struct, not a credential in test context.
12541256 responsePayloadJson , err := json .Marshal (clusterRoleApiResource )
12551257 assert .NilError (t , err )
12561258
@@ -1269,6 +1271,7 @@ func TestGetClusterRole(t *testing.T) {
12691271 })
12701272
12711273 t .Run ("ErrorResponse" , func (t * testing.T ) {
1274+ //nolint:gosec // G117: Password is part of the API resource struct, not a credential in test context.
12721275 responsePayloadJson , err := json .Marshal (clusterRoleApiResource )
12731276 assert .NilError (t , err )
12741277
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import (
1717)
1818
1919type TestBridgeClient struct {
20- //nolint:gosec // G117: Test mock struct field, not a hardcoded credential.
2120 ApiKey string `json:"apiKey,omitempty"`
2221 TeamId string `json:"teamId,omitempty"`
2322 Clusters []* bridge.ClusterApiResource `json:"clusters,omitempty"`
Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ var self = new(struct {
3939type AuthObject struct {
4040 ID string `json:"id"`
4141 ExpiresAt time.Time `json:"expires_at"`
42- //nolint:gosec // G117: JSON serialization field for API response, not a hardcoded credential.
43- Secret string `json:"secret"`
42+ Secret string `json:"secret"`
4443}
4544
4645type Installation struct {
Original file line number Diff line number Diff line change @@ -77,7 +77,6 @@ type CrunchyBridgeClusterSpec struct {
7777
7878 // The name of the secret containing the API key and team id
7979 // +kubebuilder:validation:Required
80- //nolint:gosec // G117: Field holds secret name reference, not actual secret data.
8180 Secret string `json:"secret"`
8281
8382 // The amount of storage available to the cluster in gigabytes.
You can’t perform that action at this time.
0 commit comments