return an error if not appsec-rules matches
This commit is contained in:
parent
52c1e16216
commit
bb307dd339
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package appsec
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
@ -128,6 +129,9 @@ func LoadCollection(pattern string, logger *log.Entry) ([]AppsecCollection, erro
|
|||
}
|
||||
ret = append(ret, appsecCol)
|
||||
}
|
||||
if len(ret) == 0 {
|
||||
return nil, fmt.Errorf("no appsec-rules found for pattern %s", pattern)
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue