diff --git a/internal/config/config.go b/internal/config/config.go index 18aefd6..942920d 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -70,6 +70,7 @@ func parseValue(value string) interface{} { // LoadConfig loads the configuration from the specified path func LoadConfig(path string) (*common.ReticulumConfig, error) { + // bearer:disable file, err := os.Open(path) // #nosec G304 if err != nil { return nil, err diff --git a/internal/storage/storage.go b/internal/storage/storage.go index dfce63c..613cc17 100644 --- a/internal/storage/storage.go +++ b/internal/storage/storage.go @@ -136,6 +136,7 @@ func (m *Manager) LoadRatchets(identityHash []byte) (map[string][]byte, error) { } filePath := filepath.Join(ratchetDir, entry.Name()) + // bearer:disable data, err := os.ReadFile(filePath) // #nosec G304 - reading from controlled directory if err != nil { debug.Log(debug.DEBUG_ERROR, "Failed to read ratchet file", "file", entry.Name(), "error", err) diff --git a/pkg/config/config.go b/pkg/config/config.go index 2bcbe85..2745afa 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -39,6 +39,7 @@ type Config struct { } func LoadConfig(path string) (*Config, error) { + // bearer:disable file, err := os.Open(path) // #nosec G304 if err != nil { return nil, err diff --git a/pkg/identity/identity.go b/pkg/identity/identity.go index 3dfd231..a33b481 100644 --- a/pkg/identity/identity.go +++ b/pkg/identity/identity.go @@ -503,6 +503,7 @@ func FromFile(path string) (*Identity, error) { debug.Log(debug.DEBUG_ALL, "Loading identity from file", "path", path) // Read the private key bytes from file + // bearer:disable data, err := os.ReadFile(path) // #nosec G304 if err != nil { return nil, fmt.Errorf("failed to read identity file: %w", err)