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
2 changes: 0 additions & 2 deletions hack/extract-licenses.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ the environment: https://go.dev/ref/mod#module-cache`,
err = os.WriteFile(destination, data, 0o600)
}
if err == nil {
//nolint:gosec // G705: Output is file paths, not user input rendered in HTML.
fmt.Fprintln(os.Stdout, license, "=>", destination)
}
if err != nil {
Expand Down Expand Up @@ -234,7 +233,6 @@ func identifyModules(ctx context.Context, executables ...string) []string {
// The `go version -m` command returns no information for empty files, and it
// is possible for a Go executable to have no main module and no dependencies.
if len(result) == 0 {
//nolint:gosec // G705: Output is file paths, not user input rendered in HTML.
fmt.Fprintf(os.Stderr, "no Go modules in %v\n", executables)
os.Exit(0)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/collector/postgres_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func EnablePostgresMetrics(ctx context.Context, inCluster *v1beta1.PostgresClust
// appendToJSONArray appends elements of a json.RawMessage containing an array
// to another json.RawMessage containing an array.
func appendToJSONArray(a1, a2 json.RawMessage) (json.RawMessage, error) {
var slc1 []json.RawMessage
var slc1 []json.RawMessage //nolint:prealloc // Populated by json.Unmarshal, not manual appends.
if err := json.Unmarshal(a1, &slc1); err != nil {
return nil, err
}
Expand Down
3 changes: 2 additions & 1 deletion internal/controller/standalone_pgadmin/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ type pgAdminUserForJson struct {
IsAdmin bool `json:"isAdmin"`

// The user's password
//nolint:gosec // G117: This is a JSON serialization struct, not a hardcoded credential.
Password string `json:"password"`

// The username for User in pgAdmin.
Expand Down Expand Up @@ -333,6 +332,8 @@ cd $PGADMIN_DIR
// to add a user, that user will not be in intentUsers. If errors occurred when attempting to
// update a user, the user will be in intentUsers as it existed before. We now want to marshal the
// intentUsers to json and write the users.json file to the secret.

//nolint:gosec // G117: Password is intentionally stored in a Kubernetes Secret.
intentUserSecret.Data["users.json"], _ = json.Marshal(intentUsers)

err = errors.WithStack(r.setControllerReference(pgadmin, intentUserSecret))
Expand Down
Loading