-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Implement GOSec for security scanning Fix vulnerabilities #227
Conversation
cmd/runmqdevserver/keystore.go
Outdated
} | ||
err = os.Remove(crlFile) | ||
if err != nil { | ||
log.Debugf("Error removing %s: %v", crlFile, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these should be regular log messages, not debug ones. Also, in the case of removing files failing, maybe we should just fail.
internal/metrics/metrics.go
Outdated
@@ -25,6 +25,7 @@ import ( | |||
|
|||
"github.com/ibm-messaging/mq-container/internal/logger" | |||
"github.com/prometheus/client_golang/prometheus" | |||
"github.com/prometheus/common/log" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the wrong log implementation to use.
f.Close() | ||
stdin.Close() | ||
err = f.Close() | ||
if err != nil { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
cmd/runmqserver/mirror.go
Outdated
f.Close() | ||
err = f.Close() | ||
if err != nil { | ||
log.Debugf("Unable to close mirror file handle: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normal log entry
cmd/runmqdevserver/mqsc.go
Outdated
os.Remove(mqsc) | ||
err := os.Remove(mqsc) | ||
if err != nil { | ||
log.Debugf("Error removing file %s: %v", mqsc, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log normally
cmd/runmqdevserver/main.go
Outdated
// #nosec G204 | ||
err = syscall.Exec("/usr/local/bin/runmqserver", []string{"runmqserver"}, os.Environ()) | ||
if err != nil { | ||
log.Debugf("Error replacing this process with runmqserver: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log normally
cmd/runmqdevserver/main.go
Outdated
stdin.Close() | ||
err = stdin.Close() | ||
if err != nil { | ||
log.Debugf("Error closing password stdin: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log normally
cmd/runmqdevserver/keystore.go
Outdated
} | ||
err = os.Remove(ks.Filename) | ||
if err != nil { | ||
log.Debugf("Error removing %s: %v", ks.Filename, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log normally
cmd/runmqserver/qmgr.go
Outdated
stdin.Close() | ||
err = f.Close() | ||
if err != nil { | ||
log.Debugf("Failed to close MQSC file handle: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log normally
No description provided.