Upgrade dependent version: github.com/open-policy-agent/opa v0.18.0 -> v0.45.0 Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io> Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>
18 lines
229 B
Go
18 lines
229 B
Go
//go:build gofuzz
|
|
// +build gofuzz
|
|
|
|
package ast
|
|
|
|
func Fuzz(data []byte) int {
|
|
|
|
str := string(data)
|
|
_, _, err := ParseStatements("", str)
|
|
|
|
if err == nil {
|
|
CompileModules(map[string]string{"": str})
|
|
return 1
|
|
}
|
|
|
|
return 0
|
|
}
|