Add 'bearer:disable' comments to configuration and identity file loading functions to suppress security scanner warnings
Some checks failed
Bearer / scan (push) Failing after 32s
Go Build Multi-Platform / build (amd64, freebsd) (push) Successful in 32s
Go Build Multi-Platform / build (arm, linux) (push) Successful in 29s
Go Build Multi-Platform / build (amd64, windows) (push) Successful in 32s
Go Build Multi-Platform / build (arm64, linux) (push) Successful in 42s
Go Build Multi-Platform / build (arm64, windows) (push) Successful in 40s
Go Test Multi-Platform / Test (ubuntu-latest, arm64) (push) Successful in 49s
Go Revive Lint / lint (push) Failing after 24s
Go Test Multi-Platform / Test (ubuntu-latest, amd64) (push) Successful in 1m43s
Run Gosec / tests (push) Successful in 1m5s
Go Build Multi-Platform / build (amd64, linux) (push) Successful in 9m23s
Go Build Multi-Platform / build (amd64, darwin) (push) Successful in 9m25s
Go Build Multi-Platform / build (arm, windows) (push) Successful in 9m23s
Go Build Multi-Platform / build (arm, freebsd) (push) Successful in 9m25s
Go Build Multi-Platform / build (arm64, darwin) (push) Successful in 9m25s
Go Build Multi-Platform / build (arm64, freebsd) (push) Successful in 9m23s
Go Build Multi-Platform / Create Release (push) Has been skipped
Some checks failed
Bearer / scan (push) Failing after 32s
Go Build Multi-Platform / build (amd64, freebsd) (push) Successful in 32s
Go Build Multi-Platform / build (arm, linux) (push) Successful in 29s
Go Build Multi-Platform / build (amd64, windows) (push) Successful in 32s
Go Build Multi-Platform / build (arm64, linux) (push) Successful in 42s
Go Build Multi-Platform / build (arm64, windows) (push) Successful in 40s
Go Test Multi-Platform / Test (ubuntu-latest, arm64) (push) Successful in 49s
Go Revive Lint / lint (push) Failing after 24s
Go Test Multi-Platform / Test (ubuntu-latest, amd64) (push) Successful in 1m43s
Run Gosec / tests (push) Successful in 1m5s
Go Build Multi-Platform / build (amd64, linux) (push) Successful in 9m23s
Go Build Multi-Platform / build (amd64, darwin) (push) Successful in 9m25s
Go Build Multi-Platform / build (arm, windows) (push) Successful in 9m23s
Go Build Multi-Platform / build (arm, freebsd) (push) Successful in 9m25s
Go Build Multi-Platform / build (arm64, darwin) (push) Successful in 9m25s
Go Build Multi-Platform / build (arm64, freebsd) (push) Successful in 9m23s
Go Build Multi-Platform / Create Release (push) Has been skipped
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user