Fix the vulnerability issues in the job service code

'Errors unhandled' in 'jobservice/job/impl/logger/job_logger.go'
'TLS InsecureSkipVerify set true' in 'jobservice/opm/hook_client.go'
This commit is contained in:
Steven Zou 2018-04-12 15:12:39 +08:00
parent 75e6b5d91c
commit b5b728bee3
2 changed files with 1 additions and 5 deletions

View File

@ -34,7 +34,7 @@ func New(logPath string, level string) *JobLogger {
//Implements logger.Closer interface //Implements logger.Closer interface
func (jl *JobLogger) Close() error { func (jl *JobLogger) Close() error {
if jl.streamRef != nil { if jl.streamRef != nil {
jl.streamRef.Close() return jl.streamRef.Close()
} }
return nil return nil

View File

@ -3,7 +3,6 @@
package opm package opm
import ( import (
"crypto/tls"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
@ -38,9 +37,6 @@ func NewHookClient() *HookClient {
Transport: &http.Transport{ Transport: &http.Transport{
MaxIdleConns: maxIdleConnections, MaxIdleConns: maxIdleConnections,
IdleConnTimeout: idleConnectionTimeout, IdleConnTimeout: idleConnectionTimeout,
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
}, },
} }