Documentation
¶
Index ¶
- Constants
- type AnalyticsEventService
- func (vs *AnalyticsEventService) AddGeneralEvent(event XscAnalyticsGeneralEvent, xrayVersion string) (string, error)
- func (vs *AnalyticsEventService) GetGeneralEvent(msi string) (*XscAnalyticsGeneralEvent, error)
- func (vs *AnalyticsEventService) UpdateGeneralEvent(event XscAnalyticsGeneralEventFinalize) error
- type CaScannerConfig
- type CommitContext
- type ConfigProfile
- type ConfigurationProfileService
- type EventStatus
- type EventType
- type ExternalErrorLog
- type FrogbotConfig
- type GeneralConfig
- type GradleSettings
- type IacScannerConfig
- type LogErrorEventService
- type MavenSettings
- type Module
- type NpmSettings
- type PackageManagersSettings
- type ProductName
- type PullRequestContext
- type PythonSettings
- type SastScannerConfig
- type ScaScannerConfig
- type ScanConfig
- type SecretsScannerConfig
- type VersionService
- type WatchService
- type XscAnalyticsBasicGeneralEvent
- type XscAnalyticsGeneralEvent
- type XscAnalyticsGeneralEventDeprecated
- type XscAnalyticsGeneralEventFinalize
- type XscAnalyticsGeneralEventResponse
- type XscGitInfoContext
- type XscGitInfoContextDeprecated
Constants ¶
const ( ConfigProfileMinXscVersion = "1.11.0" ConfigProfileByUrlMinXrayVersion = "3.110.0" ConfigProfileNewSchemaMinXrayVersion = "3.117.0" )
const (
AnalyticsMetricsMinXscVersion = "1.7.1"
)
const (
LogErrorMinXscVersion = AnalyticsMetricsMinXscVersion
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyticsEventService ¶
type AnalyticsEventService struct {
XscDetails auth.ServiceDetails
XrayDetails auth.ServiceDetails
ScopeProjectKey string
// contains filtered or unexported fields
}
func NewAnalyticsEventService ¶
func NewAnalyticsEventService(client *jfroghttpclient.JfrogHttpClient) *AnalyticsEventService
func (*AnalyticsEventService) AddGeneralEvent ¶
func (vs *AnalyticsEventService) AddGeneralEvent(event XscAnalyticsGeneralEvent, xrayVersion string) (string, error)
AddGeneralEvent add general event in Xsc and returns msi generated by Xsc.
func (*AnalyticsEventService) GetGeneralEvent ¶
func (vs *AnalyticsEventService) GetGeneralEvent(msi string) (*XscAnalyticsGeneralEvent, error)
GetGeneralEvent returns event's data matching the provided multi scan id.
func (*AnalyticsEventService) UpdateGeneralEvent ¶
func (vs *AnalyticsEventService) UpdateGeneralEvent(event XscAnalyticsGeneralEventFinalize) error
UpdateGeneralEvent update finalized analytics metrics info of an existing event.
type CaScannerConfig ¶ added in v1.52.0
type CommitContext ¶ added in v1.51.1
type CommitContext struct {
GitRepoHttpsCloneUrl string `json:"git_repo_url"`
GitRepoName string `json:"git_repo_name,omitempty"`
GitProject string `json:"git_project,omitempty"`
BranchName string `json:"branch_name"`
CommitHash string `json:"commit_hash"`
CommitMessage string `json:"commit_message,omitempty"`
CommitAuthor string `json:"commit_author,omitempty"`
}
type ConfigProfile ¶ added in v1.45.0
type ConfigProfile struct {
ProfileName string `json:"profile_name"`
GeneralConfig GeneralConfig `json:"general_config,omitempty"`
FrogbotConfig FrogbotConfig `json:"frogbot_config,omitempty"`
Modules []Module `json:"modules"`
IsDefault bool `json:"is_default,omitempty"`
IsBasicProfile bool
}
type ConfigurationProfileService ¶ added in v1.45.0
type ConfigurationProfileService struct {
XscDetails auth.ServiceDetails
XrayDetails auth.ServiceDetails
ScopeProjectKey string
// contains filtered or unexported fields
}
func NewConfigurationProfileService ¶ added in v1.45.0
func NewConfigurationProfileService(client *jfroghttpclient.JfrogHttpClient) *ConfigurationProfileService
func (*ConfigurationProfileService) GetConfigurationProfileByName ¶ added in v1.48.4
func (cp *ConfigurationProfileService) GetConfigurationProfileByName(profileName string) (*ConfigProfile, error)
func (*ConfigurationProfileService) GetConfigurationProfileByUrl ¶ added in v1.48.4
func (cp *ConfigurationProfileService) GetConfigurationProfileByUrl(url string) (*ConfigProfile, error)
type EventStatus ¶
type EventStatus string
const ( Started EventStatus = "started" Completed EventStatus = "completed" Cancelled EventStatus = "cancelled" Failed EventStatus = "failed" )
type ExternalErrorLog ¶
type FrogbotConfig ¶ added in v1.45.0
type FrogbotConfig struct {
EmailAuthor string `json:"email_author,omitempty"`
AggregateFixes bool `json:"aggregate_fixes,omitempty"`
AvoidPreviousPrCommentsDeletion bool `json:"avoid_previous_pr_comments_deletion,omitempty"`
AvoidExtraMessages bool `json:"avoid_extra_messages,omitempty"`
AddSuccessComment bool `json:"add_success_comment,omitempty"`
BranchNameTemplate string `json:"branch_name_template,omitempty"`
PrTitleTemplate string `json:"pr_title_template,omitempty"`
PrCommentTitle string `json:"pr_comment_title,omitempty"`
CommitMessageTemplate string `json:"commit_message_template,omitempty"`
ShowSecretsAsPrComment bool `json:"show_secrets_as_pr_comment,omitempty"`
SkipAutoFix bool `json:"skip_auto_fix,omitempty"`
IncludeAllRepositoryVulnerabilities bool `json:"include_all_repository_vulnerabilities,omitempty"`
}
type GeneralConfig ¶ added in v1.52.0
type GeneralConfig struct {
ReleasesRepo string `json:"releases_repo,omitempty"`
AnalyzerManagerVersion string `json:"analyzer_manager_version,omitempty"`
ReportAnalytics bool `json:"report_analytics,omitempty"`
ExcludePatterns []string `json:"exclude_patterns,omitempty"`
ResultsOutputDir string `json:"results_output_dir,omitempty"`
AllowPartialResults bool `json:"allow_partial_results,omitempty"`
}
type GradleSettings ¶ added in v1.52.0
type IacScannerConfig ¶ added in v1.45.0
type LogErrorEventService ¶
type LogErrorEventService struct {
XscDetails auth.ServiceDetails
XrayDetails auth.ServiceDetails
ScopeProjectKey string
// contains filtered or unexported fields
}
func NewLogErrorEventService ¶
func NewLogErrorEventService(client *jfroghttpclient.JfrogHttpClient) *LogErrorEventService
func (*LogErrorEventService) SendLogErrorEvent ¶
func (les *LogErrorEventService) SendLogErrorEvent(errorLog *ExternalErrorLog) error
type MavenSettings ¶ added in v1.52.0
type MavenSettings struct {
UseWrapper bool `json:"use_wrapper,omitempty"`
}
type NpmSettings ¶ added in v1.52.0
type PackageManagersSettings ¶ added in v1.52.0
type PackageManagersSettings struct {
GradleSettings GradleSettings `json:"gradle_settings,omitempty"`
MavenSettings MavenSettings `json:"maven_settings,omitempty"`
NpmSettings NpmSettings `json:"npm_settings,omitempty"`
PythonSettings PythonSettings `json:"python_settings,omitempty"`
}
type ProductName ¶
type ProductName string
const ( CliProduct ProductName = "cli" FrogbotProduct ProductName = "frogbot" )
type PullRequestContext ¶ added in v1.51.1
type PythonSettings ¶ added in v1.52.0
type PythonSettings struct {
RequirementsFile string `json:"requirements_file,omitempty"`
}
type SastScannerConfig ¶ added in v1.45.0
type SastScannerConfig struct {
EnableSastScan bool `json:"enable_sast_scan,omitempty"`
Language string `json:"language,omitempty"`
IncludePatterns []string `json:"Include_patterns,omitempty"`
ExcludePatterns []string `json:"exclude_patterns,omitempty"`
ExcludeRules []string `json:"exclude_rules,omitempty"`
}
type ScaScannerConfig ¶ added in v1.52.0
type ScaScannerConfig struct {
EnableScaScan bool `json:"enable_sca_scan,omitempty"`
Technology string `json:"technology,omitempty"`
PackageManagersSettings PackageManagersSettings `json:"package_managers_settings,omitempty"`
SkipAutoInstall bool `json:"skip_auto_install,omitempty"`
ExcludePatterns []string `json:"exclude_patterns,omitempty"`
}
type ScanConfig ¶ added in v1.45.0
type ScanConfig struct {
ScaScannerConfig ScaScannerConfig `json:"sca_scanner_config,omitempty"`
ContextualAnalysisScannerConfig CaScannerConfig `json:"contextual_analysis_scanner_config,omitempty"`
SastScannerConfig SastScannerConfig `json:"sast_scanner_config,omitempty"`
SecretsScannerConfig SecretsScannerConfig `json:"secrets_scanner_config,omitempty"`
IacScannerConfig IacScannerConfig `json:"iac_scanner_config,omitempty"`
}
type SecretsScannerConfig ¶ added in v1.45.0
type VersionService ¶
type VersionService struct {
XscDetails auth.ServiceDetails
XrayDetails auth.ServiceDetails
// contains filtered or unexported fields
}
VersionService returns the https client and Xsc details
func NewVersionService ¶
func NewVersionService(client *jfroghttpclient.JfrogHttpClient) *VersionService
NewVersionService creates a new service to retrieve the version of Xsc
func (*VersionService) GetVersion ¶
func (vs *VersionService) GetVersion() (string, error)
GetVersion returns the version of Xsc
type WatchService ¶ added in v1.49.0
type WatchService struct {
XrayDetails auth.ServiceDetails
ScopeProjectKey string
// contains filtered or unexported fields
}
WatchService defines the http client and Xray details
func NewWatchService ¶ added in v1.49.0
func NewWatchService(client *jfroghttpclient.JfrogHttpClient) *WatchService
NewWatchService creates a new Xray Watch Service
func (*WatchService) GetResourceWatches ¶ added in v1.49.0
func (xws *WatchService) GetResourceWatches(gitRepo, project string) (watches *api.ResourcesWatchesBody, err error)
GetResourceWatches retrieves the active watches that are associated with a specific git repository and project
type XscAnalyticsBasicGeneralEvent ¶
type XscAnalyticsBasicGeneralEvent struct {
EventType EventType `json:"event_type,omitempty"`
EventStatus EventStatus `json:"event_status,omitempty"`
Product ProductName `json:"product,omitempty"`
ProductVersion string `json:"product_version,omitempty"`
TotalFindings int `json:"total_findings,omitempty"`
TotalIgnoredFindings int `json:"total_ignored_findings,omitempty"`
IsDefaultConfig bool `json:"is_default_config,omitempty"`
JfrogUser string `json:"jfrog_user,omitempty"`
OsPlatform string `json:"os_platform,omitempty"`
OsArchitecture string `json:"os_architecture,omitempty"`
MachineId string `json:"machine_id,omitempty"`
AnalyzerManagerVersion string `json:"analyzer_manager_version,omitempty"`
JpdVersion string `json:"jpd_version,omitempty"`
TotalScanDuration string `json:"total_scan_duration,omitempty"`
FrogbotScanType string `json:"frogbot_scan_type,omitempty"`
FrogbotCiProvider string `json:"frogbot_ci_provider,omitempty"`
}
type XscAnalyticsGeneralEvent ¶
type XscAnalyticsGeneralEvent struct {
XscAnalyticsBasicGeneralEvent
GitInfo *XscGitInfoContext `json:"gitinfo,omitempty"`
IsGitInfoFlow bool `json:"is_gitinfo_flow,omitempty"`
}
type XscAnalyticsGeneralEventDeprecated ¶ added in v1.51.1
type XscAnalyticsGeneralEventDeprecated struct {
XscAnalyticsBasicGeneralEvent
GitInfo *XscGitInfoContextDeprecated `json:"gitinfo,omitempty"`
IsGitInfoFlow bool `json:"is_gitinfo_flow,omitempty"`
}
XscAnalyticsGeneralEvent extend the basic struct with Frogbot related info.
type XscAnalyticsGeneralEventFinalize ¶
type XscAnalyticsGeneralEventFinalize struct {
XscAnalyticsBasicGeneralEvent
MultiScanId string `json:"multi_scan_id,omitempty"`
GitRepoUrl string `json:"git_repository,omitempty"`
}
type XscAnalyticsGeneralEventResponse ¶
type XscAnalyticsGeneralEventResponse struct {
MultiScanId string `json:"multi_scan_id,omitempty"`
}
type XscGitInfoContext ¶ added in v1.49.0
type XscGitInfoContext struct {
Source CommitContext `json:"source"`
Target *CommitContext `json:"target,omitempty"`
PullRequest *PullRequestContext `json:"pull_request,omitempty"`
GitProvider string `json:"git_provider,omitempty"`
Technologies []string `json:"technologies,omitempty"`
}
type XscGitInfoContextDeprecated ¶ added in v1.51.1
type XscGitInfoContextDeprecated struct {
GitRepoUrl string `json:"git_repo_url"`
GitRepoName string `json:"git_repo_name,omitempty"`
GitProject string `json:"git_project,omitempty"`
GitProvider string `json:"git_provider,omitempty"`
Technologies []string `json:"technologies,omitempty"`
BranchName string `json:"branch_name"`
LastCommit string `json:"last_commit,omitempty"`
CommitHash string `json:"commit_hash"`
CommitMessage string `json:"commit_message,omitempty"`
CommitAuthor string `json:"commit_author,omitempty"`
}