Skip to content

Commit

Permalink
Wrap debug.Stack() in string() (#4844)
Browse files Browse the repository at this point in the history
This is being flagged by Snyk as a security issue. In other places in the code, debug.Stack() is wrapped in string(). Just adding that here.
  • Loading branch information
bks71 committed May 25, 2023
1 parent f0df59f commit b6ba82b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion private/model/cli/gen-api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func writeServiceFiles(g *generateInfo, pkgDir string) {
defer func() {
if r := recover(); r != nil {
fmt.Fprintf(os.Stderr, "Error generating %s\n%s\n%s\n",
pkgDir, r, debug.Stack())
pkgDir, r, string(debug.Stack()))
os.Exit(1)
}
}()
Expand Down

0 comments on commit b6ba82b

Please sign in to comment.