Documentation ¶
Index ¶
- Constants
- Variables
- func CreateScannersConfigFile(fileName string, fileContent interface{}, scanType utils.JasScanType) error
- func GetExcludePatterns(module jfrogappsconfig.Module, scanner *jfrogappsconfig.Scanner) []string
- func GetSourceRoots(module jfrogappsconfig.Module, scanner *jfrogappsconfig.Scanner) ([]string, error)
- func GetTestDataPath() string
- func ReadJasScanRunsFromFile(fileName, wd, informationUrlSuffix string) (sarifRuns []*sarif.Run, err error)
- func ShouldSkipScanner(module jfrogappsconfig.Module, scanType utils.JasScanType) bool
- type JasScanner
- type ScannerCmd
Constants ¶
View Source
const (
NodeModulesPattern = "**/*node_modules*/**"
)
Variables ¶
View Source
var (
DefaultExcludePatterns = []string{"**/.git/**", "**/*test*/**", "**/*venv*/**", NodeModulesPattern, "**/target/**"}
)
View Source
var FakeBasicXrayResults = []services.ScanResponse{ { ScanId: "scanId_1", Vulnerabilities: []services.Vulnerability{ {IssueId: "issueId_1", Technology: coreutils.Pipenv.String(), Cves: []services.Cve{{Id: "testCve1"}, {Id: "testCve2"}, {Id: "testCve3"}}, Components: map[string]services.Component{"issueId_1_direct_dependency": {}, "issueId_3_direct_dependency": {}}}, }, Violations: []services.Violation{ {IssueId: "issueId_2", Technology: coreutils.Pipenv.String(), Cves: []services.Cve{{Id: "testCve4"}, {Id: "testCve5"}}, Components: map[string]services.Component{"issueId_2_direct_dependency": {}, "issueId_4_direct_dependency": {}}}, }, }, }
View Source
var FakeServerDetails = config.ServerDetails{
Url: "platformUrl",
Password: "password",
User: "user",
}
Functions ¶
func CreateScannersConfigFile ¶
func CreateScannersConfigFile(fileName string, fileContent interface{}, scanType utils.JasScanType) error
func GetExcludePatterns ¶
func GetExcludePatterns(module jfrogappsconfig.Module, scanner *jfrogappsconfig.Scanner) []string
func GetSourceRoots ¶
func GetSourceRoots(module jfrogappsconfig.Module, scanner *jfrogappsconfig.Scanner) ([]string, error)
func GetTestDataPath ¶
func GetTestDataPath() string
func ReadJasScanRunsFromFile ¶
func ShouldSkipScanner ¶
func ShouldSkipScanner(module jfrogappsconfig.Module, scanType utils.JasScanType) bool
Types ¶
type JasScanner ¶
type JasScanner struct { ConfigFileName string ResultsFileName string AnalyzerManager utils.AnalyzerManager ServerDetails *config.ServerDetails JFrogAppsConfig *jfrogappsconfig.JFrogAppsConfig ScannerDirCleanupFunc func() error }
func InitJasTest ¶
func InitJasTest(t *testing.T, workingDirs ...string) (*JasScanner, func())
func NewJasScanner ¶
func NewJasScanner(workingDirs []string, serverDetails *config.ServerDetails) (scanner *JasScanner, err error)
func (*JasScanner) Run ¶
func (a *JasScanner) Run(scannerCmd ScannerCmd) (err error)
type ScannerCmd ¶
type ScannerCmd interface {
Run(module jfrogappsconfig.Module) (err error)
}
Click to show internal directories.
Click to hide internal directories.