scan

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ScanCommand is terrascan's scan command
	ScanCommand string = "scan"

	// ScanTimeout is default scan command execution timeout
	ScanTimeout int = 3

	// RemoteScanTimeout is default scan command remote execution timeout
	RemoteScanTimeout int = 30
)

Variables

This section is empty.

Functions

func RunScanAndAssertErrorMessage

func RunScanAndAssertErrorMessage(terrascanBinaryPath string, exitCode, timeOut int, errString string, outWriter, errWriter io.Writer, args ...string)

RunScanAndAssertErrorMessage runs the scan command with supplied paramters and checks of error string is present

func RunScanAndAssertGoldenOutput

func RunScanAndAssertGoldenOutput(terrascanBinaryPath, relGoldenFilePath string, exitCode int, isStdOut bool, outWriter, errWriter io.Writer, args ...string)

RunScanAndAssertGoldenOutput runs the scan command with supplied paramters and compares actual and golden output

func RunScanAndAssertGoldenOutputRegex

func RunScanAndAssertGoldenOutputRegex(terrascanBinaryPath, relGoldenFilePath string, exitCode int, isJunitXML, isStdOut bool, outWriter, errWriter io.Writer, args ...string)

RunScanAndAssertGoldenOutputRegex runs the scan command with supplied paramters and compares actual and golden output it replaces variable parts in output with regex eg: timestamp, file path

func RunScanAndAssertGoldenSarifOutputRegex

func RunScanAndAssertGoldenSarifOutputRegex(terrascanBinaryPath, relGoldenFilePath string, exitCode int, outWriter, errWriter io.Writer, args ...string)

RunScanAndAssertGoldenSarifOutputRegex runs the scan command with supplied paramters and compares actual and golden output it replaces variable parts in output with regex eg: uri, version path

func RunScanAndAssertJSONOutput

func RunScanAndAssertJSONOutput(terrascanBinaryPath, relGoldenFilePath string, exitCode int, isJunitXML, isStdOut bool, outWriter, errWriter io.Writer, args ...string)

RunScanAndAssertJSONOutput runs the scan command with supplied paramters and compares actual and golden output

func RunScanAndAssertJSONOutputString

func RunScanAndAssertJSONOutputString(terrascanBinaryPath, goldenString string, exitCode int, isStdOut bool, outWriter, errWriter io.Writer, args ...string)

RunScanAndAssertJSONOutputString runs the scan command with supplied paramters and compares actual and golden output

func RunScanAndAssertXMLOutput

func RunScanAndAssertXMLOutput(terrascanBinaryPath, relGoldenFilePath string, exitCode int, isJunitXML, isStdOut bool, outWriter, errWriter io.Writer, args ...string)

RunScanAndAssertXMLOutput runs the scan command with supplied paramters and compares actual and golden output

func RunScanAndAssertYAMLOutput

func RunScanAndAssertYAMLOutput(terrascanBinaryPath, relGoldenFilePath string, exitCode int, isJunitXML, isStdOut bool, outWriter, errWriter io.Writer, args ...string)

RunScanAndAssertYAMLOutput runs the scan command with supplied paramters and compares actual and golden output

func RunScanCommand

func RunScanCommand(terrascanBinaryPath, relGoldenFilePath string, exitCode int, outWriter, errWriter io.Writer, args ...string) (*gexec.Session, string)

RunScanCommand executes the scan command, validates exit code

Types

This section is empty.

Jump to

Keyboard shortcuts

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