Skip to content

Commit e96da8a

Browse files
committed
disable gosec G115
Signed-off-by: sivchari <[email protected]>
1 parent c487124 commit e96da8a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.golangci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ issues:
162162
- linters:
163163
- gosec
164164
text: "G304: Potential file inclusion via variable"
165+
- linters:
166+
- gosec
167+
text: "G115: integer overflow conversion"
165168
- linters:
166169
- dupl
167170
path: _test\.go

tools/setup-envtest/store/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func (s *Store) Add(ctx context.Context, item Item, contents io.Reader) (resErr
167167
// preferfing our own scheme.
168168
targetPath := filepath.Base(header.Name)
169169
log.V(1).Info("writing archive file to disk", "archive file", header.Name, "on-disk file", targetPath)
170-
perms := 0555 & uint32(header.Mode) // make sure we're at most r+x
170+
perms := 0555 & header.Mode // make sure we're at most r+x
171171
binOut, err := itemPath.OpenFile(targetPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, os.FileMode(perms))
172172
if err != nil {
173173
return fmt.Errorf("unable to create file %s from archive to disk for version-platform pair %s", targetPath, itemName)

0 commit comments

Comments
 (0)