Skip to content

Commit

Permalink
cmd/exec: Annotate safe int -> uint8 conversion
Browse files Browse the repository at this point in the history
This commit annotates a safe conversion from int to uint8.
  • Loading branch information
tkw1536 committed Nov 17, 2024
1 parent 66d6727 commit 3c93f1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (e exe) runRepo(io stream.IOStream, repo string) error {
// but actually return other error properly!
if ee, ok := err.(*exec.ExitError); ok {
return exit.Error{
ExitCode: exit.ExitCode(ee.ExitCode()),
ExitCode: exit.ExitCode(ee.ExitCode()), // #nosec G115 exit status guaranteed to fit into uint8
Message: ee.Error(),
}
}
Expand Down Expand Up @@ -204,3 +204,5 @@ func (e exe) runSimulate(context ggman.Context) (err error) {

return err
}

// spellchecker:words nosec

0 comments on commit 3c93f1d

Please sign in to comment.