17 lines
522 B
Text
17 lines
522 B
Text
Results:
|
|
|
|
|
|
[/home/vovuas/linux-auth/internal/config/config.go:41] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
|
|
40: func Load(path string) (*Config, error) {
|
|
> 41: data, err := os.ReadFile(path)
|
|
42: if err != nil {
|
|
|
|
Autofix: Consider using os.Root to scope file access under a fixed root (Go >=1.24). Prefer root.Open/root.Stat over os.Open/os.Stat to prevent directory traversal.
|
|
|
|
Summary:
|
|
Gosec : 2.24.7
|
|
Files : 8
|
|
Lines : 545
|
|
Nosec : 0
|
|
Issues : 1
|
|
|