Skip to content

Commit

Permalink
nosec alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Nov 15, 2023
1 parent 612c07a commit 935db56
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rpc/namespaces/ethereum/debug/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (a *API) StartCPUProfile(file string) error {
a.logger.Debug("failed to get filepath for the CPU profile file", "error", err.Error())
return err
}
/* #nosec */
// #nosec G304 variable value is controlled
f, err := os.Create(fp)
if err != nil {
a.logger.Debug("failed to create CPU profile file", "error", err.Error())
Expand Down
2 changes: 1 addition & 1 deletion rpc/namespaces/ethereum/debug/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (a *API) StartGoTrace(file string) error {
a.logger.Debug("failed to get filepath for the CPU profile file", "error", err.Error())
return err
}
/* #nosec */
// #nosec G304 variable value is controlled
f, err := os.Create(fp)
if err != nil {
a.logger.Debug("failed to create go trace file", "error", err.Error())
Expand Down
2 changes: 1 addition & 1 deletion rpc/namespaces/ethereum/debug/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func writeProfile(name, file string, log log.Logger) error {
if err != nil {
return err
}
/* #nosec */
// #nosec G304 variable value is controlled
f, err := os.Create(fp)
if err != nil {
return err
Expand Down

0 comments on commit 935db56

Please sign in to comment.