mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 23:26:39 -08:00
feat: add support for WASM modules (#2195)
This commit is contained in:
26
pkg/module/api/api.go
Normal file
26
pkg/module/api/api.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package api
|
||||
|
||||
import "github.com/aquasecurity/trivy/pkg/module/serialize"
|
||||
|
||||
const (
|
||||
Version = 1
|
||||
|
||||
ActionInsert serialize.PostScanAction = "INSERT"
|
||||
ActionUpdate serialize.PostScanAction = "UPDATE"
|
||||
ActionDelete serialize.PostScanAction = "DELETE"
|
||||
)
|
||||
|
||||
type Module interface {
|
||||
Version() int
|
||||
Name() string
|
||||
}
|
||||
|
||||
type Analyzer interface {
|
||||
RequiredFiles() []string
|
||||
Analyze(filePath string) (*serialize.AnalysisResult, error)
|
||||
}
|
||||
|
||||
type PostScanner interface {
|
||||
PostScanSpec() serialize.PostScanSpec
|
||||
PostScan(serialize.Results) (serialize.Results, error)
|
||||
}
|
||||
Reference in New Issue
Block a user