github.com/aquasecurity/trivy-iac@v0.8.1-0.20240127024015-3d8e412cf0ab/pkg/scanners/scanner.go (about) 1 package scanners 2 3 import ( 4 "context" 5 "io/fs" 6 "os" 7 8 "github.com/aquasecurity/defsec/pkg/scan" 9 ) 10 11 type WriteFileFS interface { 12 WriteFile(name string, data []byte, perm os.FileMode) error 13 } 14 15 type FSScanner interface { 16 // Name provides the human-readable name of the scanner e.g. "CloudFormation" 17 Name() string 18 // ScanFS scans the given filesystem for issues, starting at the provided directory. 19 // Use '.' to scan an entire filesystem. 20 ScanFS(ctx context.Context, fs fs.FS, dir string) (scan.Results, error) 21 }