@@ -41,7 +41,7 @@ func ValidateZip(src string, refs []string, out *log.Logger) error {
4141
4242// ValidateFile opens the tar file given by the filename, then calls ValidateReader
4343func ValidateFile (tarFile string , refs []string , out * log.Logger ) error {
44- f , err := os .Open (tarFile )
44+ f , err := os .Open (tarFile ) // nolint: errcheck, gosec
4545 if err != nil {
4646 return errors .Wrap (err , "unable to open file" )
4747 }
@@ -160,7 +160,7 @@ func UnpackZip(src, dest, platform string, refs []string) error {
160160
161161// UnpackFile opens the file pointed by tarFileName and calls Unpack on it.
162162func UnpackFile (tarFileName , dest , platform string , refs []string ) error {
163- f , err := os .Open (tarFileName )
163+ f , err := os .Open (tarFileName ) // nolint: errcheck, gosec
164164 if err != nil {
165165 return errors .Wrap (err , "unable to open file" )
166166 }
@@ -245,7 +245,7 @@ func CreateRuntimeBundleZip(src, dest, root, platform string, refs []string) err
245245// CreateRuntimeBundleFile opens the file pointed by tarFile and calls
246246// CreateRuntimeBundle.
247247func CreateRuntimeBundleFile (tarFile , dest , root , platform string , refs []string ) error {
248- f , err := os .Open (tarFile )
248+ f , err := os .Open (tarFile ) // nolint: errcheck, gosec
249249 if err != nil {
250250 return errors .Wrap (err , "unable to open file" )
251251 }
@@ -320,7 +320,7 @@ func createBundle(w walker, m *v1.Manifest, dest, rootfs string) (retErr error)
320320
321321 if _ , err = os .Stat (dest ); err != nil {
322322 if os .IsNotExist (err ) {
323- if err2 := os .MkdirAll (dest , 0755 ); err2 != nil {
323+ if err2 := os .MkdirAll (dest , 0750 ); err2 != nil {
324324 return err2
325325 }
326326 defer func () {
@@ -382,7 +382,7 @@ func filterManifest(w walker, Manifests []v1.Descriptor, platform string) ([]*v1
382382 }
383383
384384 if len (manifests ) == 0 {
385- return manifests , fmt .Errorf ("There is no matching manifest" )
385+ return manifests , fmt .Errorf ("there is no matching manifest" )
386386 }
387387
388388 return manifests , nil
0 commit comments