xray

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CleanScanBuildName          = "cleanBuildName"
	FatalScanBuildName          = "fatalBuildName"
	VulnerableBuildName         = "vulnerableBuildName"
	VulnerabilitiesEndpoint     = "vulnerabilities"
	LicensesEndpoint            = "licenses"
	ContextualAnalysisFeatureId = "contextual_analysis"
	BadFeatureId                = "unknown"
)
View Source
const BuildScanResultsResponse = `` /* 2256-byte string literal not displayed */
View Source
const CleanXrayScanResponse = `` /* 529-byte string literal not displayed */
View Source
const EntitledResponse = `
{
  "entitled": true,
  "feature_id": "contextual_analysis"
}
`
View Source
const FatalErrorXrayScanResponse = `
{
 "errors": [{"status":-1}, {"status":500}]
}
`
View Source
const LicensesReportDetailsResponse = `` /* 587-byte string literal not displayed */
View Source
const LicensesReportStatusResponse = `` /* 296-byte string literal not displayed */
View Source
const LicensesXrayReportRequestResponse = `
{
  "report_id": 888,
  "status": "pending"
}
`
View Source
const NotEntitledResponse = `
{
  "entitled": false,
  "feature_id": "unknown"
}
`
View Source
const TestMultiScanId = "3472b4e2-bddc-11ee-a9c9-acde48001122"
View Source
const TestXscVersion = "1.0.0"
View Source
const TriggerBuildScanResponse = `` /* 279-byte string literal not displayed */
View Source
const VulnerabilityReportDetailsResponse = `` /* 3812-byte string literal not displayed */
View Source
const VulnerabilityReportStatusResponse = `` /* 302-byte string literal not displayed */
View Source
const VulnerabilityXrayReportRequestResponse = `
{
  "report_id": 777,
  "status": "pending"
}
`
View Source
const VulnerableXrayScanResponse = `` /* 63265-byte string literal not displayed */
View Source
const VulnerableXraySummaryArtifactResponse = `` /* 2330-byte string literal not displayed */
View Source
const XrayReportDeleteResponse = `
{
  "info": "report deleted successfully"
}
`
View Source
const XscGitInfoBadResponse = `"failed create git info request: git_repo_url field must contain value"`
View Source
const XscGitInfoResponse = `{"multi_scan_id": "3472b4e2-bddc-11ee-a9c9-acde48001122"}`

Variables

View Source
var GitInfoContextWithMinimalRequiredFields = xrayServices.XscGitInfoContext{
	GitRepoUrl: "https://git.jfrog.info/projects/XSC/repos/xsc-service",
	BranchName: "feature/XRAY-123-cool-feature",
	CommitHash: "acc5e24e69a-d3c1-4022-62eb-69e4a1e5",
}
View Source
var GitInfoContextWithMissingFields = xrayServices.XscGitInfoContext{
	GitRepoUrl: "https://git.jfrog.info/projects/XSC/repos/xsc-service",
	BranchName: "feature/XRAY-123-cool-feature",
}
View Source
var MapReportIdEndpoint = map[int]string{
	777: VulnerabilitiesEndpoint,
	888: LicensesEndpoint,
}
View Source
var MapResponse = map[string]map[string]string{
	VulnerabilitiesEndpoint: {
		"XrayReportRequest": VulnerabilityXrayReportRequestResponse,
		"ReportStatus":      VulnerabilityReportStatusResponse,
		"ReportDetails":     VulnerabilityReportDetailsResponse,
	},
	LicensesEndpoint: {
		"XrayReportRequest": LicensesXrayReportRequestResponse,
		"ReportStatus":      LicensesReportStatusResponse,
		"ReportDetails":     LicensesReportDetailsResponse,
	},
}

Functions

func StartXrayMockServer

func StartXrayMockServer(t *testing.T) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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