1
0
mirror of https://github.com/securego/gosec.git synced 2025-06-16 23:47:51 +02:00

Exclude maps from slince bounce check rule (#1006)

Signed-off-by: Cosmin Cojocar <gcojocar@adobe.com>
This commit is contained in:
Cosmin Cojocar
2023-08-23 17:17:14 +02:00
committed by GitHub
parent 21d13c9a9b
commit beef1250a4
2 changed files with 19 additions and 0 deletions

View File

@ -3966,5 +3966,19 @@ func doStuff(x []int) {
newSlice2 := x[:6]
fmt.Println(newSlice2)
}`}, 2, gosec.NewConfig()},
{[]string{`
package main
import "fmt"
func main() {
testMap := make(map[string]any, 0)
testMap["test1"] = map[string]interface{}{
"test2": map[string]interface{}{
"value": 0,
},
}
fmt.Println(testMap)
}`}, 0, gosec.NewConfig()},
}
)