scan

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

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

func (s *Scanner) ScanZarfPackage(org, packageName, tag string) ([]string, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL