Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, logger types.Logger, dockerUsername, dockerPassword string) (*Scanner, error)
New creates a new Scanner.
func (*Scanner) ScanResultReader ¶
func (s *Scanner) ScanResultReader(jsonFilePath string) (types.ScanResultReader, error)
ScanResultReader creates a new ScanResultReader from a JSON file. This takes a trivy scan result file and returns a ScanResultReader.
Parameters:
- jsonFilePath: The path to the JSON file containing the scan results.
Returns:
- types.ScanResultReader: An instance of ScanResultReader that can be used to access the scan results.
- error: An error if the file cannot be opened or the JSON cannot be decoded.
func (*Scanner) ScanZarfPackage ¶
ScanZarfPackage scans a Zarf package and returns the scan results.
Parameters:
- org: The organization that owns the package.
- packageName: The name of the package to scan.
- tag: The tag of the package to scan.
Returns:
- []string: A slice of file paths containing the scan results in JSON format.
- error: An error if the scan operation fails.
Click to show internal directories.
Click to hide internal directories.