From 1ac1381fd6f9609b87861f021b036c847334f80e Mon Sep 17 00:00:00 2001 From: HIROSE Masaaki Date: Mon, 20 Feb 2023 21:14:48 +0900 Subject: [PATCH] Pass make lint security --- pkg/c/controller.go | 1 + pkg/m/s3.go | 3 ++- pkg/v/ui.go | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/c/controller.go b/pkg/c/controller.go index cdb2085..e3253d5 100644 --- a/pkg/c/controller.go +++ b/pkg/c/controller.go @@ -1,3 +1,4 @@ +// Package c provides Controller. package c import ( diff --git a/pkg/m/s3.go b/pkg/m/s3.go index f59c567..d708c36 100644 --- a/pkg/m/s3.go +++ b/pkg/m/s3.go @@ -1,3 +1,4 @@ +// Package m provides S3 models. package m import ( @@ -283,7 +284,7 @@ func (s3m S3Model) Download(object s3types.Object, destPath string) (n int64, er return 0, fmt.Errorf("exists") } - fp, err := os.Create(destPath) + fp, err := os.Create(filepath.Clean(destPath)) if err != nil { return 0, err } diff --git a/pkg/v/ui.go b/pkg/v/ui.go index b92d686..cb613ce 100644 --- a/pkg/v/ui.go +++ b/pkg/v/ui.go @@ -1,3 +1,4 @@ +// Package v provides UI View package v import (