Makefile: bump GOLANGCI_LINT_VERSION to v1.61
v1.60 seems to have some issues [1] with something in our dependency chain. Update to v1.61 and fix all new issues. New issues are all instances of potential integer overflow from int -> uint conversions. Added guards where appropriate and disabled the check when when it's not needed. [1] https://github.com/osbuild/osbuild-composer/actions/runs/16624417387/job/47037518471
This commit is contained in:
parent
6497b7520d
commit
b3d1e4cf13
7 changed files with 23 additions and 12 deletions
|
|
@ -140,7 +140,10 @@ func (h *apiHandlers) PostCompose(ctx echo.Context) error {
|
|||
|
||||
var id uuid.UUID
|
||||
if request.Koji != nil {
|
||||
id, err = h.server.enqueueKojiCompose(uint64(request.Koji.TaskId), request.Koji.Server, request.Koji.Name, request.Koji.Version, request.Koji.Release, irs, channel)
|
||||
if request.Koji.TaskId < 0 {
|
||||
return fmt.Errorf("invalid Koji task ID: %d", request.Koji.TaskId)
|
||||
}
|
||||
id, err = h.server.enqueueKojiCompose(uint64(request.Koji.TaskId), request.Koji.Server, request.Koji.Name, request.Koji.Version, request.Koji.Release, irs, channel) // nolint: gosec
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ func (s *Server) enqueueKojiCompose(taskID uint64, server, name, version, releas
|
|||
KojiFilenames: kojiFilenames,
|
||||
KojiDirectory: kojiDirectory,
|
||||
TaskID: taskID,
|
||||
StartTime: uint64(time.Now().Unix()),
|
||||
StartTime: uint64(time.Now().Unix()), // nolint: gosec
|
||||
}, initID, buildIDs, channel)
|
||||
if err != nil {
|
||||
return id, HTTPErrorWithInternal(ErrorEnqueueingJob, err)
|
||||
|
|
|
|||
|
|
@ -611,7 +611,7 @@ func TestKojiJobTypeValidation(t *testing.T) {
|
|||
KojiFilenames: filenames,
|
||||
KojiDirectory: "koji-server-test-dir",
|
||||
TaskID: 0,
|
||||
StartTime: uint64(time.Now().Unix()),
|
||||
StartTime: uint64(time.Now().Unix()), // nolint: gosec
|
||||
}
|
||||
finalizeID, err := workers.EnqueueKojiFinalize(&finalizeJob, initID, buildJobIDs, "")
|
||||
require.NoError(t, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue