2022-06-15 15:23:00 +03:00
|
|
|
package api
|
|
|
|
|
|
2025-03-07 14:10:15 +04:00
|
|
|
import (
|
|
|
|
|
"github.com/aquasecurity/trivy/pkg/module/serialize"
|
|
|
|
|
"github.com/aquasecurity/trivy/pkg/types"
|
|
|
|
|
)
|
2022-06-15 15:23:00 +03:00
|
|
|
|
|
|
|
|
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
|
2025-03-07 14:10:15 +04:00
|
|
|
PostScan(results types.Results) (types.Results, error)
|
2022-06-15 15:23:00 +03:00
|
|
|
}
|