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