forked from nihonium/linux-auth
add gosec (3rd sast tool)
This commit is contained in:
parent
0573622056
commit
04969ee6f8
3 changed files with 33 additions and 0 deletions
17
sast_results/gosec.txt
Normal file
17
sast_results/gosec.txt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue