Address gosec warnings

This commit is contained in:
AlexSSD7 2023-09-02 12:14:02 +01:00
commit 7ef53ac8d8
4 changed files with 16 additions and 10 deletions

View file

@ -65,7 +65,7 @@ func (s *Storage) ListNetTapAllocations() ([]nettap.Alloc, error) {
for _, entry := range dirEntries {
if strings.HasPrefix(entry.Name(), tapAllocPrefix) {
entryPath := filepath.Join(s.path, entry.Name())
entryPath := filepath.Clean(filepath.Join(s.path, entry.Name()))
tapName := strings.TrimPrefix(entry.Name(), tapAllocPrefix)
err := nettap.ValidateTapName(tapName)