Add 'bearer:disable go_gosec_filesystem_filereadtaint' comments to file loading functions across config and identity modules to suppress specific security scanner warnings
This commit is contained in:
@@ -70,7 +70,7 @@ func parseValue(value string) interface{} {
|
||||
|
||||
// LoadConfig loads the configuration from the specified path
|
||||
func LoadConfig(path string) (*common.ReticulumConfig, error) {
|
||||
// bearer:disable
|
||||
// bearer:disable go_gosec_filesystem_filereadtaint
|
||||
file, err := os.Open(path) // #nosec G304
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -136,7 +136,7 @@ func (m *Manager) LoadRatchets(identityHash []byte) (map[string][]byte, error) {
|
||||
}
|
||||
|
||||
filePath := filepath.Join(ratchetDir, entry.Name())
|
||||
// bearer:disable
|
||||
// bearer:disable go_gosec_filesystem_filereadtaint
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user