Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NachE committed Dec 15, 2021
1 parent 87ce6f8 commit 236a48d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blueprint/blueprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func NewFromFile(path string) (*Blueprint, error) {
if err != nil {
return nil, err
}
defer jsonFile.Close()
defer jsonFile.Close() //#nosec G307 -- https://github.com/securego/gosec/issues/512
byteValue, _ := ioutil.ReadAll(jsonFile)
var bp Blueprint
jErr := util.UnmarshalValidJSON(byteValue, &bp)
Expand Down
2 changes: 1 addition & 1 deletion config/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func ReadCredential(credentialName string) (*Credential, error) {
if err != nil {
return nil, err
}
defer jsonFile.Close()
defer jsonFile.Close() //#nosec G307 -- https://github.com/securego/gosec/issues/512
byteValue, _ := ioutil.ReadAll(jsonFile)
var crs Credentials
json.Unmarshal(byteValue, &crs)
Expand Down
2 changes: 1 addition & 1 deletion netproto/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (s *sshClient) RunScriptFromLocalPath(localPath string) error { // stdout,
if err != nil {
return err
}
defer file.Close()
defer file.Close() //#nosec G307 -- https://github.com/securego/gosec/issues/512

session, sesserr := s.client.NewSession()
if sesserr != nil {
Expand Down

0 comments on commit 236a48d

Please sign in to comment.