Documentation
¶
Index ¶
- Constants
- Variables
- func GetSeverity(severity uint) string
- func GetSeverityID(severity string) uint
- func RemoveIndex(slice []interface{}, index int) []interface{}
- func ShortenGUID(guid string) string
- type AMRole
- type ASTLicense
- type AccessAssignedRole
- type AccessAssignment
- type AccessibleResource
- type AnalyticsAgingStats
- type AnalyticsDistributionBlock
- type AnalyticsDistributionEntry
- type AnalyticsDistributionStats
- type AnalyticsFilter
- type AnalyticsIDEOverTimeDistribution
- type AnalyticsIDEOverTimeEntry
- type AnalyticsIDEStatEntry
- type AnalyticsLabeledResultsCountEntry
- type AnalyticsMeanTimeEntry
- type AnalyticsMeanTimeStats
- type AnalyticsOverTimeEntry
- type AnalyticsOverTimeStats
- type AnalyticsSeverityAndStateStats
- type AnalyticsTime
- type AnalyticsVulnerabilitiesStats
- type Application
- func (a *Application) AddRule(ruletype, value string)
- func (a *Application) AssignProject(project *Project)
- func (a *Application) GetRuleByID(ruleID string) *ApplicationRule
- func (a *Application) GetRulesByType(ruletype string) []ApplicationRule
- func (a *Application) RemoveRule(ruleID string)
- func (a Application) String() string
- func (a *Application) UnassignProject(project *Project)
- type ApplicationAMFilter
- type ApplicationFilter
- type ApplicationOverview
- type ApplicationOverviewFilter
- type ApplicationPatch
- type ApplicationRule
- type AuditIACQuery
- type AuditIACQueryMetadata
- type AuditPermissions
- type AuditQueryTree
- type AuditQuery_v310
- func (q AuditQuery_v310) CreateApplicationOverrideByID(applicationId string) AuditQuery_v310
- func (q AuditQuery_v310) CreateProjectOverrideByID(projectId string) AuditQuery_v310
- func (q AuditQuery_v310) CreateTenantOverride() AuditQuery_v310
- func (q *AuditQuery_v310) ParsePath()
- func (q AuditQuery_v310) String() string
- func (q AuditQuery_v310) ToQuery() SASTQuery
- type AuditQuery_v312
- type AuditSASTQuery
- type AuditSASTQueryMetadata
- type AuditScanSourceFile
- type AuditSession
- type AuditSessionFilters
- type AuditSessionLanguage
- type AuditSessionLanguageFilters
- type AuthenticationProvider
- type AuthenticationProviderMapper
- type AuthenticationProviderMapperConfig
- type BaseFilter
- type BaseFilteredResponse
- type BaseIAMFilter
- type BasePolicyFilter
- type ClientVars
- type ConfigurationSetting
- type Cx1Cache
- func (c *Cx1Cache) ApplicationSummary() string
- func (c *Cx1Cache) ClientSummary() string
- func (c *Cx1Cache) GetApplication(applicationID string) (*Application, error)
- func (c *Cx1Cache) GetApplicationByName(name string) (*Application, error)
- func (c *Cx1Cache) GetClient(ID string) (*OIDCClient, error)
- func (c *Cx1Cache) GetClientByID(clientId string) (*OIDCClient, error)
- func (c *Cx1Cache) GetGroup(groupID string) (*Group, error)
- func (c *Cx1Cache) GetGroupByName(name string) (*Group, error)
- func (c *Cx1Cache) GetPreset(engine string, presetID string) (*Preset, error)
- func (c *Cx1Cache) GetPresetByName(engine, name string) (*Preset, error)
- func (c *Cx1Cache) GetProject(projectID string) (*Project, error)
- func (c *Cx1Cache) GetProjectByName(name string) (*Project, error)
- func (c *Cx1Cache) GetQuery(queryID uint64) (*SASTQuery, error)
- func (c *Cx1Cache) GetQueryByNames(language, group, query string) (*SASTQuery, error)
- func (c *Cx1Cache) GetRole(roleID string) (*Role, error)
- func (c *Cx1Cache) GetRoleByName(name string) (*Role, error)
- func (c *Cx1Cache) GetUser(userID string) (*User, error)
- func (c *Cx1Cache) GetUserByEmail(email string) (*User, error)
- func (c *Cx1Cache) GetUserByString(displaystring string) (*User, error)
- func (c *Cx1Cache) GroupSummary() string
- func (c *Cx1Cache) MatchPresetQueries()
- func (c *Cx1Cache) PresetSummary() string
- func (c *Cx1Cache) ProjectSummary() string
- func (c *Cx1Cache) QuerySummary() string
- func (c *Cx1Cache) Refresh(client *Cx1Client) []error
- func (c *Cx1Cache) RefreshApplications(client *Cx1Client) error
- func (c *Cx1Cache) RefreshClients(client *Cx1Client) error
- func (c *Cx1Cache) RefreshGroups(client *Cx1Client) error
- func (c *Cx1Cache) RefreshPresets(client *Cx1Client) error
- func (c *Cx1Cache) RefreshProjects(client *Cx1Client) error
- func (c *Cx1Cache) RefreshQueries(client *Cx1Client) error
- func (c *Cx1Cache) RefreshRoles(client *Cx1Client) error
- func (c *Cx1Cache) RefreshUsers(client *Cx1Client) error
- func (c *Cx1Cache) UserSummary() string
- type Cx1Claims
- type Cx1Client
- func NewAPIKeyClient(client *http.Client, api_key string, logger Logger) (*Cx1Client, error)
- func NewAPIKeyClientWithToken(client *http.Client, api_key, last_access_token string, logger Logger) (*Cx1Client, error)
- func NewClient(client *http.Client, logger Logger) (*Cx1Client, error)
- func NewClientWithOptions(options Cx1ClientConfiguration) (*Cx1Client, error)
- func NewOAuthClient(client *http.Client, ...) (*Cx1Client, error)
- func NewOAuthClientWithToken(client *http.Client, ...) (*Cx1Client, error)
- func NewTokenClient(client *http.Client, last_token string, logger Logger) (*Cx1Client, error)
- func (c *Cx1Client) AddAccessAssignment(access AccessAssignment) error
- func (c *Cx1Client) AddAuthenticationProviderMapper(mapper AuthenticationProviderMapper) error
- func (c *Cx1Client) AddClientScopeByID(guid, clientScopeId string) error
- func (c *Cx1Client) AddIACResultsPredicates(predicates []IACResultsPredicates) error
- func (c *Cx1Client) AddKICSResultsPredicates(predicates []IACResultsPredicates) error
- func (c *Cx1Client) AddRoleComposites(role *Role, roles *[]Role) error
- func (c *Cx1Client) AddRolesToGroup(g *Group, clientRoles map[string][]string) error
- func (c *Cx1Client) AddSASTResultsPredicates(predicates []SASTResultsPredicates) error
- func (c *Cx1Client) AddUserAppRoles(user *User, roles *[]Role) error
- func (c *Cx1Client) AddUserIAMRoles(user *User, roles *[]Role) error
- func (c *Cx1Client) AddUserRoles(user *User, roles *[]Role) error
- func (c *Cx1Client) AssignApplicationToProjectsByIDs(applicationId string, projectIds []string) error
- func (c *Cx1Client) AssignProjectToApplicationsByIDs(projectId string, applicationIds []string) error
- func (c *Cx1Client) AssignUserToGroupByID(user *User, groupId string) error
- func (c *Cx1Client) AuditCreateSession(engine, language string) (AuditSession, error)
- func (c *Cx1Client) AuditCreateSessionByID(engine, projectId, scanId string) (AuditSession, error)
- func (c *Cx1Client) AuditDeleteSession(auditSession *AuditSession) error
- func (c *Cx1Client) AuditGetRequestStatusByID(auditSession *AuditSession, requestId string) (bool, interface{}, error)
- func (c *Cx1Client) AuditGetScanSourcesByID(auditSession *AuditSession) ([]AuditScanSourceFile, error)
- func (c *Cx1Client) AuditNewQuery_v310(language, group, name string) (AuditQuery_v310, error)
- func (c *Cx1Client) AuditRequestStatusPollingByID(auditSession *AuditSession, requestId string) (interface{}, error)
- func (c *Cx1Client) AuditRequestStatusPollingByIDWithTimeout(auditSession *AuditSession, requestId string, delaySeconds, maxSeconds int) (interface{}, error)
- func (c *Cx1Client) AuditRunScanByID(auditSession *AuditSession) error
- func (c *Cx1Client) AuditSessionKeepAlive(auditSession *AuditSession) error
- func (c *Cx1Client) CancelScanByID(scanID string) error
- func (c *Cx1Client) CheckAccessToResourceByID(resourceId, resourceType, action string) (bool, error)
- func (c *Cx1Client) CheckAccessibleResources(resourceTypes []string, action string) (bool, []AccessibleResource, error)
- func (c *Cx1Client) CheckFlag(flag string) (bool, error)
- func (c *Cx1Client) CheckIAMVersion() (int, error)
- func (c *Cx1Client) Clone() Cx1Client
- func (c *Cx1Client) CreateAccessAssignment(user *User, group *Group, client *OIDCClient, project *Project, ...) (AccessAssignment, error)
- func (c *Cx1Client) CreateAppRole(roleName, createdBy string) (Role, error)
- func (c *Cx1Client) CreateApplication(appname string) (Application, error)
- func (c *Cx1Client) CreateAuthenticationProvider(alias, providerId string) (AuthenticationProvider, error)
- func (c *Cx1Client) CreateChildGroup(parentGroup *Group, childGroupName string) (Group, error)
- func (c *Cx1Client) CreateClient(name string, notificationEmails []string, secretExpiration int) (OIDCClient, error)
- func (c *Cx1Client) CreateCustomResultState(state string) (ResultState, error)
- func (c *Cx1Client) CreateCxLink(name, description, privateUrl string) (newLink CxLinkResponse, err error)
- func (c *Cx1Client) CreateGroup(groupname string) (Group, error)
- func (c *Cx1Client) CreateIACPreset(name, description string, collection IACQueryCollection) (Preset, error)
- func (c *Cx1Client) CreateIACQueryOverride(auditSession *AuditSession, level string, baseQuery *IACQuery) (IACQuery, error)
- func (c *Cx1Client) CreateNewIACQuery(auditSession *AuditSession, query IACQuery) (IACQuery, []QueryFailure, error)
- func (c *Cx1Client) CreateNewSASTQuery(auditSession *AuditSession, query SASTQuery) (SASTQuery, []QueryFailure, error)
- func (c *Cx1Client) CreatePreset_v330(name, description string, queryIDs []uint64) (Preset_v330, error)
- func (c *Cx1Client) CreateProject(projectname string, cx1_group_ids []string, tags map[string]string) (Project, error)
- func (c *Cx1Client) CreateProjectInApplication(projectname string, cx1_group_ids []string, tags map[string]string, ...) (Project, error)
- func (c *Cx1Client) CreateProjectInApplicationWOPolling(projectname string, cx1_group_ids []string, tags map[string]string, ...) (Project, error)
- func (c *Cx1Client) CreateSAMLUser(newuser User, idpAlias, idpUserId, idpUserName string) (User, error)
- func (c *Cx1Client) CreateSASTPreset(name, description string, collection SASTQueryCollection) (Preset, error)
- func (c *Cx1Client) CreateSASTQueryOverride(auditSession *AuditSession, level string, baseQuery *SASTQuery) (SASTQuery, error)
- func (c *Cx1Client) CreateScanSchedule(project *Project, s ProjectScanSchedule) error
- func (c *Cx1Client) CreateScanScheduleByID(projectId string, s ProjectScanSchedule) error
- func (c *Cx1Client) CreateUser(newuser User) (User, error)
- func (c *Cx1Client) DeleteAccessAssignmentByID(entityId, resourceId string) error
- func (c *Cx1Client) DeleteApplication(application *Application) error
- func (c *Cx1Client) DeleteApplicationByID(applicationId string) error
- func (c *Cx1Client) DeleteAuditSession(auditSession *AuditSession) error
- func (c *Cx1Client) DeleteAuthenticationProvider(provider AuthenticationProvider) error
- func (c *Cx1Client) DeleteAuthenticationProviderMapper(mapper AuthenticationProviderMapper) error
- func (c *Cx1Client) DeleteClientByID(guid string) error
- func (c *Cx1Client) DeleteCustomResultState(stateId uint64) error
- func (c *Cx1Client) DeleteCxLink(link CxLink) error
- func (c *Cx1Client) DeleteCxLinkByID(linkId string) error
- func (c *Cx1Client) DeleteGroup(group *Group) error
- func (c *Cx1Client) DeletePreset(preset Preset) error
- func (c *Cx1Client) DeletePreset_v330(preset *Preset_v330) error
- func (c *Cx1Client) DeleteProject(p *Project) error
- func (c *Cx1Client) DeleteQueryByName_v310(level, levelID, language, group, query string) error
- func (c *Cx1Client) DeleteQueryOverrideByKey(auditSession *AuditSession, queryKey string) error
- func (c *Cx1Client) DeleteQuery_v310(query AuditQuery_v310) error
- func (c *Cx1Client) DeleteRoleByID(roleId string) error
- func (c *Cx1Client) DeleteRolesFromGroup(g *Group, clientRoles map[string][]string) error
- func (c *Cx1Client) DeleteScanByID(scanID string) error
- func (c *Cx1Client) DeleteScanSchedules(project *Project) error
- func (c *Cx1Client) DeleteScanSchedulesByID(projectId string) error
- func (c *Cx1Client) DeleteUser(user *User) error
- func (c *Cx1Client) DeleteUserByID(userid string) error
- func (c *Cx1Client) DownloadExport(exportUrl string) ([]byte, error)
- func (c *Cx1Client) DownloadReport(reportUrl string) ([]byte, error)
- func (c *Cx1Client) ExportPollingByID(exportID string) (string, error)
- func (c *Cx1Client) ExportPollingByIDWithTimeout(exportID string, delaySeconds, maxSeconds int) (string, error)
- func (c *Cx1Client) FillGroup(group *Group) error
- func (c *Cx1Client) FindQueryByName_v310(queries []AuditQuery_v310, level, language, group, name string) (AuditQuery_v310, error)
- func (c *Cx1Client) GetAMApplicationsFiltered(filter ApplicationAMFilter) ([]Application, error)
- func (c *Cx1Client) GetAMClientsFiltered(filter OIDCClientAMFilter) ([]OIDCClient, error)
- func (c *Cx1Client) GetAMGroupsFiltered(filter GroupAMFilter) ([]Group, error)
- func (c *Cx1Client) GetAMPermissions() ([]Permission, error)
- func (c *Cx1Client) GetAMProjectsFiltered(filter ProjectAMFilter) ([]Project, error)
- func (c *Cx1Client) GetAMRoles() ([]AMRole, error)
- func (c *Cx1Client) GetAMUsersFiltered(filter UserAMFilter) ([]User, error)
- func (c *Cx1Client) GetASTAppID() string
- func (c *Cx1Client) GetAccessAssignmentByID(entityId, resourceId string) (AccessAssignment, error)
- func (c *Cx1Client) GetAccessToken() string
- func (c *Cx1Client) GetAllApplicationOverviews() ([]ApplicationOverview, error)
- func (c *Cx1Client) GetAllApplicationOverviewsFiltered(filter ApplicationOverviewFilter) (uint64, []ApplicationOverview, error)
- func (c *Cx1Client) GetAllApplications() ([]Application, error)
- func (c *Cx1Client) GetAllApplicationsFiltered(filter ApplicationFilter) (uint64, []Application, error)
- func (c *Cx1Client) GetAllClientsFiltered(filter OIDCClientFilter) (uint64, []OIDCClient, error)
- func (c *Cx1Client) GetAllCxLinks() ([]CxLink, error)
- func (c *Cx1Client) GetAllCxLinksFiltered(filter CxLinkFilter) (uint64, []CxLink, error)
- func (c *Cx1Client) GetAllGroupMembersFiltered(groupId string, filter GroupMembersFilter) (uint64, []User, error)
- func (c *Cx1Client) GetAllGroups() ([]Group, error)
- func (c *Cx1Client) GetAllGroupsFiltered(filter GroupFilter, fill bool) (uint64, []Group, error)
- func (c *Cx1Client) GetAllIACPresets() ([]Preset, error)
- func (c *Cx1Client) GetAllPolicies() ([]Policy, error)
- func (c *Cx1Client) GetAllPoliciesFiltered(filter PolicyFilter) (uint64, []Policy, error)
- func (c *Cx1Client) GetAllPolicyViolations() ([]PolicyViolation, error)
- func (c *Cx1Client) GetAllPolicyViolationsFiltered(filter PolicyViolationFilter) (uint64, []PolicyViolation, error)
- func (c *Cx1Client) GetAllPresets_v330() ([]Preset_v330, error)
- func (c *Cx1Client) GetAllProjectBranchesFiltered(filter ProjectBranchFilter) ([]string, error)
- func (c *Cx1Client) GetAllProjectOverviews() ([]ProjectOverview, error)
- func (c *Cx1Client) GetAllProjectOverviewsFiltered(filter ProjectOverviewFilter) (uint64, []ProjectOverview, error)
- func (c *Cx1Client) GetAllProjects() ([]Project, error)
- func (c *Cx1Client) GetAllProjectsFiltered(filter ProjectFilter) (uint64, []Project, error)
- func (c *Cx1Client) GetAllResourcesAccessibleToGroupByID(groupID string, types []string, includeImplied bool) ([]AccessibleResource, error)
- func (c *Cx1Client) GetAllResourcesAccessibleToUserByID(userID string, types []string, includeImplied bool) ([]AccessibleResource, error)
- func (c *Cx1Client) GetAllResultsChangeHistoryFiltered(filter ResultsChangeFilter) (uint64, []ResultsChangeHistory, error)
- func (c *Cx1Client) GetAllRoleComposites(role *Role) ([]Role, error)
- func (c *Cx1Client) GetAllSASTPresets() ([]Preset, error)
- func (c *Cx1Client) GetAllScanResultsByID(scanID string) (ScanResultSet, error)
- func (c *Cx1Client) GetAllScanResultsFiltered(filter ScanResultsFilter) (uint64, ScanResultSet, error)
- func (c *Cx1Client) GetAllScanSASTResultsByID(scanID string) ([]ScanSASTResult, error)
- func (c *Cx1Client) GetAllScanSASTResultsFiltered(filter ScanSASTResultsFilter) (uint64, []ScanSASTResult, error)
- func (c *Cx1Client) GetAllScanSchedules() ([]ProjectScanSchedule, error)
- func (c *Cx1Client) GetAllScanSchedulesFiltered(filter ProjectScanScheduleFilter) (uint64, []ProjectScanSchedule, error)
- func (c *Cx1Client) GetAllScans() ([]Scan, error)
- func (c *Cx1Client) GetAllScansFiltered(filter ScanFilter) (uint64, []Scan, error)
- func (c *Cx1Client) GetAllUserRoles(user *User) ([]Role, error)
- func (c *Cx1Client) GetAllUsers() ([]User, error)
- func (c *Cx1Client) GetAllUsersFiltered(filter UserFilter) (uint64, []User, error)
- func (c *Cx1Client) GetAnalyticsAllVulnerabilities(limit uint64, offset uint64, filter AnalyticsFilter) ([]AnalyticsVulnerabilitiesStats, error)
- func (c *Cx1Client) GetAnalyticsFixedVulnerabilitiesBySeverityOvertime(filter AnalyticsFilter) ([]AnalyticsOverTimeStats, error)
- func (c *Cx1Client) GetAnalyticsIDEOverTimeStats() ([]AnalyticsIDEOverTimeDistribution, error)
- func (c *Cx1Client) GetAnalyticsIDETotal() ([]AnalyticsIDEStatEntry, error)
- func (c *Cx1Client) GetAnalyticsMeanTimeToResolution(filter AnalyticsFilter) (AnalyticsMeanTimeStats, error)
- func (c *Cx1Client) GetAnalyticsMostAgingVulnerabilities(limit uint64, filter AnalyticsFilter) ([]AnalyticsVulnerabilitiesStats, error)
- func (c *Cx1Client) GetAnalyticsMostCommonVulnerabilities(limit uint64, filter AnalyticsFilter) ([]AnalyticsVulnerabilitiesStats, error)
- func (c *Cx1Client) GetAnalyticsVulnerabilitiesByAgingTotal(filter AnalyticsFilter) ([]AnalyticsAgingStats, error)
- func (c *Cx1Client) GetAnalyticsVulnerabilitiesBySeverityAndStateTotal(filter AnalyticsFilter) ([]AnalyticsSeverityAndStateStats, error)
- func (c *Cx1Client) GetAnalyticsVulnerabilitiesBySeverityOvertime(filter AnalyticsFilter) ([]AnalyticsOverTimeStats, error)
- func (c *Cx1Client) GetAnalyticsVulnerabilitiesBySeverityTotal(filter AnalyticsFilter) (AnalyticsDistributionStats, error)
- func (c *Cx1Client) GetAnalyticsVulnerabilitiesByStateTotal(filter AnalyticsFilter) (AnalyticsDistributionStats, error)
- func (c *Cx1Client) GetAnalyticsVulnerabilitiesByStatusTotal(filter AnalyticsFilter) (AnalyticsDistributionStats, error)
- func (c *Cx1Client) GetAppRoleByName(name string) (Role, error)
- func (c *Cx1Client) GetAppRoles() ([]Role, error)
- func (c *Cx1Client) GetAppRolesByName(name string) ([]Role, error)
- func (c *Cx1Client) GetApplicationByID(id string) (Application, error)
- func (c *Cx1Client) GetApplicationByName(name string) (Application, error)
- func (c *Cx1Client) GetApplicationCount() (uint64, error)
- func (c *Cx1Client) GetApplicationCountByName(name string) (uint64, error)
- func (c *Cx1Client) GetApplicationCountFiltered(filter ApplicationFilter) (uint64, error)
- func (c *Cx1Client) GetApplicationOverviewCountFiltered(filter ApplicationOverviewFilter) (uint64, error)
- func (c *Cx1Client) GetApplicationOverviewsFiltered(filter ApplicationOverviewFilter) (uint64, []ApplicationOverview, error)
- func (c *Cx1Client) GetApplications(count uint64) ([]Application, error)
- func (c *Cx1Client) GetApplicationsByName(name string) ([]Application, error)
- func (c *Cx1Client) GetApplicationsFiltered(filter ApplicationFilter) (uint64, []Application, error)
- func (c *Cx1Client) GetAuditIACQueriesByLevelID(auditSession *AuditSession, level, levelId string) (IACQueryCollection, error)
- func (c *Cx1Client) GetAuditIACQueryByID(auditSession *AuditSession, queryId string) (IACQuery, error)
- func (c *Cx1Client) GetAuditQueryTreeByLevelID(auditSession *AuditSession, level, levelId string) ([]AuditQueryTree, error)
- func (c *Cx1Client) GetAuditSASTQueriesByLevelID(auditSession *AuditSession, level, levelId string) (SASTQueryCollection, error)
- func (c *Cx1Client) GetAuditSASTQueryByKey(auditSession *AuditSession, key string) (SASTQuery, error)
- func (c *Cx1Client) GetAuditSession(engine, language string) (AuditSession, error)
- func (c *Cx1Client) GetAuditSessionByID(engine, projectId, scanId string) (AuditSession, error)
- func (c *Cx1Client) GetAuthenticationProviderByAlias(alias string) (AuthenticationProvider, error)
- func (c *Cx1Client) GetAuthenticationProviderMappers(provider AuthenticationProvider) ([]AuthenticationProviderMapper, error)
- func (c *Cx1Client) GetAuthenticationProviders() ([]AuthenticationProvider, error)
- func (c *Cx1Client) GetAvailableGroups(search string, projectId string, limit, offset uint64) ([]Group, error)
- func (c *Cx1Client) GetBaseURL() string
- func (c *Cx1Client) GetClaims() Cx1Claims
- func (c *Cx1Client) GetClientByID(guid string) (OIDCClient, error)
- func (c *Cx1Client) GetClientByName(clientName string) (OIDCClient, error)
- func (c *Cx1Client) GetClientScopeByName(name string) (OIDCClientScope, error)
- func (c *Cx1Client) GetClientScopes() ([]OIDCClientScope, error)
- func (c *Cx1Client) GetClientSecret(client *OIDCClient) (string, error)
- func (c *Cx1Client) GetClientVars() ClientVars
- func (c *Cx1Client) GetClients() ([]OIDCClient, error)
- func (c *Cx1Client) GetClientsByName(clientName string) ([]OIDCClient, error)
- func (c *Cx1Client) GetClientsFiltered(filter OIDCClientFilter) ([]OIDCClient, error)
- func (c *Cx1Client) GetConfigurationByKey(config *[]ConfigurationSetting, configKey string) *ConfigurationSetting
- func (c *Cx1Client) GetConfigurationByName(config *[]ConfigurationSetting, configKey string) *ConfigurationSetting
- func (c *Cx1Client) GetCurrentClient() (OIDCClient, error)
- func (c *Cx1Client) GetCurrentUser() (User, error)
- func (c *Cx1Client) GetCurrentUsername() string
- func (c *Cx1Client) GetCustomResultStates() ([]ResultState, error)
- func (c *Cx1Client) GetCx1QueryFromSAST(sastId uint64, language, group, name string, mapping *map[uint64]uint64, ...) *SASTQuery
- func (c *Cx1Client) GetCxLinkCountFiltered(filter CxLinkFilter) (uint64, error)
- func (c *Cx1Client) GetCxLinks(count uint64) ([]CxLink, error)
- func (c *Cx1Client) GetCxLinksFiltered(filter CxLinkFilter) (uint64, []CxLink, error)
- func (c *Cx1Client) GetDefaultClientVars() ClientVars
- func (c *Cx1Client) GetEntitiesAccessToResourceByID(resourceId, resourceType string) ([]AccessAssignment, error)
- func (c *Cx1Client) GetExportStatusByID(exportID string) (ExportStatus, error)
- func (c *Cx1Client) GetFlags() map[string]bool
- func (c *Cx1Client) GetGroupByID(groupID string) (Group, error)
- func (c *Cx1Client) GetGroupByName(groupname string) (Group, error)
- func (c *Cx1Client) GetGroupByPath(path string) (Group, error)
- func (c *Cx1Client) GetGroupChildren(group *Group) ([]Group, error)
- func (c *Cx1Client) GetGroupChildrenByID(groupID string, first, max uint64) ([]Group, error)
- func (c *Cx1Client) GetGroupCount(search string, topLevel bool) (uint64, error)
- func (c *Cx1Client) GetGroupInheritedRoles(group *Group) (roles []Role, err error)
- func (c *Cx1Client) GetGroupMembers(group *Group) ([]User, error)
- func (c *Cx1Client) GetGroupMembersByID(groupId string) ([]User, error)
- func (c *Cx1Client) GetGroupMembersFiltered(groupId string, filter GroupMembersFilter) ([]User, error)
- func (c *Cx1Client) GetGroupPIPByName(groupname string) (Group, error)
- func (c *Cx1Client) GetGroups() ([]Group, error)
- func (c *Cx1Client) GetGroupsByName(groupname string) ([]Group, error)
- func (c *Cx1Client) GetGroupsFiltered(filter GroupFilter, fill bool) ([]Group, error)
- func (c *Cx1Client) GetGroupsPIP() ([]Group, error)
- func (c *Cx1Client) GetHeaders() http.Header
- func (c *Cx1Client) GetIACCollectionAuditMetadata(auditSession *AuditSession, collection *IACQueryCollection, customOnly bool) error
- func (c *Cx1Client) GetIACPresetByID(id string) (Preset, error)
- func (c *Cx1Client) GetIACPresetByName(name string) (Preset, error)
- func (c *Cx1Client) GetIACPresetCount() (uint64, error)
- func (c *Cx1Client) GetIACPresetQueries() (IACQueryCollection, error)
- func (c *Cx1Client) GetIACPresets(count uint64) ([]Preset, error)
- func (c *Cx1Client) GetIACQueryCollection() (IACQueryCollection, error)
- func (c *Cx1Client) GetIACQueryFamilies() ([]string, error)
- func (c *Cx1Client) GetIACQueryFamilyContents(family string) (IACQueryCollection, error)
- func (c *Cx1Client) GetIACResultsPredicatesByID(SimilarityID string, ProjectID string) ([]IACResultsPredicates, error)
- func (c *Cx1Client) GetIAMRoleByName(name string) (Role, error)
- func (c *Cx1Client) GetIAMRoles() ([]Role, error)
- func (c *Cx1Client) GetIAMRolesByName(name string) ([]Role, error)
- func (c *Cx1Client) GetIAMURL() string
- func (c *Cx1Client) GetImportByID(importID string) (DataImport, error)
- func (c *Cx1Client) GetImportLogsByID(importID string) ([]byte, error)
- func (c *Cx1Client) GetImports() ([]DataImport, error)
- func (c *Cx1Client) GetKICSResultsPredicatesByID(SimilarityID string, ProjectID string) ([]IACResultsPredicates, error)
- func (c *Cx1Client) GetLastSASTResultsPredicateByID(SimilarityID string, ProjectID, ScanID string) (SASTResultsPredicates, error)
- func (c *Cx1Client) GetLastScanByID(projectID string) (Scan, error)
- func (c *Cx1Client) GetLastScansByEngineFiltered(engine string, limit uint64, filter ScanFilter) ([]Scan, error)
- func (c *Cx1Client) GetLastScansByID(projectID string, limit uint64) ([]Scan, error)
- func (c *Cx1Client) GetLastScansByIDFiltered(projectID string, filter ScanFilter) ([]Scan, error)
- func (c *Cx1Client) GetLastScansByStatus(status []string) ([]Scan, error)
- func (c *Cx1Client) GetLastScansByStatusAndID(projectID string, limit uint64, status []string) ([]Scan, error)
- func (c *Cx1Client) GetLastScansFiltered(filter ScanFilter) ([]Scan, error)
- func (c *Cx1Client) GetLicense() ASTLicense
- func (c *Cx1Client) GetMyGroups(search string, subgroups bool, limit, offset uint64) ([]Group, error)
- func (c *Cx1Client) GetOrCreateApplicationByName(name string) (Application, error)
- func (c *Cx1Client) GetOrCreateGroupByName(name string) (Group, error)
- func (c *Cx1Client) GetOrCreateProjectByName(name string) (Project, error)
- func (c *Cx1Client) GetOrCreateProjectInApplicationByName(projectName, applicationName string) (Project, Application, error)
- func (c *Cx1Client) GetPaginationDefaultsMultiTenant() PaginationSettings
- func (c *Cx1Client) GetPaginationDefaultsSingleTenant() PaginationSettings
- func (c *Cx1Client) GetPaginationSettings() PaginationSettings
- func (c *Cx1Client) GetPoliciesFiltered(filter PolicyFilter) (uint64, []Policy, error)
- func (c *Cx1Client) GetPolicyCountFiltered(filter PolicyFilter) (uint64, error)
- func (c *Cx1Client) GetPolicyViolationCountFiltered(filter PolicyViolationFilter) (uint64, error)
- func (c *Cx1Client) GetPolicyViolationDetailsByID(projectId string, scanId string) (PolicyViolationDetails, error)
- func (c *Cx1Client) GetPolicyViolationsFiltered(filter PolicyViolationFilter) (uint64, []PolicyViolation, error)
- func (c *Cx1Client) GetPresetByID(engine, id string) (Preset, error)
- func (c *Cx1Client) GetPresetByID_v330(id uint64) (Preset_v330, error)
- func (c *Cx1Client) GetPresetByName(engine, name string) (Preset, error)
- func (c *Cx1Client) GetPresetByName_v330(name string) (Preset_v330, error)
- func (c *Cx1Client) GetPresetContents(p *Preset) error
- func (c *Cx1Client) GetPresetContents_v330(p *Preset_v330, qc *SASTQueryCollection) error
- func (c *Cx1Client) GetPresetCount(engine string) (uint64, error)
- func (c *Cx1Client) GetPresetCount_v330() (uint64, error)
- func (c *Cx1Client) GetPresetQueries_v330() (SASTQueryCollection, error)
- func (c *Cx1Client) GetPresets(engine string, count uint64) ([]Preset, error)
- func (c *Cx1Client) GetPresets_v330(count uint64) ([]Preset_v330, error)
- func (c *Cx1Client) GetProjectBranchesByID(projectID string) ([]string, error)
- func (c *Cx1Client) GetProjectBranchesFiltered(filter ProjectBranchFilter) ([]string, error)
- func (c *Cx1Client) GetProjectByID(projectID string) (Project, error)
- func (c *Cx1Client) GetProjectByName(name string) (Project, error)
- func (c *Cx1Client) GetProjectConfiguration(project *Project) error
- func (c *Cx1Client) GetProjectConfigurationByID(projectID string) ([]ConfigurationSetting, error)
- func (c *Cx1Client) GetProjectCount() (uint64, error)
- func (c *Cx1Client) GetProjectCountByName(name string) (uint64, error)
- func (c *Cx1Client) GetProjectCountFiltered(filter ProjectFilter) (uint64, error)
- func (c *Cx1Client) GetProjectOverviewCountFiltered(filter ProjectOverviewFilter) (uint64, error)
- func (c *Cx1Client) GetProjectOverviewsFiltered(filter ProjectOverviewFilter) (uint64, []ProjectOverview, error)
- func (c *Cx1Client) GetProjects(count uint64) ([]Project, error)
- func (c *Cx1Client) GetProjectsByName(name string) ([]Project, error)
- func (c *Cx1Client) GetProjectsByNameAndGroupID(projectName string, groupID string) ([]Project, error)
- func (c *Cx1Client) GetProjectsFiltered(filter ProjectFilter) (uint64, []Project, error)
- func (c *Cx1Client) GetQueriesByLevelID(level, levelId string) (SASTQueryCollection, error)
- func (c *Cx1Client) GetQueriesByLevelID_v310(level, levelId string) ([]AuditQuery_v310, error)
- func (c *Cx1Client) GetQueries_v310() (SASTQueryCollection, error)
- func (c *Cx1Client) GetQueryByName_v310(level, levelid, language, group, query string) (AuditQuery_v310, error)
- func (c *Cx1Client) GetQueryFamilies(engine string) ([]string, error)
- func (c *Cx1Client) GetQueryMappings() (map[uint64]uint64, error)
- func (c *Cx1Client) GetReportStatusByID(reportID string) (ReportStatus, error)
- func (c *Cx1Client) GetResourcesAccessibleToEntityByID(entityId, entityType string, resourceTypes []string) ([]AccessAssignment, error)
- func (c *Cx1Client) GetResultSeverities() ([]string, error)
- func (c *Cx1Client) GetResultStates() ([]string, error)
- func (c *Cx1Client) GetResultStatuses() ([]string, error)
- func (c *Cx1Client) GetResultsChangeHistoryFiltered(filter ResultsChangeFilter) (uint64, []ResultsChangeHistory, error)
- func (c *Cx1Client) GetResultsChangeHistoryForProjectByID(projectID string) ([]ResultsChangeHistory, error)
- func (c *Cx1Client) GetResultsChangeHistoryForScanByID(scanID string) ([]ResultsChangeHistory, error)
- func (c *Cx1Client) GetResultsChangeHistoryForSimilarityID(similarityID string) ([]ResultsChangeHistory, error)
- func (c *Cx1Client) GetRetries() (retries, delay int)
- func (c *Cx1Client) GetRoleByClientIDAndName(clientId string, name string) (Role, error)
- func (c *Cx1Client) GetRoleByID(roleId string) (Role, error)
- func (c *Cx1Client) GetRoleByName(name string) (Role, error)
- func (c *Cx1Client) GetRoleComposites(role *Role) ([]Role, error)
- func (c *Cx1Client) GetRoles() ([]Role, error)
- func (c *Cx1Client) GetRolesByClientID(clientId string) ([]Role, error)
- func (c *Cx1Client) GetRolesByClientIDAndName(clientId string, name string) ([]Role, error)
- func (c *Cx1Client) GetRolesByName(name string) ([]Role, error)
- func (c *Cx1Client) GetSASTPresetByID(id uint64) (Preset, error)
- func (c *Cx1Client) GetSASTPresetByName(name string) (Preset, error)
- func (c *Cx1Client) GetSASTPresetCount() (uint64, error)
- func (c *Cx1Client) GetSASTPresetQueries() (SASTQueryCollection, error)
- func (c *Cx1Client) GetSASTPresets(count uint64) ([]Preset, error)
- func (c *Cx1Client) GetSASTQueryCollection() (SASTQueryCollection, error)
- func (c *Cx1Client) GetSASTQueryFamilies() ([]string, error)
- func (c *Cx1Client) GetSASTQueryFamilyContents(family string) (SASTQueryCollection, error)
- func (c *Cx1Client) GetSASTResultsPredicatesByID(SimilarityID string, ProjectID, ScanID string) ([]SASTResultsPredicates, error)
- func (c *Cx1Client) GetScanByID(scanID string) (Scan, error)
- func (c *Cx1Client) GetScanConfigurationByID(projectID, scanID string) ([]ConfigurationSetting, error)
- func (c *Cx1Client) GetScanCount() (uint64, error)
- func (c *Cx1Client) GetScanCountFiltered(filter ScanFilter) (uint64, error)
- func (c *Cx1Client) GetScanLogsByID(scanID, engine string) ([]byte, error)
- func (c *Cx1Client) GetScanMetadataByID(scanID string) (ScanMetadata, error)
- func (c *Cx1Client) GetScanMetricsByID(scanID string) (ScanMetrics, error)
- func (c *Cx1Client) GetScanResultsByID(scanID string, limit uint64) (ScanResultSet, error)
- func (c *Cx1Client) GetScanResultsCountByID(scanID string) (uint64, error)
- func (c *Cx1Client) GetScanResultsFiltered(filter ScanResultsFilter) (uint64, ScanResultSet, error)
- func (c *Cx1Client) GetScanSASTAggregateSummaryByID(scanId string) ([]SASTAggregateSummary, error)
- func (c *Cx1Client) GetScanSASTAggregateSummaryFiltered(filter SASTAggregateSummaryFilter) (uint64, []SASTAggregateSummary, error)
- func (c *Cx1Client) GetScanSASTResultSummary(results *ScanResultSet) ScanResultSummary
- func (c *Cx1Client) GetScanSASTResultsByID(scanID string, limit uint64) ([]ScanSASTResult, error)
- func (c *Cx1Client) GetScanSASTResultsCountByID(scanID string) (uint64, error)
- func (c *Cx1Client) GetScanSASTResultsFiltered(filter ScanSASTResultsFilter) (uint64, []ScanSASTResult, error)
- func (c *Cx1Client) GetScanScheduleCountFiltered(filter ProjectScanScheduleFilter) (uint64, error)
- func (c *Cx1Client) GetScanSchedulesByID(projectId string) ([]ProjectScanSchedule, error)
- func (c *Cx1Client) GetScanSchedulesFiltered(filter ProjectScanScheduleFilter) (uint64, []ProjectScanSchedule, error)
- func (c *Cx1Client) GetScanSourcesByID(scanID string) ([]byte, error)
- func (c *Cx1Client) GetScanSummariesByID(scanIDs []string) ([]ScanSummary, error)
- func (c *Cx1Client) GetScanSummariesFiltered(filter ScanSummaryFilter) ([]ScanSummary, error)
- func (c *Cx1Client) GetScanSummaryByID(scanID string) (ScanSummary, error)
- func (c *Cx1Client) GetScanWorkflowByID(scanID string) ([]WorkflowLog, error)
- func (c *Cx1Client) GetScansByProjectIDAndBranch(projectID string, branch string) ([]Scan, error)
- func (c *Cx1Client) GetScansByStatus(status []string) ([]Scan, error)
- func (c *Cx1Client) GetScansFiltered(filter ScanFilter) (uint64, []Scan, error)
- func (c *Cx1Client) GetScansSummary() (ScanStatusSummary, error)
- func (c *Cx1Client) GetServiceAccountByID(guid string) (User, error)
- func (c *Cx1Client) GetSeverity(severity uint) string
- func (c *Cx1Client) GetSeverityID(severity string) uint
- func (c *Cx1Client) GetTenantConfiguration() ([]ConfigurationSetting, error)
- func (c *Cx1Client) GetTenantID() string
- func (c *Cx1Client) GetTenantName() string
- func (c *Cx1Client) GetTenantOwner() (TenantOwner, error)
- func (c *Cx1Client) GetUploadURL() (string, error)
- func (c *Cx1Client) GetUserAgent() string
- func (c *Cx1Client) GetUserAppRoles(user *User) ([]Role, error)
- func (c *Cx1Client) GetUserAssignedRoles(user *User) ([]Role, error)
- func (c *Cx1Client) GetUserByEmail(email string) (User, error)
- func (c *Cx1Client) GetUserByID(userID string) (User, error)
- func (c *Cx1Client) GetUserByUserName(username string) (User, error)
- func (c *Cx1Client) GetUserCount() (uint64, error)
- func (c *Cx1Client) GetUserCountFiltered(filter UserFilter) (uint64, error)
- func (c *Cx1Client) GetUserGroups(user *User) ([]Group, error)
- func (c *Cx1Client) GetUserIAMRoles(user *User) ([]Role, error)
- func (c *Cx1Client) GetUserInheritedRoles(user *User) (roles []Role, err error)
- func (c *Cx1Client) GetUserRoles(user *User) ([]Role, error)
- func (c *Cx1Client) GetUsers(count uint64) ([]User, error)
- func (c *Cx1Client) GetUsersByUserName(username string) ([]User, error)
- func (c *Cx1Client) GetUsersFiltered(filter UserFilter) ([]User, error)
- func (c *Cx1Client) GetVersion() (VersionInfo, error)
- func (c *Cx1Client) GetXApplicationOverviewsFiltered(filter ApplicationOverviewFilter, count uint64) (uint64, []ApplicationOverview, error)
- func (c *Cx1Client) GetXApplicationsFiltered(filter ApplicationFilter, count uint64) (uint64, []Application, error)
- func (c *Cx1Client) GetXClientsFiltered(filter OIDCClientFilter, count uint64) (uint64, []OIDCClient, error)
- func (c *Cx1Client) GetXCxLinksFiltered(filter CxLinkFilter, count uint64) (uint64, []CxLink, error)
- func (c *Cx1Client) GetXPoliciesFiltered(filter PolicyFilter, count uint64) (uint64, []Policy, error)
- func (c *Cx1Client) GetXPolicyViolationsFiltered(filter PolicyViolationFilter, count uint64) (uint64, []PolicyViolation, error)
- func (c *Cx1Client) GetXProjectBranchesFiltered(filter ProjectBranchFilter, count uint64) ([]string, error)
- func (c *Cx1Client) GetXProjectOverviewsFiltered(filter ProjectOverviewFilter, count uint64) (uint64, []ProjectOverview, error)
- func (c *Cx1Client) GetXProjectsFiltered(filter ProjectFilter, count uint64) (uint64, []Project, error)
- func (c *Cx1Client) GetXResultsChangeHistoryFiltered(filter ResultsChangeFilter, desiredcount uint64) (uint64, []ResultsChangeHistory, error)
- func (c *Cx1Client) GetXScanResultsFiltered(filter ScanResultsFilter, desiredcount uint64) (uint64, ScanResultSet, error)
- func (c *Cx1Client) GetXScanSASTResultsFiltered(filter ScanSASTResultsFilter, desiredcount uint64) (uint64, []ScanSASTResult, error)
- func (c *Cx1Client) GetXScanSchedulesFiltered(filter ProjectScanScheduleFilter, count uint64) (uint64, []ProjectScanSchedule, error)
- func (c *Cx1Client) GetXScansFiltered(filter ScanFilter, count uint64) (uint64, []Scan, error)
- func (c *Cx1Client) GetXUsersFiltered(filter UserFilter, count uint64) (uint64, []User, error)
- func (c *Cx1Client) GroupLink(g *Group) string
- func (c *Cx1Client) ImportPollingByID(importID string) (string, error)
- func (c *Cx1Client) ImportPollingByIDWithTimeout(importID string, delaySeconds, maxSeconds int) (string, error)
- func (c *Cx1Client) InitializeClient(quick bool) error
- func (c *Cx1Client) IsEngineAllowed(engine string) (string, bool)
- func (c Cx1Client) IsUser() bool
- func (c *Cx1Client) MoveProjectBetweenApplications(project *Project, sourceApplicationIDs, destinationApplicationIDs []string) error
- func (c *Cx1Client) PatchApplication(application *Application, update ApplicationPatch) error
- func (c *Cx1Client) PatchApplicationByID(applicationId string, update ApplicationPatch) error
- func (c *Cx1Client) PatchProject(project *Project, update ProjectPatch) error
- func (c *Cx1Client) PatchProjectByID(projectId string, update ProjectPatch) error
- func (c *Cx1Client) PresetLink(p *Preset) string
- func (c *Cx1Client) ProjectInApplicationPollingByID(projectId, applicationId string) (Project, error)
- func (c *Cx1Client) ProjectInApplicationPollingByIDWithTimeout(projectId, applicationId string, delaySeconds, maxSeconds int) (Project, error)
- func (c *Cx1Client) ProjectLink(p *Project) string
- func (c *Cx1Client) PutFile(URL string, filename string) (string, error)
- func (c *Cx1Client) PutFileRaw(URL string, filename string) (*http.Response, error)
- func (c *Cx1Client) QueryGroupLink(q *SASTQueryGroup) string
- func (c *Cx1Client) QueryLanguageLink(q *SASTQueryLanguage) string
- func (c *Cx1Client) QueryLink(q *SASTQuery) string
- func (c *Cx1Client) QueryTypeApplication() string
- func (c *Cx1Client) QueryTypeProduct() string
- func (c *Cx1Client) QueryTypeProject() string
- func (c *Cx1Client) QueryTypeTenant() string
- func (c *Cx1Client) RefreshFlags() error
- func (c *Cx1Client) RegenerateClientSecret(client OIDCClient) (string, error)
- func (c *Cx1Client) RemoveApplicationFromProjectsByIDs(applicationId string, projectIds []string) error
- func (c *Cx1Client) RemoveHeader(key string)
- func (c *Cx1Client) RemoveProjectFromApplicationsByIDs(projectId string, applicationIds []string) error
- func (c *Cx1Client) RemoveRoleComposites(role *Role, roles *[]Role) error
- func (c *Cx1Client) RemoveUserAppRoles(user *User, roles *[]Role) error
- func (c *Cx1Client) RemoveUserFromGroupByID(user *User, groupId string) error
- func (c *Cx1Client) RemoveUserIAMRoles(user *User, roles *[]Role) error
- func (c *Cx1Client) RemoveUserRoles(user *User, roles *[]Role) error
- func (c *Cx1Client) ReportPollingByID(reportID string) (string, error)
- func (c *Cx1Client) ReportPollingByIDWithTimeout(reportID string, delaySeconds, maxSeconds int) (string, error)
- func (c *Cx1Client) RequestNewExportByID(scanId, format string, ...) (string, error)
- func (c *Cx1Client) RequestNewReportByID(scanID, projectID, branch, reportType string, engines, sections []string) (string, error)
- func (c *Cx1Client) RequestNewReportByIDsv2(entityType string, ...) (string, error)
- func (c *Cx1Client) RequestNewReportByIDv2(scanID string, scanners []string, format string) (string, error)
- func (c *Cx1Client) RequestNewReportByProjectIDv2(projectIDs, scanners, emails, tags []string, format string) (string, error)
- func (c *Cx1Client) RequestNewReportByScanIDv2(scanID string, scanners, emails, tags []string, format string) (string, error)
- func (c *Cx1Client) RoleLink(r *Role) string
- func (c *Cx1Client) RunIACQuery(auditSession *AuditSession, query *IACQuery, source string) (QueryFailure, error)
- func (c *Cx1Client) RunQueryByKey(auditSession *AuditSession, queryKey, source string) (QueryFailure, error)
- func (c *Cx1Client) RunSASTQuery(auditSession *AuditSession, query *SASTQuery, source string) (QueryFailure, error)
- func (c *Cx1Client) ScanPolling(s *Scan) (Scan, error)
- func (c *Cx1Client) ScanPollingDetailed(s *Scan) (Scan, error)
- func (c *Cx1Client) ScanPollingWithTimeout(s *Scan, detailed bool, delaySeconds, maxSeconds int) (Scan, error)
- func (c *Cx1Client) ScanProjectByID(projectID, sourceUrl, branch, scanType string, settings []ScanConfiguration, ...) (Scan, error)
- func (c *Cx1Client) ScanProjectGitByID(projectID, repoUrl, branch string, settings []ScanConfiguration, ...) (Scan, error)
- func (c *Cx1Client) ScanProjectGitByIDWithHandler(projectID string, handler ScanHandler, settings []ScanConfiguration, ...) (Scan, error)
- func (c *Cx1Client) ScanProjectSBOMByID(projectID, sourceUrl, branch, fileType string, tags map[string]string) (Scan, error)
- func (c *Cx1Client) ScanProjectZipByID(projectID, sourceUrl, branch string, settings []ScanConfiguration, ...) (Scan, error)
- func (c *Cx1Client) SetClientVars(clientvars ClientVars)
- func (c *Cx1Client) SetDeprecationWarning(logged bool)
- func (c *Cx1Client) SetGroupParent(g *Group, parent *Group) error
- func (c *Cx1Client) SetHeader(key, value string)
- func (c *Cx1Client) SetLogger(logger Logger)
- func (c *Cx1Client) SetPaginationSettings(pagination PaginationSettings)
- func (c *Cx1Client) SetProjectBranchByID(projectID, branch string, allowOverride bool) error
- func (c *Cx1Client) SetProjectFileFilterByID(projectID, filter string, allowOverride bool) error
- func (c *Cx1Client) SetProjectLanguageModeByID(projectID, languageMode string, allowOverride bool) error
- func (c *Cx1Client) SetProjectPresetByID(projectID, presetName string, allowOverride bool) error
- func (c *Cx1Client) SetProjectRepositoryByID(projectID, repository string, allowOverride bool) error
- func (c *Cx1Client) SetRetries(retries, delay int)
- func (c *Cx1Client) SetUserAgent(ua string)
- func (c *Cx1Client) SetUserAgentFirefox()
- func (c *Cx1Client) StartImport(dataFilename, mappingFilename, encryptionKey string) (string, error)
- func (c *Cx1Client) StartMigration(dataArchive, projectMapping []byte, encryptionKey string) (string, error)
- func (c Cx1Client) String() string
- func (c *Cx1Client) UpdateApplication(app *Application) error
- func (c *Cx1Client) UpdateClient(client OIDCClient) error
- func (c *Cx1Client) UpdateCxLink(link CxLink) error
- func (c *Cx1Client) UpdateGroup(g *Group) error
- func (c *Cx1Client) UpdateIACPreset(preset Preset) error
- func (c *Cx1Client) UpdateIACQuery(auditSession *AuditSession, query IACQuery) (IACQuery, []QueryFailure, error)
- func (c *Cx1Client) UpdateIACQueryMetadata(auditSession *AuditSession, query IACQuery, metadata AuditIACQueryMetadata) (IACQuery, error)
- func (c *Cx1Client) UpdateIACQuerySource(auditSession *AuditSession, query IACQuery, source string) (IACQuery, []QueryFailure, error)
- func (c *Cx1Client) UpdatePreset_v330(preset *Preset_v330) error
- func (c *Cx1Client) UpdateProject(project *Project) error
- func (c *Cx1Client) UpdateProjectConfiguration(project *Project, settings []ConfigurationSetting) error
- func (c *Cx1Client) UpdateProjectConfigurationByID(projectID string, settings []ConfigurationSetting) error
- func (c *Cx1Client) UpdateQueriesMetadata_v310(level, levelid string, queries []QueryUpdate_v310) error
- func (c *Cx1Client) UpdateQueries_v310(level, levelid string, queries []QueryUpdate_v310) error
- func (c *Cx1Client) UpdateQueryMetadata_v310(query AuditQuery_v310) error
- func (c *Cx1Client) UpdateQuery_v310(query AuditQuery_v310) error
- func (c *Cx1Client) UpdateSASTPreset(preset Preset) error
- func (c *Cx1Client) UpdateSASTQuery(auditSession *AuditSession, query SASTQuery) (SASTQuery, []QueryFailure, error)
- func (c *Cx1Client) UpdateSASTQueryMetadata(auditSession *AuditSession, query SASTQuery, metadata AuditSASTQueryMetadata) (SASTQuery, error)
- func (c *Cx1Client) UpdateSASTQuerySource(auditSession *AuditSession, query SASTQuery, source string) (SASTQuery, []QueryFailure, error)
- func (c *Cx1Client) UpdateScanSchedule(project *Project, schedule ProjectScanSchedule) error
- func (c *Cx1Client) UpdateScanScheduleByID(projectId string, schedule ProjectScanSchedule) error
- func (c *Cx1Client) UpdateUser(user *User) error
- func (c *Cx1Client) UploadBytes(fileContents *[]byte) (string, error)
- func (c *Cx1Client) UploadBytesForProjectByID(projectID string, fileContents *[]byte) (string, error)
- func (c *Cx1Client) UserIsTenantOwner(u *User) (bool, error)
- func (c *Cx1Client) UserLink(u *User) string
- func (c *Cx1Client) ValidateIACQuerySource(auditSession *AuditSession, query *IACQuery, source string) ([]QueryFailure, error)
- func (c *Cx1Client) ValidateQuerySourceByKey(auditSession *AuditSession, queryKey, source string) ([]QueryFailure, error)
- func (c *Cx1Client) ValidateSASTQuerySource(auditSession *AuditSession, query *SASTQuery, source string) ([]QueryFailure, error)
- func (c *Cx1Client) Whoami() (WhoAmI, error)
- type Cx1ClientAuth
- type Cx1ClientConfiguration
- func (c *Cx1ClientConfiguration) GetDefaultClientVars() ClientVars
- func (c *Cx1ClientConfiguration) GetPaginationDefaultsMultiTenant() PaginationSettings
- func (c *Cx1ClientConfiguration) GetPaginationDefaultsSingleTenant() PaginationSettings
- func (c *Cx1ClientConfiguration) ParseClaims(claims Cx1Claims)
- func (c *Cx1ClientConfiguration) ParseToken(token string) error
- func (c *Cx1ClientConfiguration) Validate() error
- type Cx1LongTime
- type Cx1TokenUserInfo
- type CxLink
- type CxLinkFilter
- type CxLinkResponse
- type DataImport
- type DataImportStatus
- type ExportStatus
- type Group
- type GroupAMFilter
- type GroupFilter
- type GroupMembersFilter
- type IACQuery
- type IACQueryCollection
- func (qc *IACQueryCollection) AddCollection(collection *IACQueryCollection)
- func (qc *IACQueryCollection) AddQuery(q IACQuery)
- func (qc *IACQueryCollection) AddQueryTree(t *[]AuditQueryTree, appId, projectId string)
- func (qc IACQueryCollection) GetCustomQueryCollection() IACQueryCollection
- func (qc IACQueryCollection) GetPlatformByName(technology string) *IACQueryPlatform
- func (qc IACQueryCollection) GetQueryByID(qid string) *IACQuery
- func (qc IACQueryCollection) GetQueryByLevelAndKey(level, levelID, key string) *IACQuery
- func (qc IACQueryCollection) GetQueryByLevelAndName(level, levelID, language, group, query string) *IACQuery
- func (qc IACQueryCollection) GetQueryByName(language, group, query string) *IACQuery
- func (qc IACQueryCollection) GetQueryFamilies(_ bool) []QueryFamily
- func (qc IACQueryCollection) Print(logger Logger)
- func (qc *IACQueryCollection) UpdateFromCollection(collection *IACQueryCollection)
- func (qc *IACQueryCollection) UpdateNewQuery(query *IACQuery) error
- type IACQueryGroup
- func (qg IACQueryGroup) GetQueryByID(qid string) *IACQuery
- func (qg IACQueryGroup) GetQueryByKey(key string) *IACQuery
- func (qg IACQueryGroup) GetQueryByLevelAndKey(level, levelID, key string) *IACQuery
- func (qg IACQueryGroup) GetQueryByLevelAndName(level, levelID, name string) *IACQuery
- func (qg IACQueryGroup) GetQueryByName(name string) *IACQuery
- func (qg IACQueryGroup) Print(logger Logger)
- type IACQueryPlatform
- func (ql IACQueryPlatform) GetQueryByID(qid string) *IACQuery
- func (ql IACQueryPlatform) GetQueryByKey(key string) *IACQuery
- func (ql IACQueryPlatform) GetQueryByLevelAndKey(level, levelID, key string) *IACQuery
- func (ql IACQueryPlatform) GetQueryGroupByName(name string) *IACQueryGroup
- func (ql IACQueryPlatform) Print(logger Logger)
- type IACResultsPredicates
- type Logger
- type OIDCClient
- type OIDCClientAMFilter
- type OIDCClientFilter
- type OIDCClientScope
- type PaginationSettings
- type Permission
- type Policy
- type PolicyFilter
- type PolicyViolation
- type PolicyViolationDetails
- type PolicyViolationFilter
- type PolicyViolationInfoPolicy
- type Preset
- func (p Preset) GetIACQueryCollection(queries IACQueryCollection) IACQueryCollection
- func (p Preset) GetSASTQueryCollection(queries SASTQueryCollection) SASTQueryCollection
- func (p Preset) String() string
- func (p Preset) ToPreset_v330() Preset_v330
- func (p *Preset) UpdateQueries(collection QueryCollection)
- type Preset_v330
- type Project
- func (p *Project) AssignApplication(app *Application)
- func (p *Project) AssignApplicationByID(appId string)
- func (p *Project) AssignGroup(group *Group)
- func (p Project) GetConfigurationByName(configKey string) *ConfigurationSetting
- func (p *Project) GetTags() string
- func (p *Project) IsInApplication(app *Application) bool
- func (p *Project) IsInApplicationID(appId string) bool
- func (p *Project) IsInGroup(group *Group) bool
- func (p *Project) IsInGroupID(groupId string) bool
- func (p *Project) RemoveApplication(app *Application)
- func (p *Project) RemoveApplicationByID(appID string)
- func (p Project) String() string
- type ProjectAMFilter
- type ProjectBranchFilter
- type ProjectFilter
- type ProjectOverview
- type ProjectOverviewFilter
- type ProjectPatch
- type ProjectScanSchedule
- type ProjectScanScheduleFilter
- type QueryCollection
- type QueryError
- type QueryFailure
- type QueryFamily
- type QueryUpdateMetadata_v310
- type QueryUpdate_v310
- type ReportStatus
- type ResultState
- type ResultsChangeFilter
- type ResultsChangeHistory
- type ResultsChangelog
- type ResultsPredicatesBase
- type Role
- type RunningScan
- type SASTAggregateSummary
- type SASTAggregateSummaryFilter
- type SASTQuery
- func (q *SASTQuery) CalculateEditorKey() string
- func (q *SASTQuery) CalculateQueryID() (uint64, error)
- func (q SASTQuery) GetMetadata() AuditSASTQueryMetadata
- func (q *SASTQuery) MergeQuery(nq SASTQuery)
- func (q SASTQuery) MetadataDifferent(metadata AuditSASTQueryMetadata) bool
- func (q SASTQuery) String() string
- func (q SASTQuery) StringDetailed() string
- func (q SASTQuery) ToAuditQuery_v310() AuditQuery_v310
- type SASTQueryCollection
- func (qc *SASTQueryCollection) AddAuditQueries_v310(queries *[]AuditQuery_v310)
- func (qc *SASTQueryCollection) AddCollection(collection *SASTQueryCollection)
- func (qc *SASTQueryCollection) AddQueries(queries *[]SASTQuery)
- func (qc *SASTQueryCollection) AddQuery(q SASTQuery)
- func (qc *SASTQueryCollection) AddQueryTree(t *[]AuditQueryTree, appId, projectId string, setExecutable bool)
- func (qc SASTQueryCollection) GetClosestQueryByLevelAndID(level, levelID, language, group string, queryID uint64) *SASTQuery
- func (qc SASTQueryCollection) GetClosestQueryByLevelAndName(level, levelID, language, group, query string) *SASTQuery
- func (qc SASTQueryCollection) GetCustomQueryCollection() SASTQueryCollection
- func (qc SASTQueryCollection) GetDiffs(collection *SASTQueryCollection) (missing SASTQueryCollection, extra SASTQueryCollection)
- func (qc SASTQueryCollection) GetExtraQueries(collection *SASTQueryCollection) (extra SASTQueryCollection)
- func (qc SASTQueryCollection) GetQueries() []SASTQuery
- func (qc SASTQueryCollection) GetQueryByID(qid uint64) *SASTQuery
- func (qc SASTQueryCollection) GetQueryByLevelAndID(level, levelID string, qid uint64) *SASTQuery
- func (qc SASTQueryCollection) GetQueryByLevelAndName(level, levelID, language, group, query string) *SASTQuery
- func (qc SASTQueryCollection) GetQueryByName(language, group, query string) *SASTQuery
- func (qc *SASTQueryCollection) GetQueryCount() uint
- func (qc SASTQueryCollection) GetQueryFamilies(executableOnly bool) []QueryFamily
- func (qc SASTQueryCollection) GetQueryIDs() []uint64
- func (qc SASTQueryCollection) GetQueryLanguageByName(language string) *SASTQueryLanguage
- func (qc SASTQueryCollection) IsSubset(collection *SASTQueryCollection) bool
- func (qc SASTQueryCollection) Print(logger Logger)
- func (qc *SASTQueryCollection) UpdateFromCollection(collection *SASTQueryCollection)
- func (qc *SASTQueryCollection) UpdateFromSession(cx1client *Cx1Client, session *AuditSession) error
- func (qc *SASTQueryCollection) UpdateNewQuery(query *SASTQuery) error
- type SASTQueryGroup
- func (qg SASTQueryGroup) GetQueryByID(qid uint64) *SASTQuery
- func (qg SASTQueryGroup) GetQueryByLevelAndID(level, levelID string, qid uint64) *SASTQuery
- func (qg SASTQueryGroup) GetQueryByLevelAndName(level, levelID, name string) *SASTQuery
- func (qg SASTQueryGroup) GetQueryByName(name string) *SASTQuery
- func (qg SASTQueryGroup) Print(logger Logger)
- func (q SASTQueryGroup) String() string
- type SASTQueryLanguage
- func (ql SASTQueryLanguage) GetQueryByID(qid uint64) *SASTQuery
- func (ql SASTQueryLanguage) GetQueryByLevelAndID(level, levelID string, qid uint64) *SASTQuery
- func (ql SASTQueryLanguage) GetQueryGroupByName(name string) *SASTQueryGroup
- func (ql SASTQueryLanguage) Print(logger Logger)
- func (q SASTQueryLanguage) String() string
- type SASTResultsPredicates
- type Scan
- type ScanConfiguration
- type ScanConfigurationSet
- type ScanContainersResult
- type ScanContainersResultData
- type ScanContainersResultDetails
- type ScanFilter
- type ScanHandler
- type ScanIACResult
- type ScanIACResultData
- type ScanMetadata
- type ScanMetrics
- type ScanResultBase
- type ScanResultSet
- type ScanResultStatusSummary
- type ScanResultSummary
- type ScanResultsFilter
- type ScanSASTResult
- type ScanSASTResultData
- type ScanSASTResultDetails
- type ScanSASTResultNodes
- type ScanSASTResultsFilter
- type ScanSCAContainerResult
- type ScanSCAContainerResultData
- type ScanSCAResult
- type ScanSCAResultCVSS
- type ScanSCAResultData
- type ScanSCAResultDetails
- type ScanSCAResultPackageData
- type ScanStatusDetails
- type ScanStatusSummary
- type ScanSummary
- type ScanSummaryAgeCounter
- type ScanSummaryCategoryCounter
- type ScanSummaryComplianceCounter
- type ScanSummaryContainerPackageCounter
- type ScanSummaryFileCounter
- type ScanSummaryFilter
- type ScanSummaryLanguageCounter
- type ScanSummaryLicenseCounter
- type ScanSummaryPackageCounter
- type ScanSummaryPlatformCounter
- type ScanSummaryQueriesCounter
- type ScanSummaryRiskLevelCounter
- type ScanSummarySeverityCounter
- type ScanSummarySeverityStatusCounter
- type ScanSummaryStateCounter
- type ScanSummaryStatusCounter
- type Status
- type TenantOwner
- type User
- func (u *User) AddGroup(client *Cx1Client, group *Group) error
- func (u User) Delete(client *Cx1Client) error
- func (u User) HasRole(role *Role) (bool, error)
- func (u User) HasRoleByID(roleID string) (bool, error)
- func (u User) HasRoleByName(role string) (bool, error)
- func (u User) IsInGroup(group *Group) (bool, error)
- func (u User) IsInGroupByID(groupId string) (bool, error)
- func (u User) IsInGroupByName(groupName string) (bool, error)
- func (u User) Link(client *Cx1Client) string
- func (u User) Save(client *Cx1Client) error
- func (u User) String() string
- type UserAMFilter
- type UserFilter
- type UserWithAttributes
- type VersionInfo
- func (v VersionInfo) CheckCxOne(version string) (int, error)
- func (v VersionInfo) CheckIAC(version string) (int, error)
- func (v VersionInfo) CheckKICS(version string) (int, error)
- func (v VersionInfo) CheckSAST(version string) (int, error)
- func (v *VersionInfo) Parse() (error, error, error)
- func (v VersionInfo) String() string
- type VersionTriad
- type WhoAmI
- type WorkflowLog
Constants ¶
const AnalyticsTimeLayout = "2006-01-02 15:04:05"
Variables ¶
var AUDIT_QUERY = struct { PRODUCT string TENANT string APPLICATION string PROJECT string }{"Cx", "Tenant", "Application", "Project"}
var AUDIT_QUERY_v310 = struct { PRODUCT string TENANT string APPLICATION string PROJECT string }{"Cx", "Corp", "Team", "Project"}
var ConfigurationSettings = struct { SAST struct { BaseBranch string EngineVerbose string FastScanMode string Filter string Incremental string LanguageMode string LightQueries string PresetName string RecommendedExclusions string ScanMode string } IAC struct { Filter string Platforms string PresetID string } SCA struct { ExploitablePath string Filter string SBOM string } }{ SAST: struct{ BaseBranch, EngineVerbose, FastScanMode, Filter, Incremental, LanguageMode, LightQueries, PresetName, RecommendedExclusions, ScanMode string }{"scan.config.sast.baseBranch", "scan.config.sast.engineVerbose", "scan.config.sast.fastScanMode", "scan.config.sast.filter", "scan.config.sast.incremental", "scan.config.sast.languageMode", "scan.config.sast.lightQueries", "scan.config.sast.presetName", "scan.config.sast.recommendedExclusions", "scan.config.sast.scanMode"}, IAC: struct{ Filter, Platforms, PresetID string }{"scan.config.kics.filter", "scan.config.kics.platforms", "scan.config.kics.presetId"}, SCA: struct{ ExploitablePath, Filter, SBOM string }{"scan.config.sca.ExploitablePath", "scan.config.sca.filter", "scan.config.sca.sbom"}, }
ConfigurationSettings provides an enum-like structure for various configuration keys.
var IAMResourceTypes = []string{"tenant", "application", "project"}
var ScanSortCreatedDescending = "-created_at"
Functions ¶
func GetSeverity ¶ added in v0.0.66
func GetSeverityID ¶ added in v0.0.66
func RemoveIndex ¶ added in v0.0.11
func RemoveIndex(slice []interface{}, index int) []interface{}
func ShortenGUID ¶
Types ¶
type AMRole ¶ added in v0.1.43
type AMRole struct {
ID string `json:"id"`
TenantID string `json:"tenantId"`
Name string `json:"name"`
Description string `json:"description"`
SystemRole bool `json:"systemRole"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
PermissionIDs []string `json:"permissions"`
CustomPermissionIDs []string `json:"customPermissions"`
Attributes []struct {
Name string `json:"name"`
Value string `json:"value"`
} `json:"attributes"`
}
In the future this will be the new Role Access Management Phase 2
type ASTLicense ¶ added in v0.0.40
type AccessAssignedRole ¶ added in v0.0.47
type AccessAssignment ¶ added in v0.0.15
type AccessAssignment struct {
TenantID string `json:"tenantID"`
EntityID string `json:"entityID"`
EntityType string `json:"entityType"`
EntityName string `json:"entityName"`
EntityRoles []AccessAssignedRole `json:"entityRoles"`
ResourceID string `json:"resourceID"`
ResourceType string `json:"resourceType"`
ResourceName string `json:"resourceName"`
CreatedAt string `json:"createdAt"`
}
func (AccessAssignment) String ¶ added in v0.1.44
func (a AccessAssignment) String() string
func (AccessAssignment) ToResource ¶ added in v0.1.28
func (a AccessAssignment) ToResource() AccessibleResource
type AccessibleResource ¶ added in v0.0.15
type AccessibleResource struct {
ResourceID string `json:"resourceId"`
ResourceType string `json:"resourceType"`
ResourceName string `json:"resourceName"`
Roles []string `json:"roles"`
}
func (AccessibleResource) String ¶ added in v0.1.28
func (a AccessibleResource) String() string
type AnalyticsAgingStats ¶ added in v0.1.19
type AnalyticsAgingStats struct {
Label string `json:"label"`
Results int64 `json:"results"`
Severities []AnalyticsLabeledResultsCountEntry `json:"severities"`
}
type AnalyticsDistributionBlock ¶ added in v0.1.10
type AnalyticsDistributionBlock struct {
Label string `json:"label"`
Values []AnalyticsDistributionEntry `json:"values"`
}
type AnalyticsDistributionEntry ¶ added in v0.1.10
type AnalyticsDistributionStats ¶ added in v0.1.10
type AnalyticsDistributionStats struct {
Distribution []AnalyticsDistributionBlock `json:"distribution"`
LOC uint64 `json:"loc"`
Total uint64 `json:"total"`
}
type AnalyticsFilter ¶ added in v0.1.10
type AnalyticsFilter struct {
Projects []string `json:"projects,omitempty"`
Applications []string `json:"applications,omitempty"`
Scanners []string `json:"scanners,omitempty"`
ApplicationTags []string `json:"applicationTags,omitempty"`
ProjectTags []string `json:"projectTags,omitempty"`
ScanTags []string `json:"scanTags,omitempty"`
States []string `json:"states,omitempty"` // toVerify,notExploitable,proposedNotExploitable,confirmed,urgent
Status []string `json:"status,omitempty"`
Severities []string `json:"severities,omitempty"`
BranchNames []string `json:"branchNames,omitempty"`
Timezone string `json:"timezone,omitempty"`
Groups []string `json:"groupIds,omitempty"`
StartDate *AnalyticsTime `json:"startDate,omitempty"`
EndDate *AnalyticsTime `json:"endDate,omitempty"`
}
type AnalyticsIDEOverTimeDistribution ¶ added in v0.1.19
type AnalyticsIDEOverTimeDistribution struct {
Label string `json:"label"`
Values []AnalyticsIDEOverTimeEntry `json:"values"`
}
type AnalyticsIDEOverTimeEntry ¶ added in v0.1.19
type AnalyticsIDEOverTimeEntry struct {
Label string `json:"label"`
Scans float32 `json:"scans"`
Developers float32 `json:"developers"`
Date AnalyticsTime `json:"date"`
}
type AnalyticsIDEStatEntry ¶ added in v0.1.19
type AnalyticsLabeledResultsCountEntry ¶ added in v0.1.19
type AnalyticsMeanTimeEntry ¶ added in v0.1.10
type AnalyticsMeanTimeStats ¶ added in v0.1.10
type AnalyticsMeanTimeStats struct {
MeanTimeData []AnalyticsMeanTimeEntry `json:"meanTimeData"`
MeanTimeStateData []AnalyticsMeanTimeEntry `json:"meanTimeStateData"`
TotalResults int64 `json:"totalResults"`
}
type AnalyticsOverTimeEntry ¶ added in v0.1.10
type AnalyticsOverTimeEntry struct {
Time uint64 `json:"time"`
Value float32 `json:"value"`
Date AnalyticsTime `json:"date"`
}
type AnalyticsOverTimeStats ¶ added in v0.1.10
type AnalyticsOverTimeStats struct {
Label string `json:"label"`
Values []AnalyticsOverTimeEntry `json:"values"`
}
type AnalyticsSeverityAndStateStats ¶ added in v0.1.19
type AnalyticsSeverityAndStateStats struct {
Label string `json:"label"`
Results int64 `json:"results"`
Severities []AnalyticsLabeledResultsCountEntry `json:"severities"`
}
type AnalyticsTime ¶ added in v0.1.10
func (AnalyticsTime) MarshalJSON ¶ added in v0.1.10
func (ct AnalyticsTime) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*AnalyticsTime) UnmarshalJSON ¶ added in v0.1.10
func (ct *AnalyticsTime) UnmarshalJSON(b []byte) error
type AnalyticsVulnerabilitiesStats ¶ added in v0.1.10
type AnalyticsVulnerabilitiesStats struct {
VulnerabilityName string `json:"vulnerabilityName"`
Total int64 `json:"total"`
Severities []AnalyticsLabeledResultsCountEntry `json:"severities"`
}
type Application ¶
type Application struct {
ApplicationID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Criticality uint `json:"criticality"`
Rules []ApplicationRule `json:"rules"`
Tags map[string]string `json:"tags"`
ProjectIds *[]string `json:"projectIds,omitempty"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
// contains filtered or unexported fields
}
func (*Application) AddRule ¶
func (a *Application) AddRule(ruletype, value string)
func (*Application) AssignProject ¶
func (a *Application) AssignProject(project *Project)
AssignProject will create or update a "project.name.in" type rule to assign the project to the app
func (*Application) GetRuleByID ¶ added in v0.0.98
func (a *Application) GetRuleByID(ruleID string) *ApplicationRule
func (*Application) GetRulesByType ¶ added in v0.0.97
func (a *Application) GetRulesByType(ruletype string) []ApplicationRule
returns all rules of this type. There should only be one rule of each type but sometimes there are more.
func (*Application) RemoveRule ¶ added in v0.0.68
func (a *Application) RemoveRule(ruleID string)
func (Application) String ¶
func (a Application) String() string
func (*Application) UnassignProject ¶ added in v0.0.70
func (a *Application) UnassignProject(project *Project)
UnassignProject will remove the project from the "project.name.in" rule if it's there, and if the rule ends up empty it will remove the rule
type ApplicationAMFilter ¶ added in v0.1.43
type ApplicationAMFilter struct {
BaseFilter
Action string `url:"action"`
Name string `url:"name"`
TagsKeys []string `url:"tagsKeys"`
TagsValues []string `url:"tagsValues"`
}
type ApplicationFilter ¶ added in v0.0.84
type ApplicationFilter struct {
BaseFilter
Name string `url:"name,omitempty"`
TagsKeys []string `url:"tags-keys,omitempty"`
TagsValues []string `url:"tags-values,omitempty"`
}
type ApplicationOverview ¶ added in v0.1.22
type ApplicationOverview struct {
ApplicationID string `json:"applicationId"`
Name string `json:"applicationName"`
Criticality uint64 `json:"criticality"`
ProjectNumber uint64 `json:"projectNumber"`
RiskLevel string `json:"riskLevel"`
Tags map[string]string `json:"tags"`
TotalCounters struct {
SeverityCounters []ScanSummarySeverityCounter `json:"severityCounters"`
} `json:"totalCounters"`
}
func (ApplicationOverview) String ¶ added in v0.1.22
func (o ApplicationOverview) String() string
type ApplicationOverviewFilter ¶ added in v0.1.22
type ApplicationOverviewFilter struct {
BaseFilter
Name []string `url:"name,omitempty"`
RiskLevel []string `url:"risk-level,omitempty"`
EmptyTags bool `url:"empty-tags,omitempty"`
Criticality []uint64 `url:"criticality"`
Sort []string `url:"sort,omitempty"` // nname, criticality, num-of-projects, risk-level
}
type ApplicationPatch ¶ added in v0.1.20
type ApplicationRule ¶
type ApplicationRule struct {
ID string `json:"id"`
Type string `json:"type"`
Value string `json:"value"`
}
func (*ApplicationRule) RemoveItem ¶ added in v0.0.70
func (ar *ApplicationRule) RemoveItem(item string)
func (ApplicationRule) String ¶ added in v0.0.98
func (ar ApplicationRule) String() string
type AuditIACQuery ¶ added in v0.1.10
type AuditIACQuery struct {
QueryID string `json:"id"`
Key string `json:"-"`
Name string
Level string
LevelID string
Path string
Source string
Metadata AuditIACQueryMetadata
}
func (AuditIACQuery) ToIACQuery ¶ added in v0.1.10
func (q AuditIACQuery) ToIACQuery() IACQuery
type AuditIACQueryMetadata ¶ added in v0.1.10
type AuditIACQueryMetadata struct {
Aggregation string `json:"aggregation,omitempty"`
Category string `json:"category,omitempty"`
CloudProvider string `json:"cloudprovider,omitempty"`
Cwe string `json:"cwe,omitempty"`
Description string `json:"description,omitempty"`
DescriptionID string `json:"descriptionId,omitempty"`
DescriptionURL string `json:"descriptionurl,omitempty"`
OldSeverity string `json:"oldseverity,omitempty"`
Platform string `json:"platform"`
QueryID string `json:"queryId"`
Name string `json:"queryname"`
Severity string `json:"severity"`
}
type AuditPermissions ¶ added in v0.0.66
type AuditQueryTree ¶ added in v0.0.66
type AuditQueryTree struct {
IsLeaf bool
Title string
Key string
Data struct {
Level string
Severity string
CWE int64
Custom bool
}
Children []AuditQueryTree
}
func (AuditQueryTree) ToIACQuery ¶ added in v0.1.10
func (query AuditQueryTree) ToIACQuery(levelTitle, platformTitle, groupTitle, projectId, appId string, isCustom bool) IACQuery
type AuditQuery_v310 ¶ added in v0.0.66
type AuditQuery_v310 struct {
QueryID uint64 `json:"Id,string"`
Level string
LevelID string `json:"-"`
Path string
Modified string
Source string
Name string
Group string
Language string `json:"lang"`
Severity string
Cwe int64
IsExecutable bool
CxDescriptionId int64
QueryDescriptionId string
Key string
Title string
}
func FindQueryByName_v310 ¶ added in v0.0.66
func FindQueryByName_v310(queries []AuditQuery_v310, level, language, group, name string) (AuditQuery_v310, error)
func (AuditQuery_v310) CreateApplicationOverrideByID ¶ added in v0.0.67
func (q AuditQuery_v310) CreateApplicationOverrideByID(applicationId string) AuditQuery_v310
func (AuditQuery_v310) CreateProjectOverrideByID ¶ added in v0.0.67
func (q AuditQuery_v310) CreateProjectOverrideByID(projectId string) AuditQuery_v310
func (AuditQuery_v310) CreateTenantOverride ¶ added in v0.0.67
func (q AuditQuery_v310) CreateTenantOverride() AuditQuery_v310
func (*AuditQuery_v310) ParsePath ¶ added in v0.0.66
func (q *AuditQuery_v310) ParsePath()
func (AuditQuery_v310) String ¶ added in v0.0.66
func (q AuditQuery_v310) String() string
func (AuditQuery_v310) ToQuery ¶ added in v0.0.66
func (q AuditQuery_v310) ToQuery() SASTQuery
type AuditQuery_v312 ¶ added in v0.0.66
type AuditQuery_v312 struct {
QueryID uint64 `json:"Id,string"`
Level string
LevelID string `json:"-"`
Path string
Modified string
Source string
Name string
Group string
Language string `json:"lang"`
Severity string
Cwe int64
IsExecutable bool
CxDescriptionId int64
QueryDescriptionId string
Key string
Title string
}
this struct is used specifically for the to-be-deprecated /cx-audit/queries endpoint
func (AuditQuery_v312) ToQuery ¶ added in v0.0.66
func (q AuditQuery_v312) ToQuery() SASTQuery
type AuditSASTQuery ¶ added in v0.1.10
type AuditSASTQuery struct {
Key string `json:"id"`
Name string
Level string
LevelID string
Path string
Source string
Metadata AuditSASTQueryMetadata
}
func (*AuditSASTQuery) CalculateEditorKey ¶ added in v0.1.10
func (q *AuditSASTQuery) CalculateEditorKey() string
func (AuditSASTQuery) CalculateQueryID ¶ added in v0.1.10
func (q AuditSASTQuery) CalculateQueryID() (uint64, error)
func (AuditSASTQuery) String ¶ added in v0.1.10
func (q AuditSASTQuery) String() string
func (AuditSASTQuery) ToSASTQuery ¶ added in v0.1.10
func (q AuditSASTQuery) ToSASTQuery() SASTQuery
type AuditSASTQueryMetadata ¶ added in v0.1.10
type AuditSASTQueryMetadata struct {
Cwe int64 `json:"cwe,omitempty"`
IsExecutable bool `json:"executable"`
CxDescriptionID int64 `json:"description,omitempty"`
Language string `json:"language"`
Group string `json:"group"`
Severity string `json:"severity"`
SastID uint64 `json:"sastId,omitempty"`
Name string `json:"name"`
}
type AuditScanSourceFile ¶ added in v0.0.66
type AuditScanSourceFile struct {
IsLeaf bool `json:"isLeaf"`
Title string `json:"title"`
Key string `json:"key"`
Children []AuditScanSourceFile `json:"children"`
}
type AuditSession ¶ added in v0.0.66
type AuditSession struct {
ID string `json:"id"`
Data struct {
Status string `json:"status"`
RequestID string `json:"requestId"`
QueryFilters []string `json:"queryFilters"`
Permissions struct {
Tenant AuditPermissions `json:"tenant"`
Project AuditPermissions `json:"project"`
Application AuditPermissions `json:"application"`
} `json:"permissions"`
} `json:"data"`
ProjectName string `json:"projectName"`
QueryBuilder bool `json:"queryBuilder"`
ApplicationAssociation bool `json:"applicationAssociation"`
Status string `json:"status"`
Value []string `json:"value"`
Engine string `json:"-"`
ProjectID string `json:"-"`
ApplicationID string `json:"-"`
ScanID string `json:"-"`
Languages []string `json:"-"`
Platforms []string `json:"-"`
CreatedAt time.Time `json:"-"`
LastHeartbeat time.Time `json:"-"`
}
func (AuditSession) HasLanguage ¶ added in v0.0.67
func (s AuditSession) HasLanguage(language string) bool
func (AuditSession) HasPlatform ¶ added in v0.1.10
func (s AuditSession) HasPlatform(platform string) bool
func (AuditSession) String ¶ added in v0.0.87
func (s AuditSession) String() string
type AuditSessionFilters ¶ added in v0.0.79
type AuditSessionFilters map[string]AuditSessionLanguageFilters
type AuditSessionLanguage ¶ added in v0.0.79
type AuditSessionLanguageFilters ¶ added in v0.0.79
type AuditSessionLanguageFilters struct {
Description string
Filters []AuditSessionLanguage
}
type AuthenticationProvider ¶ added in v0.0.54
type AuthenticationProvider struct {
Alias string `json:"alias"`
ID string `json:"internalId,omitempty"`
ProviderID string `json:"providerId"`
}
func (AuthenticationProvider) MakeDefaultMapper ¶ added in v0.0.54
func (a AuthenticationProvider) MakeDefaultMapper(attribute string) (AuthenticationProviderMapper, error)
Convenience functions
func (AuthenticationProvider) String ¶ added in v0.0.54
func (p AuthenticationProvider) String() string
type AuthenticationProviderMapper ¶ added in v0.0.54
type AuthenticationProviderMapper struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Alias string `json:"identityProviderAlias"`
Mapper string `json:"identityProviderMapper"`
Config AuthenticationProviderMapperConfig `json:"config"`
}
func (AuthenticationProviderMapper) String ¶ added in v0.0.54
func (m AuthenticationProviderMapper) String() string
type AuthenticationProviderMapperConfig ¶ added in v0.0.54
type AuthenticationProviderMapperConfig struct {
SyncMode string `json:"syncMode"`
UserAttribute string `json:"user.attribute,omitempty"`
FriendlyName string `json:"attribute.friendly.name,omitempty"`
Format string `json:"attribute.name.format,omitempty"`
Name string `json:"attribute.name,omitempty"`
Role string `json:"attribute.role,omitempty"`
Value string `json:"attribute.value,omitempty"`
Target string `json:"target,omitempty"`
Template string `json:"template,omitempty"`
}
type BaseFilter ¶ added in v0.0.84
type BaseFilter struct {
Offset uint64 `url:"offset"` // offset is set automatically for pagination
Limit uint64 `url:"limit"` // limit is set automatically for pagination, should generally not be 0
}
func (*BaseFilter) Bump ¶ added in v0.0.84
func (f *BaseFilter) Bump()
type BaseFilteredResponse ¶ added in v0.0.84
type BaseIAMFilter ¶ added in v0.0.84
type BaseIAMFilter struct {
First uint64 `url:"first"` // offset is set automatically for pagination
Max uint64 `url:"max"` // limit is set automatically for pagination, should generally not be 0
}
func (*BaseIAMFilter) Bump ¶ added in v0.0.84
func (f *BaseIAMFilter) Bump()
type BasePolicyFilter ¶ added in v0.1.30
type BasePolicyFilter struct {
Page uint64 `url:"page"` // eg offset = (page-1)*limit
Limit uint64 `url:"limit"` // limit is set automatically for pagination, should generally not be 0
}
func (*BasePolicyFilter) Bump ¶ added in v0.1.30
func (f *BasePolicyFilter) Bump()
type ClientVars ¶ added in v0.0.19
type ClientVars struct {
MigrationPollingMaxSeconds int
MigrationPollingDelaySeconds int
AuditEnginePollingMaxSeconds int
AuditEnginePollingDelaySeconds int
AuditScanPollingMaxSeconds int
AuditScanPollingDelaySeconds int
AuditCompilePollingMaxSeconds int
AuditCompilePollingDelaySeconds int
AuditLanguagePollingMaxSeconds int
AuditLanguagePollingDelaySeconds int
ReportPollingMaxSeconds int
ReportPollingDelaySeconds int
ExportPollingMaxSeconds int
ExportPollingDelaySeconds int
ScanPollingMaxSeconds int
ScanPollingDelaySeconds int
ProjectApplicationLinkPollingMaxSeconds int
ProjectApplicationLinkPollingDelaySeconds int
}
type ConfigurationSetting ¶ added in v0.0.39
type ConfigurationSetting struct {
Key string `json:"key,omitempty"`
Name string `json:"name,omitempty"`
Category string `json:"category,omitempty"`
OriginLevel string `json:"originLevel,omitempty"`
Value string `json:"value,omitempty"`
ValueType string `json:"valuetype,omitempty"`
ValueTypeParams string `json:"valuetypeparams,omitempty"`
AllowOverride bool `json:"allowOverride,omitempty"`
}
func (ConfigurationSetting) String ¶ added in v0.1.35
func (c ConfigurationSetting) String() string
func (ConfigurationSetting) StringDetailed ¶ added in v0.1.35
func (c ConfigurationSetting) StringDetailed() string
type Cx1Cache ¶
type Cx1Cache struct {
ProjectRefresh bool
Projects []Project
GroupRefresh bool
Groups []Group
UserRefresh bool
Users []User
QueryRefresh bool
Queries SASTQueryCollection
PresetRefresh bool
Presets map[string][]Preset
RoleRefresh bool
Roles []Role
Applications []Application
ApplicationRefresh bool
Clients []OIDCClient
ClientRefresh bool
}
func (*Cx1Cache) ApplicationSummary ¶ added in v0.0.54
func (*Cx1Cache) ClientSummary ¶ added in v0.0.56
func (*Cx1Cache) GetApplication ¶ added in v0.0.54
func (c *Cx1Cache) GetApplication(applicationID string) (*Application, error)
func (*Cx1Cache) GetApplicationByName ¶ added in v0.0.54
func (c *Cx1Cache) GetApplicationByName(name string) (*Application, error)
func (*Cx1Cache) GetClient ¶ added in v0.0.56
func (c *Cx1Cache) GetClient(ID string) (*OIDCClient, error)
func (*Cx1Cache) GetClientByID ¶ added in v0.0.56
func (c *Cx1Cache) GetClientByID(clientId string) (*OIDCClient, error)
func (*Cx1Cache) GetPresetByName ¶
func (*Cx1Cache) GetProjectByName ¶
func (*Cx1Cache) GetQueryByNames ¶
func (*Cx1Cache) GetUserByString ¶
func (*Cx1Cache) GroupSummary ¶
func (*Cx1Cache) MatchPresetQueries ¶ added in v0.0.62
func (c *Cx1Cache) MatchPresetQueries()
func (*Cx1Cache) PresetSummary ¶
func (*Cx1Cache) ProjectSummary ¶
func (*Cx1Cache) QuerySummary ¶
func (*Cx1Cache) RefreshApplications ¶ added in v0.0.54
func (*Cx1Cache) RefreshClients ¶ added in v0.0.56
func (*Cx1Cache) RefreshGroups ¶
func (*Cx1Cache) RefreshPresets ¶
func (*Cx1Cache) RefreshProjects ¶
func (*Cx1Cache) RefreshQueries ¶
This is only the SAST queries To do - add IAC?
func (*Cx1Cache) RefreshRoles ¶
func (*Cx1Cache) RefreshUsers ¶
func (*Cx1Cache) UserSummary ¶
type Cx1Claims ¶ added in v0.0.40
type Cx1Claims struct {
jwt.RegisteredClaims
Cx1License ASTLicense `json:"ast-license"`
IsServiceUser string `json:"is-service-user"`
ISS string `json:"iss"`
UserID string `json:"sub"`
Username string `json:"name"`
ClientID string `json:"clientId"`
ASTBaseURL string `json:"ast-base-url"`
TenantID string `json:"tenant_id"`
TenantName string `json:"tenant_name"`
Email string `json:"email"`
Expiry int64 `json:"exp"`
AZP string `json:"azp"`
// the following are generated during parsing
IAMURL string `json:"-"`
ExpiryTime time.Time `json:"-"`
}
type Cx1Client ¶
type Cx1Client struct {
// contains filtered or unexported fields
}
func NewAPIKeyClient ¶
Create a new Cx1Client using an API Key You can also use NewClient instead which automatically pulls from command-line arguments
func NewAPIKeyClientWithToken ¶ added in v0.1.45
func NewAPIKeyClientWithToken(client *http.Client, api_key, last_access_token string, logger Logger) (*Cx1Client, error)
Create a new Cx1Client using an API Key along with an existing access_token You can also use NewClient instead which automatically pulls from command-line arguments
func NewClient ¶ added in v0.0.73
Reads command-line flags to create a Cx1Client Useful when writing stand-alone CLI tools
func NewClientWithOptions ¶ added in v0.1.45
func NewClientWithOptions(options Cx1ClientConfiguration) (*Cx1Client, error)
This function creates a new Cx1Client with the provided configuration. This allows for more advanced configuration of a client and is also used by other constructors. Most users should use NewClient or NewOAuthClient/NewAPIKeyClient instead for convenience.
func NewOAuthClient ¶
func NewOAuthClient(client *http.Client, base_url, iam_url, tenant, client_id, client_secret string, logger Logger) (*Cx1Client, error)
Create a new Cx1Client using OAuth Client ID & Client Secret You can also use NewClient instead which automatically pulls from command-line arguments
func NewOAuthClientWithToken ¶ added in v0.1.45
func NewOAuthClientWithToken(client *http.Client, base_url, iam_url, tenant, client_id, client_secret, last_access_token string, logger Logger) (*Cx1Client, error)
Create a new Cx1Client using OAuth Client ID & Client Secret along with an existing access_token You can also use NewClient instead which automatically pulls from command-line arguments
func NewTokenClient ¶ added in v0.1.45
Create a client from an access token The client will be unable to generate a new access token - useful for zero trust workflows
func (*Cx1Client) AddAccessAssignment ¶ added in v0.0.15
func (c *Cx1Client) AddAccessAssignment(access AccessAssignment) error
Add a specific access assignment
func (*Cx1Client) AddAuthenticationProviderMapper ¶ added in v0.0.54
func (c *Cx1Client) AddAuthenticationProviderMapper(mapper AuthenticationProviderMapper) error
func (*Cx1Client) AddClientScopeByID ¶ added in v0.0.15
review Keycloak documentation for correct usage
func (*Cx1Client) AddIACResultsPredicates ¶ added in v0.1.10
func (c *Cx1Client) AddIACResultsPredicates(predicates []IACResultsPredicates) error
func (*Cx1Client) AddKICSResultsPredicates ¶ added in v0.0.37
func (c *Cx1Client) AddKICSResultsPredicates(predicates []IACResultsPredicates) error
func (*Cx1Client) AddRoleComposites ¶
func (*Cx1Client) AddRolesToGroup ¶ added in v0.0.16
clientRoles map looks like: "ast-app" : { "ast-scanner", "ast-viewer" }
func (*Cx1Client) AddSASTResultsPredicates ¶ added in v0.0.37
func (c *Cx1Client) AddSASTResultsPredicates(predicates []SASTResultsPredicates) error
results
func (*Cx1Client) AddUserAppRoles ¶
func (*Cx1Client) AddUserIAMRoles ¶
func (*Cx1Client) AssignApplicationToProjectsByIDs ¶ added in v0.1.14
func (c *Cx1Client) AssignApplicationToProjectsByIDs(applicationId string, projectIds []string) error
Directly assign an application to one or more projects requires the direct_app_association feature
func (*Cx1Client) AssignProjectToApplicationsByIDs ¶ added in v0.1.14
func (c *Cx1Client) AssignProjectToApplicationsByIDs(projectId string, applicationIds []string) error
Directly assign a project to one or more applications This should be used separately from the Project.AssignApplication + UpdateProject(Project) flow
func (*Cx1Client) AssignUserToGroupByID ¶
func (*Cx1Client) AuditCreateSession ¶ added in v0.0.79
func (c *Cx1Client) AuditCreateSession(engine, language string) (AuditSession, error)
This function will be deprecated - use GetAuditSession instead They are functionally identical but this function name is misleading
func (*Cx1Client) AuditCreateSessionByID ¶ added in v0.0.11
func (c *Cx1Client) AuditCreateSessionByID(engine, projectId, scanId string) (AuditSession, error)
You should probably use GetAuditSessionByID instead
func (*Cx1Client) AuditDeleteSession ¶ added in v0.0.67
func (c *Cx1Client) AuditDeleteSession(auditSession *AuditSession) error
Please use DeleteAuditSession instead (renamed for consistency)
func (*Cx1Client) AuditGetRequestStatusByID ¶ added in v0.0.66
func (c *Cx1Client) AuditGetRequestStatusByID(auditSession *AuditSession, requestId string) (bool, interface{}, error)
This function is unlikely to be needed directly and will be deprecated. If you need this function, please reach out to michael.kubiaczyk@checkmarx.com (or via github issue) to discuss your use case. This function will be removed to simplify the interface.
func (*Cx1Client) AuditGetScanSourcesByID ¶ added in v0.0.66
func (c *Cx1Client) AuditGetScanSourcesByID(auditSession *AuditSession) ([]AuditScanSourceFile, error)
This function is unlikely to be needed directly and will be deprecated. If you need this function, please reach out to michael.kubiaczyk@checkmarx.com (or via github issue) to discuss your use case. This function will be removed to simplify the interface.
func (*Cx1Client) AuditNewQuery_v310 ¶ added in v0.0.66
func (c *Cx1Client) AuditNewQuery_v310(language, group, name string) (AuditQuery_v310, error)
func (*Cx1Client) AuditRequestStatusPollingByID ¶ added in v0.0.66
func (c *Cx1Client) AuditRequestStatusPollingByID(auditSession *AuditSession, requestId string) (interface{}, error)
This function is unlikely to be needed directly and will be deprecated. If you need this function, please reach out to michael.kubiaczyk@checkmarx.com (or via github issue) to discuss your use case. This function will be removed to simplify the interface.
func (*Cx1Client) AuditRequestStatusPollingByIDWithTimeout ¶ added in v0.0.68
func (c *Cx1Client) AuditRequestStatusPollingByIDWithTimeout(auditSession *AuditSession, requestId string, delaySeconds, maxSeconds int) (interface{}, error)
This function is unlikely to be needed directly and will be deprecated. If you need this function, please reach out to michael.kubiaczyk@checkmarx.com (or via github issue) to discuss your use case. This function will be removed to simplify the interface.
func (*Cx1Client) AuditRunScanByID ¶ added in v0.0.11
func (c *Cx1Client) AuditRunScanByID(auditSession *AuditSession) error
This function is unlikely to be needed directly and will be deprecated. If you need this function, please reach out to michael.kubiaczyk@checkmarx.com (or via github issue) to discuss your use case. This function will be removed to simplify the interface.
func (*Cx1Client) AuditSessionKeepAlive ¶ added in v0.0.11
func (c *Cx1Client) AuditSessionKeepAlive(auditSession *AuditSession) error
Refresh an audit session to keep it alive Should be called periodically to prevent session expiration, rate limited to 1 per 2 minutes
func (*Cx1Client) CancelScanByID ¶ added in v0.0.50
Cancel a scan by ID
func (*Cx1Client) CheckAccessToResourceByID ¶ added in v0.0.15
func (c *Cx1Client) CheckAccessToResourceByID(resourceId, resourceType, action string) (bool, error)
Check if the current user has access to execute a specific action on this resource
func (*Cx1Client) CheckAccessibleResources ¶ added in v0.0.15
func (c *Cx1Client) CheckAccessibleResources(resourceTypes []string, action string) (bool, []AccessibleResource, error)
Check which resources are accessible to this user
func (*Cx1Client) CheckIAMVersion ¶ added in v0.1.28
func (*Cx1Client) Clone ¶ added in v0.1.12
returns a copy of this client which can be used separately they will not share access tokens or other data after the clone.
func (*Cx1Client) CreateAccessAssignment ¶ added in v0.1.44
func (c *Cx1Client) CreateAccessAssignment(user *User, group *Group, client *OIDCClient, project *Project, application *Application, roles []AccessAssignedRole) (AccessAssignment, error)
Create a new access assignment object and issue it to the platform. If only the project is provided: project-level access. If only the application is provided: application-level access. If the tenant bool is set (regardless of project/application): tenant-level access. Similar behavior for the user, group, and client pointers
func (*Cx1Client) CreateAppRole ¶
func (*Cx1Client) CreateApplication ¶
func (c *Cx1Client) CreateApplication(appname string) (Application, error)
Create a new application
func (*Cx1Client) CreateAuthenticationProvider ¶ added in v0.0.54
func (c *Cx1Client) CreateAuthenticationProvider(alias, providerId string) (AuthenticationProvider, error)
func (*Cx1Client) CreateChildGroup ¶
func (*Cx1Client) CreateClient ¶ added in v0.0.15
func (c *Cx1Client) CreateClient(name string, notificationEmails []string, secretExpiration int) (OIDCClient, error)
Create a new OIDC client
func (*Cx1Client) CreateCustomResultState ¶ added in v0.1.11
func (c *Cx1Client) CreateCustomResultState(state string) (ResultState, error)
func (*Cx1Client) CreateCxLink ¶ added in v0.1.26
func (c *Cx1Client) CreateCxLink(name, description, privateUrl string) (newLink CxLinkResponse, err error)
func (*Cx1Client) CreateGroup ¶
create a top-level group
func (*Cx1Client) CreateIACPreset ¶ added in v0.1.10
func (c *Cx1Client) CreateIACPreset(name, description string, collection IACQueryCollection) (Preset, error)
func (*Cx1Client) CreateIACQueryOverride ¶ added in v0.1.10
func (c *Cx1Client) CreateIACQueryOverride(auditSession *AuditSession, level string, baseQuery *IACQuery) (IACQuery, error)
Level options are: QueryTypeTenant(), QueryTypeApplication(), QueryTypeProject() When creating overrides, it is best to first fetch the full query collection (via GetIACQueryCollection) to pass in the base query
func (*Cx1Client) CreateNewIACQuery ¶ added in v0.1.10
func (c *Cx1Client) CreateNewIACQuery(auditSession *AuditSession, query IACQuery) (IACQuery, []QueryFailure, error)
Create a new IAC query (not an override) This will be a tenant-level query to be overridden for Application or Project level as needed
func (*Cx1Client) CreateNewSASTQuery ¶ added in v0.1.10
func (c *Cx1Client) CreateNewSASTQuery(auditSession *AuditSession, query SASTQuery) (SASTQuery, []QueryFailure, error)
Create a new SAST query (not an override) This will be a tenant-level query to be overridden for Application or Project level as needed
func (*Cx1Client) CreatePreset_v330 ¶ added in v0.1.10
func (c *Cx1Client) CreatePreset_v330(name, description string, queryIDs []uint64) (Preset_v330, error)
func (*Cx1Client) CreateProject ¶
func (c *Cx1Client) CreateProject(projectname string, cx1_group_ids []string, tags map[string]string) (Project, error)
Create a new project
func (*Cx1Client) CreateProjectInApplication ¶ added in v0.0.31
func (c *Cx1Client) CreateProjectInApplication(projectname string, cx1_group_ids []string, tags map[string]string, applicationId string) (Project, error)
Create a project in an application and poll until the project is created and attached to the application
func (*Cx1Client) CreateProjectInApplicationWOPolling ¶ added in v0.0.101
func (c *Cx1Client) CreateProjectInApplicationWOPolling(projectname string, cx1_group_ids []string, tags map[string]string, applicationId string) (Project, error)
Create a new project inside an application Does not wait/poll until the project is created and attached to the application
func (*Cx1Client) CreateSAMLUser ¶ added in v0.0.64
func (c *Cx1Client) CreateSAMLUser(newuser User, idpAlias, idpUserId, idpUserName string) (User, error)
CreateSAMLUser will directly create a user that can log in via SAML, requiring the internal identifiers that are used within the identity provider. This function requires some special behavior that's not supported by the standard user type, and requires a two-step process of creating and then updating the user.
func (*Cx1Client) CreateSASTPreset ¶ added in v0.1.10
func (c *Cx1Client) CreateSASTPreset(name, description string, collection SASTQueryCollection) (Preset, error)
func (*Cx1Client) CreateSASTQueryOverride ¶ added in v0.1.10
func (c *Cx1Client) CreateSASTQueryOverride(auditSession *AuditSession, level string, baseQuery *SASTQuery) (SASTQuery, error)
Level options are: QueryTypeTenant(), QueryTypeApplication(), QueryTypeProject() When creating overrides, it is best to first fetch the full query collection (via GetSASTQueryCollection) to pass in the base query
func (*Cx1Client) CreateScanSchedule ¶ added in v0.0.99
func (c *Cx1Client) CreateScanSchedule(project *Project, s ProjectScanSchedule) error
func (*Cx1Client) CreateScanScheduleByID ¶ added in v0.0.99
func (c *Cx1Client) CreateScanScheduleByID(projectId string, s ProjectScanSchedule) error
func (*Cx1Client) DeleteAccessAssignmentByID ¶ added in v0.0.15
func (*Cx1Client) DeleteApplication ¶
func (c *Cx1Client) DeleteApplication(application *Application) error
Delete an application There is no UNDO
func (*Cx1Client) DeleteApplicationByID ¶
Delete an application by ID There is no UNDO
func (*Cx1Client) DeleteAuditSession ¶ added in v0.1.40
func (c *Cx1Client) DeleteAuditSession(auditSession *AuditSession) error
Delete an audit session. Frees up a slot for new sessions.
func (*Cx1Client) DeleteAuthenticationProvider ¶ added in v0.0.54
func (c *Cx1Client) DeleteAuthenticationProvider(provider AuthenticationProvider) error
func (*Cx1Client) DeleteAuthenticationProviderMapper ¶ added in v0.0.54
func (c *Cx1Client) DeleteAuthenticationProviderMapper(mapper AuthenticationProviderMapper) error
func (*Cx1Client) DeleteClientByID ¶ added in v0.0.15
Delete an OIDC Client
func (*Cx1Client) DeleteCustomResultState ¶ added in v0.1.11
func (*Cx1Client) DeleteCxLink ¶ added in v0.1.26
func (*Cx1Client) DeleteCxLinkByID ¶ added in v0.1.26
func (*Cx1Client) DeleteGroup ¶
func (*Cx1Client) DeletePreset ¶
func (*Cx1Client) DeletePreset_v330 ¶ added in v0.1.10
func (c *Cx1Client) DeletePreset_v330(preset *Preset_v330) error
func (*Cx1Client) DeleteProject ¶
Delete the project There is no UNDO
func (*Cx1Client) DeleteQueryByName_v310 ¶ added in v0.0.66
func (*Cx1Client) DeleteQueryOverrideByKey ¶ added in v0.0.66
func (c *Cx1Client) DeleteQueryOverrideByKey(auditSession *AuditSession, queryKey string) error
func (*Cx1Client) DeleteQuery_v310 ¶ added in v0.0.66
func (c *Cx1Client) DeleteQuery_v310(query AuditQuery_v310) error
func (*Cx1Client) DeleteRoleByID ¶
func (*Cx1Client) DeleteRolesFromGroup ¶ added in v0.0.16
clientRoles map looks like: "ast-app" : { "ast-scanner", "ast-viewer" }
func (*Cx1Client) DeleteScanByID ¶ added in v0.0.12
Delete a scan by ID
func (*Cx1Client) DeleteScanSchedules ¶ added in v0.0.99
func (*Cx1Client) DeleteScanSchedulesByID ¶ added in v0.0.99
func (*Cx1Client) DeleteUser ¶
func (*Cx1Client) DeleteUserByID ¶
func (*Cx1Client) DownloadExport ¶ added in v0.1.25
func (*Cx1Client) DownloadReport ¶
func (*Cx1Client) ExportPollingByID ¶ added in v0.1.25
convenience function, polls and returns the URL to download the export
func (*Cx1Client) ExportPollingByIDWithTimeout ¶ added in v0.1.25
func (*Cx1Client) FillGroup ¶ added in v0.0.84
fills the group's immediate children (subgroups) along with sub-children and all descendents
func (*Cx1Client) FindQueryByName_v310 ¶ added in v0.0.69
func (c *Cx1Client) FindQueryByName_v310(queries []AuditQuery_v310, level, language, group, name string) (AuditQuery_v310, error)
func (*Cx1Client) GetAMApplicationsFiltered ¶ added in v0.1.43
func (c *Cx1Client) GetAMApplicationsFiltered(filter ApplicationAMFilter) ([]Application, error)
Get applications (from access-management) IAM phase2 - these endpoints are not finalized so these functions should not yet be used in production
func (*Cx1Client) GetAMClientsFiltered ¶ added in v0.1.43
func (c *Cx1Client) GetAMClientsFiltered(filter OIDCClientAMFilter) ([]OIDCClient, error)
Get clients (from access-management) IAM phase2 - these endpoints are not finalized so these functions should not yet be used in production
func (*Cx1Client) GetAMGroupsFiltered ¶ added in v0.1.43
func (c *Cx1Client) GetAMGroupsFiltered(filter GroupAMFilter) ([]Group, error)
Get groups (from access-management) IAM phase2 - these endpoints are not finalized so these functions should not yet be used in production
func (*Cx1Client) GetAMPermissions ¶ added in v0.1.43
func (c *Cx1Client) GetAMPermissions() ([]Permission, error)
Get Permissions (from access-management) IAM phase2 - these endpoints are not finalized so these functions should not yet be used in production
func (*Cx1Client) GetAMProjectsFiltered ¶ added in v0.1.43
func (c *Cx1Client) GetAMProjectsFiltered(filter ProjectAMFilter) ([]Project, error)
Get projects (from access-management) IAM phase2 - these endpoints are not finalized so these functions should not yet be used in production
func (*Cx1Client) GetAMRoles ¶ added in v0.1.43
Get Permissions (from access-management) IAM phase2 - these endpoints are not finalized so these functions should not yet be used in production
func (*Cx1Client) GetAMUsersFiltered ¶ added in v0.1.43
func (c *Cx1Client) GetAMUsersFiltered(filter UserAMFilter) ([]User, error)
Get users (from access-management) IAM phase2 - these endpoints are not finalized so these functions should not yet be used in production
func (*Cx1Client) GetAccessAssignmentByID ¶ added in v0.0.15
func (c *Cx1Client) GetAccessAssignmentByID(entityId, resourceId string) (AccessAssignment, error)
Retrieves a specific entity-resource assignment from Access Management As of Nov '25 this will not consider implied permissions eg: user in group + group has access = user has access but no access assignment
func (*Cx1Client) GetAccessToken ¶ added in v0.1.10
func (*Cx1Client) GetAllApplicationOverviews ¶ added in v0.1.35
func (c *Cx1Client) GetAllApplicationOverviews() ([]ApplicationOverview, error)
func (*Cx1Client) GetAllApplicationOverviewsFiltered ¶ added in v0.1.22
func (c *Cx1Client) GetAllApplicationOverviewsFiltered(filter ApplicationOverviewFilter) (uint64, []ApplicationOverview, error)
Retrieves all applications matching the filter
func (*Cx1Client) GetAllApplications ¶ added in v0.0.84
func (c *Cx1Client) GetAllApplications() ([]Application, error)
Get all applications
func (*Cx1Client) GetAllApplicationsFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetAllApplicationsFiltered(filter ApplicationFilter) (uint64, []Application, error)
retrieves all applications matching the filter using pagination set via filter.Limit or Get/SetPaginationSettings
func (*Cx1Client) GetAllClientsFiltered ¶ added in v0.1.33
func (c *Cx1Client) GetAllClientsFiltered(filter OIDCClientFilter) (uint64, []OIDCClient, error)
func (*Cx1Client) GetAllCxLinks ¶ added in v0.1.26
func (*Cx1Client) GetAllCxLinksFiltered ¶ added in v0.1.26
func (c *Cx1Client) GetAllCxLinksFiltered(filter CxLinkFilter) (uint64, []CxLink, error)
Retrieves all cxlinks matching the filter
func (*Cx1Client) GetAllGroupMembersFiltered ¶ added in v0.1.10
func (*Cx1Client) GetAllGroups ¶ added in v0.0.84
func (*Cx1Client) GetAllGroupsFiltered ¶ added in v0.0.84
returns all groups matching the filter fill parameter will recursively fill subgroups
func (*Cx1Client) GetAllIACPresets ¶ added in v0.1.31
func (*Cx1Client) GetAllPolicies ¶ added in v0.1.30
func (*Cx1Client) GetAllPoliciesFiltered ¶ added in v0.1.30
func (c *Cx1Client) GetAllPoliciesFiltered(filter PolicyFilter) (uint64, []Policy, error)
Retrieves all policies matching the filter
func (*Cx1Client) GetAllPolicyViolations ¶ added in v0.1.30
func (c *Cx1Client) GetAllPolicyViolations() ([]PolicyViolation, error)
func (*Cx1Client) GetAllPolicyViolationsFiltered ¶ added in v0.1.30
func (c *Cx1Client) GetAllPolicyViolationsFiltered(filter PolicyViolationFilter) (uint64, []PolicyViolation, error)
Retrieves all PolicyViolations matching the filter
func (*Cx1Client) GetAllPresets_v330 ¶ added in v0.1.10
func (c *Cx1Client) GetAllPresets_v330() ([]Preset_v330, error)
convenience
func (*Cx1Client) GetAllProjectBranchesFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetAllProjectBranchesFiltered(filter ProjectBranchFilter) ([]string, error)
returns all of a project's branches matching a filter
func (*Cx1Client) GetAllProjectOverviews ¶ added in v0.1.27
func (c *Cx1Client) GetAllProjectOverviews() ([]ProjectOverview, error)
Return overviews for all projects
func (*Cx1Client) GetAllProjectOverviewsFiltered ¶ added in v0.1.19
func (c *Cx1Client) GetAllProjectOverviewsFiltered(filter ProjectOverviewFilter) (uint64, []ProjectOverview, error)
Retrieves all projects matching the filter
func (*Cx1Client) GetAllProjects ¶ added in v0.0.84
Get all of the projects behind the scenes this will use the configured pagination (Get/SetPaginationSettings) behaves the same as GetProjects(# of projects in the environment)
func (*Cx1Client) GetAllProjectsFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetAllProjectsFiltered(filter ProjectFilter) (uint64, []Project, error)
Retrieves all projects matching the filter
func (*Cx1Client) GetAllResourcesAccessibleToGroupByID ¶ added in v0.1.28
func (c *Cx1Client) GetAllResourcesAccessibleToGroupByID(groupID string, types []string, includeImplied bool) ([]AccessibleResource, error)
Get all resources accessible to a group (IAM Phase1) type can be tenant, application, or project includeImplied:
if true, access to an application will return application+projects in app if false, will not list projects in the app (unless those are explicitly assigned)
func (*Cx1Client) GetAllResourcesAccessibleToUserByID ¶ added in v0.1.28
func (c *Cx1Client) GetAllResourcesAccessibleToUserByID(userID string, types []string, includeImplied bool) ([]AccessibleResource, error)
Get all resources accessible to a user (IAM Phase1) type can be tenant, application, or project includeImplied:
if true, access to an application will return application+projects in app if false, will not list projects in the app (unless those are explicitly assigned)
func (*Cx1Client) GetAllResultsChangeHistoryFiltered ¶ added in v0.1.32
func (c *Cx1Client) GetAllResultsChangeHistoryFiltered(filter ResultsChangeFilter) (uint64, []ResultsChangeHistory, error)
gets all of the results changes available matching a filter
func (*Cx1Client) GetAllRoleComposites ¶ added in v0.0.107
returns all sub-roles assigned to a specific composite role, including nested composites
func (*Cx1Client) GetAllSASTPresets ¶ added in v0.1.10
convenience
func (*Cx1Client) GetAllScanResultsByID ¶ added in v0.0.84
func (c *Cx1Client) GetAllScanResultsByID(scanID string) (ScanResultSet, error)
func (*Cx1Client) GetAllScanResultsFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetAllScanResultsFiltered(filter ScanResultsFilter) (uint64, ScanResultSet, error)
gets all of the results available matching a filter the counter returned represents the total number of results which were parsed this may not include some of the returned results depending on Cx1ClientGo support
func (*Cx1Client) GetAllScanSASTResultsByID ¶ added in v0.1.10
func (c *Cx1Client) GetAllScanSASTResultsByID(scanID string) ([]ScanSASTResult, error)
func (*Cx1Client) GetAllScanSASTResultsFiltered ¶ added in v0.1.10
func (c *Cx1Client) GetAllScanSASTResultsFiltered(filter ScanSASTResultsFilter) (uint64, []ScanSASTResult, error)
gets all of the results available matching a filter the counter returned represents the total number of results which were parsed this may not include some of the returned results depending on Cx1ClientGo support
func (*Cx1Client) GetAllScanSchedules ¶ added in v0.1.27
func (c *Cx1Client) GetAllScanSchedules() ([]ProjectScanSchedule, error)
Get all scan schedules - v3.44+
func (*Cx1Client) GetAllScanSchedulesFiltered ¶ added in v0.1.27
func (c *Cx1Client) GetAllScanSchedulesFiltered(filter ProjectScanScheduleFilter) (uint64, []ProjectScanSchedule, error)
Retrieves all projects matching the filter
func (*Cx1Client) GetAllScans ¶ added in v0.0.84
Return a list of all scans
func (*Cx1Client) GetAllScansFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetAllScansFiltered(filter ScanFilter) (uint64, []Scan, error)
Return all scans matching a filter
func (*Cx1Client) GetAllUserRoles ¶ added in v0.1.28
Get all roles for the user - those directly assigned, and those inherited from group membership & hierarchy Unlike GetUserRoles, this does not update the user.Roles list
func (*Cx1Client) GetAllUsers ¶ added in v0.0.84
func (*Cx1Client) GetAllUsersFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetAllUsersFiltered(filter UserFilter) (uint64, []User, error)
returns all users matching the filter
func (*Cx1Client) GetAnalyticsAllVulnerabilities ¶ added in v0.1.19
func (c *Cx1Client) GetAnalyticsAllVulnerabilities(limit uint64, offset uint64, filter AnalyticsFilter) ([]AnalyticsVulnerabilitiesStats, error)
func (*Cx1Client) GetAnalyticsFixedVulnerabilitiesBySeverityOvertime ¶ added in v0.1.10
func (c *Cx1Client) GetAnalyticsFixedVulnerabilitiesBySeverityOvertime(filter AnalyticsFilter) ([]AnalyticsOverTimeStats, error)
func (*Cx1Client) GetAnalyticsIDEOverTimeStats ¶ added in v0.1.19
func (c *Cx1Client) GetAnalyticsIDEOverTimeStats() ([]AnalyticsIDEOverTimeDistribution, error)
func (*Cx1Client) GetAnalyticsIDETotal ¶ added in v0.1.19
func (c *Cx1Client) GetAnalyticsIDETotal() ([]AnalyticsIDEStatEntry, error)
func (*Cx1Client) GetAnalyticsMeanTimeToResolution ¶ added in v0.1.10
func (c *Cx1Client) GetAnalyticsMeanTimeToResolution(filter AnalyticsFilter) (AnalyticsMeanTimeStats, error)
func (*Cx1Client) GetAnalyticsMostAgingVulnerabilities ¶ added in v0.1.10
func (c *Cx1Client) GetAnalyticsMostAgingVulnerabilities(limit uint64, filter AnalyticsFilter) ([]AnalyticsVulnerabilitiesStats, error)
func (*Cx1Client) GetAnalyticsMostCommonVulnerabilities ¶ added in v0.1.10
func (c *Cx1Client) GetAnalyticsMostCommonVulnerabilities(limit uint64, filter AnalyticsFilter) ([]AnalyticsVulnerabilitiesStats, error)
func (*Cx1Client) GetAnalyticsVulnerabilitiesByAgingTotal ¶ added in v0.1.19
func (c *Cx1Client) GetAnalyticsVulnerabilitiesByAgingTotal(filter AnalyticsFilter) ([]AnalyticsAgingStats, error)
func (*Cx1Client) GetAnalyticsVulnerabilitiesBySeverityAndStateTotal ¶ added in v0.1.10
func (c *Cx1Client) GetAnalyticsVulnerabilitiesBySeverityAndStateTotal(filter AnalyticsFilter) ([]AnalyticsSeverityAndStateStats, error)
func (*Cx1Client) GetAnalyticsVulnerabilitiesBySeverityOvertime ¶ added in v0.1.10
func (c *Cx1Client) GetAnalyticsVulnerabilitiesBySeverityOvertime(filter AnalyticsFilter) ([]AnalyticsOverTimeStats, error)
func (*Cx1Client) GetAnalyticsVulnerabilitiesBySeverityTotal ¶ added in v0.1.10
func (c *Cx1Client) GetAnalyticsVulnerabilitiesBySeverityTotal(filter AnalyticsFilter) (AnalyticsDistributionStats, error)
func (*Cx1Client) GetAnalyticsVulnerabilitiesByStateTotal ¶ added in v0.1.10
func (c *Cx1Client) GetAnalyticsVulnerabilitiesByStateTotal(filter AnalyticsFilter) (AnalyticsDistributionStats, error)
func (*Cx1Client) GetAnalyticsVulnerabilitiesByStatusTotal ¶ added in v0.1.10
func (c *Cx1Client) GetAnalyticsVulnerabilitiesByStatusTotal(filter AnalyticsFilter) (AnalyticsDistributionStats, error)
func (*Cx1Client) GetAppRoleByName ¶
func (*Cx1Client) GetAppRoles ¶
func (*Cx1Client) GetAppRolesByName ¶ added in v0.1.10
func (*Cx1Client) GetApplicationByID ¶ added in v0.0.70
func (c *Cx1Client) GetApplicationByID(id string) (Application, error)
Get a specific application by ID
func (*Cx1Client) GetApplicationByName ¶
func (c *Cx1Client) GetApplicationByName(name string) (Application, error)
returns the application matching exactly (case sensitive) the name
func (*Cx1Client) GetApplicationCount ¶
Get the number of applications
func (*Cx1Client) GetApplicationCountByName ¶
Get the number of applications with names containing this substring
func (*Cx1Client) GetApplicationCountFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetApplicationCountFiltered(filter ApplicationFilter) (uint64, error)
Get the count of applications matching the filter
func (*Cx1Client) GetApplicationOverviewCountFiltered ¶ added in v0.1.22
func (c *Cx1Client) GetApplicationOverviewCountFiltered(filter ApplicationOverviewFilter) (uint64, error)
func (*Cx1Client) GetApplicationOverviewsFiltered ¶ added in v0.1.22
func (c *Cx1Client) GetApplicationOverviewsFiltered(filter ApplicationOverviewFilter) (uint64, []ApplicationOverview, error)
Returns the total number of matching results plus an array of applications with one page of results (from filter.Offset to filter.Offset+filter.Limit)
func (*Cx1Client) GetApplications ¶
func (c *Cx1Client) GetApplications(count uint64) ([]Application, error)
Get the first count Applications uses the pagination behind the scenes
func (*Cx1Client) GetApplicationsByName ¶
func (c *Cx1Client) GetApplicationsByName(name string) ([]Application, error)
Get all applications matching 'name' As of 2024-10-17, this function no longer takes a specific limit as a parameter To set limits, offsets, and other parameters directly, use GetApplicationsFiltered
func (*Cx1Client) GetApplicationsFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetApplicationsFiltered(filter ApplicationFilter) (uint64, []Application, error)
Underlying function used by many GetApplications* calls Returns the number of applications matching the filter and the array of matching applications with one page (filter.Offset to filter.Offset+filter.Limit) of results
func (*Cx1Client) GetAuditIACQueriesByLevelID ¶ added in v0.1.10
func (c *Cx1Client) GetAuditIACQueriesByLevelID(auditSession *AuditSession, level, levelId string) (IACQueryCollection, error)
Retrieves the list of queries available for this audit session. Level and LevelID options are: QueryTypeProduct(), QueryTypeProduct() : same value for both when retrieving product-default queries QueryTypeTenant(), QueryTypeTenant() : same value for both when retrieving tenant-level queries QueryTypeProject(), project.ProjectID : when retrieving project-level queries (includes application-level queries if the project has an application associated)
The resulting array of queries should be merged into a QueryCollection object returned by the GetQueries function.
func (*Cx1Client) GetAuditIACQueryByID ¶ added in v0.1.10
func (c *Cx1Client) GetAuditIACQueryByID(auditSession *AuditSession, queryId string) (IACQuery, error)
func (*Cx1Client) GetAuditQueryTreeByLevelID ¶ added in v0.1.10
func (c *Cx1Client) GetAuditQueryTreeByLevelID(auditSession *AuditSession, level, levelId string) ([]AuditQueryTree, error)
Get the query tree for an audit session You probably don't need this and should use GetAuditSASTQueriesByLevelID or GetAuditIACQueriesByLevelID instead The tree is an internal structure converted to SAST/IAC query collections as appropriate
func (*Cx1Client) GetAuditSASTQueriesByLevelID ¶ added in v0.1.10
func (c *Cx1Client) GetAuditSASTQueriesByLevelID(auditSession *AuditSession, level, levelId string) (SASTQueryCollection, error)
Retrieves the list of queries available for this audit session. Level and LevelID options are: QueryTypeProduct(), QueryTypeProduct() : same value for both when retrieving product-default queries QueryTypeTenant(), QueryTypeTenant() : same value for both when retrieving tenant-level queries QueryTypeProject(), project.ProjectID : when retrieving project-level queries (includes application-level queries if the project has an application associated)
The resulting array of queries should be merged into a QueryCollection object returned by the GetQueries function.
func (*Cx1Client) GetAuditSASTQueryByKey ¶ added in v0.1.10
func (c *Cx1Client) GetAuditSASTQueryByKey(auditSession *AuditSession, key string) (SASTQuery, error)
func (*Cx1Client) GetAuditSession ¶ added in v0.1.40
func (c *Cx1Client) GetAuditSession(engine, language string) (AuditSession, error)
Create an audit session on the tenant-level eg: engine = "sast", language = "go" The session will expire unless you call AuditSessionKeepAlive periodically
func (*Cx1Client) GetAuditSessionByID ¶ added in v0.0.11
func (c *Cx1Client) GetAuditSessionByID(engine, projectId, scanId string) (AuditSession, error)
Get a new Audit session for a specific project and scan ID This will allow you to create Tenant-level queries, Project-level queries, and Application-level queries (if the project has an application associated) The session will expire unless you call AuditSessionKeepAlive periodically
func (*Cx1Client) GetAuthenticationProviderByAlias ¶ added in v0.0.54
func (c *Cx1Client) GetAuthenticationProviderByAlias(alias string) (AuthenticationProvider, error)
func (*Cx1Client) GetAuthenticationProviderMappers ¶ added in v0.0.54
func (c *Cx1Client) GetAuthenticationProviderMappers(provider AuthenticationProvider) ([]AuthenticationProviderMapper, error)
func (*Cx1Client) GetAuthenticationProviders ¶ added in v0.0.54
func (c *Cx1Client) GetAuthenticationProviders() ([]AuthenticationProvider, error)
func (*Cx1Client) GetAvailableGroups ¶ added in v0.1.22
func (c *Cx1Client) GetAvailableGroups(search string, projectId string, limit, offset uint64) ([]Group, error)
IAM phase2 - these endpoints are not finalized so these functions should not yet be used in production
func (*Cx1Client) GetBaseURL ¶ added in v0.1.10
func (*Cx1Client) GetClientByID ¶ added in v0.0.22
func (c *Cx1Client) GetClientByID(guid string) (OIDCClient, error)
Get details about a specific OIDC Client by GUID
func (*Cx1Client) GetClientByName ¶
func (c *Cx1Client) GetClientByName(clientName string) (OIDCClient, error)
Gets a specific OIDC client with the client id matching this name exactly
func (*Cx1Client) GetClientScopeByName ¶ added in v0.0.15
func (c *Cx1Client) GetClientScopeByName(name string) (OIDCClientScope, error)
func (*Cx1Client) GetClientScopes ¶ added in v0.0.15
func (c *Cx1Client) GetClientScopes() ([]OIDCClientScope, error)
func (*Cx1Client) GetClientSecret ¶ added in v0.0.83
func (c *Cx1Client) GetClientSecret(client *OIDCClient) (string, error)
Gets the secret for an OIDC Client Only available to the creator of the OIDC Client
func (*Cx1Client) GetClientVars ¶ added in v0.0.19
func (c *Cx1Client) GetClientVars() ClientVars
func (*Cx1Client) GetClients ¶
func (c *Cx1Client) GetClients() ([]OIDCClient, error)
Get all OIDC Clients in the system
func (*Cx1Client) GetClientsByName ¶ added in v0.1.10
func (c *Cx1Client) GetClientsByName(clientName string) ([]OIDCClient, error)
Get all OIDC Clients matching a string
func (*Cx1Client) GetClientsFiltered ¶ added in v0.1.33
func (c *Cx1Client) GetClientsFiltered(filter OIDCClientFilter) ([]OIDCClient, error)
func (*Cx1Client) GetConfigurationByKey ¶ added in v0.1.35
func (c *Cx1Client) GetConfigurationByKey(config *[]ConfigurationSetting, configKey string) *ConfigurationSetting
Get the configuration for a specific key from a list of configuration settings You can fetch the list of settings via Get(Tenant/Project/Scan)Configuration functions
func (*Cx1Client) GetConfigurationByName ¶ added in v0.0.39
func (c *Cx1Client) GetConfigurationByName(config *[]ConfigurationSetting, configKey string) *ConfigurationSetting
the ByName version of this function will be deprecated in favor of the correctly-named ByKey version
func (*Cx1Client) GetCurrentClient ¶ added in v0.0.110
func (c *Cx1Client) GetCurrentClient() (OIDCClient, error)
func (*Cx1Client) GetCurrentUser ¶
func (*Cx1Client) GetCurrentUsername ¶ added in v0.1.10
func (*Cx1Client) GetCustomResultStates ¶ added in v0.1.11
func (c *Cx1Client) GetCustomResultStates() ([]ResultState, error)
func (*Cx1Client) GetCx1QueryFromSAST ¶ added in v0.0.67
func (*Cx1Client) GetCxLinkCountFiltered ¶ added in v0.1.26
func (c *Cx1Client) GetCxLinkCountFiltered(filter CxLinkFilter) (uint64, error)
func (*Cx1Client) GetCxLinks ¶ added in v0.1.26
func (*Cx1Client) GetCxLinksFiltered ¶ added in v0.1.26
func (c *Cx1Client) GetCxLinksFiltered(filter CxLinkFilter) (uint64, []CxLink, error)
Underlying function used by many GetCxLink* calls Returns the total number of matching results plus an array of cxlinks with one page of results (from filter.Offset to filter.Offset+filter.Limit)
func (*Cx1Client) GetDefaultClientVars ¶ added in v0.1.35
func (c *Cx1Client) GetDefaultClientVars() ClientVars
func (*Cx1Client) GetEntitiesAccessToResourceByID ¶ added in v0.0.15
func (c *Cx1Client) GetEntitiesAccessToResourceByID(resourceId, resourceType string) ([]AccessAssignment, error)
Get a list of entities that have been granted direct access to a specific resource As of Nov '25 this will not consider implied permissions eg: user in group + group has access = user has access but no access assignment
func (*Cx1Client) GetExportStatusByID ¶ added in v0.1.25
func (c *Cx1Client) GetExportStatusByID(exportID string) (ExportStatus, error)
func (*Cx1Client) GetGroupByID ¶
this will return the specific group matching this ID
func (*Cx1Client) GetGroupByName ¶
will return the first group matching 'groupname' the group is not "filled": the subgroups array will be empty (use FillGroup/GetGroupChildren)
func (*Cx1Client) GetGroupByPath ¶ added in v0.0.62
this function returns a group matching a path, however as of keycloak 23.0.7 this endpoint is missing the subGroupCount field, which other parts of cx1clientgo rely on, so this function will automatically trigger a GetGroupByID call
func (*Cx1Client) GetGroupChildren ¶ added in v0.0.82
this function is for CxOne v3.20+ gets and fills the group's immediate children (subgroups) does not include sub-children
func (*Cx1Client) GetGroupChildrenByID ¶ added in v0.0.82
this function is for CxOne v3.20+ Used by GetGroupChildren
func (*Cx1Client) GetGroupCount ¶ added in v0.0.84
func (*Cx1Client) GetGroupInheritedRoles ¶ added in v0.1.28
this returns all roles a user would inherit from membership in this group this includes the roles assigned directly to the group (group.RealmRoles & group.ClientRoles) as well as the roles from up the group hierarchy this function expects a group retrieved by a GetGroup* call, user-groups returned from a GetUser* call do not include role information.
func (*Cx1Client) GetGroupMembers ¶ added in v0.0.62
func (*Cx1Client) GetGroupMembersByID ¶ added in v0.0.62
func (*Cx1Client) GetGroupMembersFiltered ¶ added in v0.1.10
func (c *Cx1Client) GetGroupMembersFiltered(groupId string, filter GroupMembersFilter) ([]User, error)
func (*Cx1Client) GetGroupPIPByName ¶
func (*Cx1Client) GetGroupsByName ¶
this function returns all top-level groups matching the search string, or if a sub-group matches the search, it will return the parent group and only the matching subgroups the returned groups are not "filled": they will not include subgroups that do not match the search term
func (*Cx1Client) GetGroupsFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetGroupsFiltered(filter GroupFilter, fill bool) ([]Group, error)
Underlying function used by many GetGroups* calls Returns the number of applications matching the filter and the array of matching applications
func (*Cx1Client) GetGroupsPIP ¶
func (*Cx1Client) GetHeaders ¶ added in v0.1.44
func (*Cx1Client) GetIACCollectionAuditMetadata ¶ added in v0.1.10
func (c *Cx1Client) GetIACCollectionAuditMetadata(auditSession *AuditSession, collection *IACQueryCollection, customOnly bool) error
This function will fill the metadata (severity etc) for all queries in the collection
func (*Cx1Client) GetIACPresetByID ¶ added in v0.1.10
Includes the contents (query families/queries) of the preset as well
func (*Cx1Client) GetIACPresetByName ¶ added in v0.1.10
Does not include the contents of the preset (query families etc) - use GetPresetContents to fill or GetPresetByID
func (*Cx1Client) GetIACPresetCount ¶ added in v0.1.10
func (*Cx1Client) GetIACPresetQueries ¶ added in v0.1.10
func (c *Cx1Client) GetIACPresetQueries() (IACQueryCollection, error)
func (*Cx1Client) GetIACPresets ¶ added in v0.1.10
Presets do not include the contents of the preset (query families etc) - use Get*PresetContents to fill or Get*PresetByID
func (*Cx1Client) GetIACQueryCollection ¶ added in v0.1.10
func (c *Cx1Client) GetIACQueryCollection() (IACQueryCollection, error)
func (*Cx1Client) GetIACQueryFamilies ¶ added in v0.1.10
func (*Cx1Client) GetIACQueryFamilyContents ¶ added in v0.1.10
func (c *Cx1Client) GetIACQueryFamilyContents(family string) (IACQueryCollection, error)
func (*Cx1Client) GetIACResultsPredicatesByID ¶ added in v0.1.10
func (c *Cx1Client) GetIACResultsPredicatesByID(SimilarityID string, ProjectID string) ([]IACResultsPredicates, error)
func (*Cx1Client) GetIAMRoleByName ¶
func (*Cx1Client) GetIAMRoles ¶
func (*Cx1Client) GetIAMRolesByName ¶ added in v0.1.10
func (*Cx1Client) GetImportByID ¶ added in v0.0.14
func (c *Cx1Client) GetImportByID(importID string) (DataImport, error)
func (*Cx1Client) GetImportLogsByID ¶ added in v0.0.14
func (*Cx1Client) GetImports ¶ added in v0.0.14
func (c *Cx1Client) GetImports() ([]DataImport, error)
func (*Cx1Client) GetKICSResultsPredicatesByID ¶ added in v0.0.37
func (c *Cx1Client) GetKICSResultsPredicatesByID(SimilarityID string, ProjectID string) ([]IACResultsPredicates, error)
func (*Cx1Client) GetLastSASTResultsPredicateByID ¶ added in v0.1.10
func (c *Cx1Client) GetLastSASTResultsPredicateByID(SimilarityID string, ProjectID, ScanID string) (SASTResultsPredicates, error)
func (*Cx1Client) GetLastScanByID ¶ added in v0.1.27
Get the most recent scan for a specific project
func (*Cx1Client) GetLastScansByEngineFiltered ¶ added in v0.1.10
func (c *Cx1Client) GetLastScansByEngineFiltered(engine string, limit uint64, filter ScanFilter) ([]Scan, error)
This function returns the last scans matching the filter and also having a scan by a specific engine
func (*Cx1Client) GetLastScansByID ¶
Return a list of the most recent scans for a specific project
func (*Cx1Client) GetLastScansByIDFiltered ¶ added in v0.0.13
func (c *Cx1Client) GetLastScansByIDFiltered(projectID string, filter ScanFilter) ([]Scan, error)
function will be deprecated, use Get*ScansFiltered
func (*Cx1Client) GetLastScansByStatus ¶
Return the last scan filtered by status Statuses are: Completed, Failed, Canceled, Partial, Queued, Running Status also available in the ScanStatus enum
func (*Cx1Client) GetLastScansByStatusAndID ¶
func (c *Cx1Client) GetLastScansByStatusAndID(projectID string, limit uint64, status []string) ([]Scan, error)
Returns a list of scans for a specific project, filtered by status, returning up to limit items
func (*Cx1Client) GetLastScansFiltered ¶ added in v0.0.30
func (c *Cx1Client) GetLastScansFiltered(filter ScanFilter) ([]Scan, error)
Returns a list of all scans matching the supplied filter, ordered most-recent first
func (*Cx1Client) GetLicense ¶ added in v0.0.40
func (c *Cx1Client) GetLicense() ASTLicense
func (*Cx1Client) GetMyGroups ¶ added in v0.1.22
func (c *Cx1Client) GetMyGroups(search string, subgroups bool, limit, offset uint64) ([]Group, error)
IAM phase2 - these endpoints are not finalized so these functions should not yet be used in production
func (*Cx1Client) GetOrCreateApplicationByName ¶
func (c *Cx1Client) GetOrCreateApplicationByName(name string) (Application, error)
Gets an application by name, and if it doesn't exist it is created
func (*Cx1Client) GetOrCreateGroupByName ¶
convenience
func (*Cx1Client) GetOrCreateProjectByName ¶
func (*Cx1Client) GetOrCreateProjectInApplicationByName ¶ added in v0.0.31
func (c *Cx1Client) GetOrCreateProjectInApplicationByName(projectName, applicationName string) (Project, Application, error)
Find a specific project by name. Should be in a specific application by name. If the project doesn't exist, it is created
func (*Cx1Client) GetPaginationDefaultsMultiTenant ¶ added in v0.0.98
func (c *Cx1Client) GetPaginationDefaultsMultiTenant() PaginationSettings
func (*Cx1Client) GetPaginationDefaultsSingleTenant ¶ added in v0.0.98
func (c *Cx1Client) GetPaginationDefaultsSingleTenant() PaginationSettings
func (*Cx1Client) GetPaginationSettings ¶ added in v0.0.84
func (c *Cx1Client) GetPaginationSettings() PaginationSettings
Retrieve the configured "limit" values for paging when retrieving various object types Two default settings are available via GetPaginationDefaults(SingleTenant|MultiTenant)
func (*Cx1Client) GetPoliciesFiltered ¶ added in v0.1.30
func (c *Cx1Client) GetPoliciesFiltered(filter PolicyFilter) (uint64, []Policy, error)
Underlying function used by many GetPolicy* calls Returns the total number of matching results plus an array of policies with one page of results (from filter.Page*filter.Limit to (filter.Page+1)*filter.Limit)
func (*Cx1Client) GetPolicyCountFiltered ¶ added in v0.1.30
func (c *Cx1Client) GetPolicyCountFiltered(filter PolicyFilter) (uint64, error)
func (*Cx1Client) GetPolicyViolationCountFiltered ¶ added in v0.1.30
func (c *Cx1Client) GetPolicyViolationCountFiltered(filter PolicyViolationFilter) (uint64, error)
func (*Cx1Client) GetPolicyViolationDetailsByID ¶ added in v0.1.30
func (c *Cx1Client) GetPolicyViolationDetailsByID(projectId string, scanId string) (PolicyViolationDetails, error)
func (*Cx1Client) GetPolicyViolationsFiltered ¶ added in v0.1.30
func (c *Cx1Client) GetPolicyViolationsFiltered(filter PolicyViolationFilter) (uint64, []PolicyViolation, error)
Underlying function used by many GetPolicyViolation* calls Returns the total number of matching results plus an array of PolicyViolations with one page of results (from filter.Page*filter.Limit to (filter.Page+1)*filter.Limit)
func (*Cx1Client) GetPresetByID ¶
func (*Cx1Client) GetPresetByID_v330 ¶ added in v0.1.10
func (c *Cx1Client) GetPresetByID_v330(id uint64) (Preset_v330, error)
func (*Cx1Client) GetPresetByName ¶
func (*Cx1Client) GetPresetByName_v330 ¶ added in v0.1.10
func (c *Cx1Client) GetPresetByName_v330(name string) (Preset_v330, error)
func (*Cx1Client) GetPresetContents ¶
func (*Cx1Client) GetPresetContents_v330 ¶ added in v0.1.10
func (c *Cx1Client) GetPresetContents_v330(p *Preset_v330, qc *SASTQueryCollection) error
func (*Cx1Client) GetPresetCount ¶ added in v0.0.10
func (*Cx1Client) GetPresetCount_v330 ¶ added in v0.1.10
func (*Cx1Client) GetPresetQueries_v330 ¶ added in v0.1.10
func (c *Cx1Client) GetPresetQueries_v330() (SASTQueryCollection, error)
func (*Cx1Client) GetPresets ¶
func (*Cx1Client) GetPresets_v330 ¶ added in v0.1.10
func (c *Cx1Client) GetPresets_v330(count uint64) ([]Preset_v330, error)
func (*Cx1Client) GetProjectBranchesByID ¶ added in v0.0.80
retrieves all branches for a project
func (*Cx1Client) GetProjectBranchesFiltered ¶ added in v0.0.80
func (c *Cx1Client) GetProjectBranchesFiltered(filter ProjectBranchFilter) ([]string, error)
retrieves a page (filter.Offset to filter.Offset+filter.Limit) of branches for a project
func (*Cx1Client) GetProjectByID ¶
Get a specific project by ID
func (*Cx1Client) GetProjectByName ¶
case-sensitive exact match for a project name
func (*Cx1Client) GetProjectConfiguration ¶
Get the project's configuration and update the project.Configuration field
func (*Cx1Client) GetProjectConfigurationByID ¶
func (c *Cx1Client) GetProjectConfigurationByID(projectID string) ([]ConfigurationSetting, error)
return the configuration settings for scans set on the project level this will list default configurations like presets, incremental scan settings etc if set
func (*Cx1Client) GetProjectCount ¶
Get the count of all projects in the system
func (*Cx1Client) GetProjectCountByName ¶
returns the number of projects with names matching a search string 'name'
func (*Cx1Client) GetProjectCountFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetProjectCountFiltered(filter ProjectFilter) (uint64, error)
Get the count of all projects matching the filter
func (*Cx1Client) GetProjectOverviewCountFiltered ¶ added in v0.1.19
func (c *Cx1Client) GetProjectOverviewCountFiltered(filter ProjectOverviewFilter) (uint64, error)
Get the number of projects/project overviews matching a filter
func (*Cx1Client) GetProjectOverviewsFiltered ¶ added in v0.1.19
func (c *Cx1Client) GetProjectOverviewsFiltered(filter ProjectOverviewFilter) (uint64, []ProjectOverview, error)
Returns the total number of matching results plus an array of projects with one page of results (from filter.Offset to filter.Offset+filter.Limit)
func (*Cx1Client) GetProjects ¶
Get up to count # of projects behind the scenes this will use the configured pagination (Get/SetPaginationSettings)
func (*Cx1Client) GetProjectsByName ¶
Get all projects with names matching the search 'name' As of 2024-10-17 this function no longer takes a specific limit as a parameter To set limits, offsets, and other parameters directly, use GetProjectsFiltered
func (*Cx1Client) GetProjectsByNameAndGroupID ¶
func (c *Cx1Client) GetProjectsByNameAndGroupID(projectName string, groupID string) ([]Project, error)
Get all projects in the group 'groupID' with names matching the search 'name'
func (*Cx1Client) GetProjectsFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetProjectsFiltered(filter ProjectFilter) (uint64, []Project, error)
Underlying function used by many GetProject* calls Returns the total number of matching results plus an array of projects with one page of results (from filter.Offset to filter.Offset+filter.Limit)
func (*Cx1Client) GetQueriesByLevelID ¶ added in v0.0.12
func (c *Cx1Client) GetQueriesByLevelID(level, levelId string) (SASTQueryCollection, error)
This function uses the cx-audit/queries endpoint, which will at some point be deprecated.
func (*Cx1Client) GetQueriesByLevelID_v310 ¶ added in v0.0.66
func (c *Cx1Client) GetQueriesByLevelID_v310(level, levelId string) ([]AuditQuery_v310, error)
func (*Cx1Client) GetQueries_v310 ¶ added in v0.0.66
func (c *Cx1Client) GetQueries_v310() (SASTQueryCollection, error)
func (*Cx1Client) GetQueryByName_v310 ¶ added in v0.0.66
func (c *Cx1Client) GetQueryByName_v310(level, levelid, language, group, query string) (AuditQuery_v310, error)
func (*Cx1Client) GetQueryFamilies ¶ added in v0.1.10
func (*Cx1Client) GetQueryMappings ¶ added in v0.0.45
func (*Cx1Client) GetReportStatusByID ¶
func (c *Cx1Client) GetReportStatusByID(reportID string) (ReportStatus, error)
func (*Cx1Client) GetResourcesAccessibleToEntityByID ¶ added in v0.0.16
func (c *Cx1Client) GetResourcesAccessibleToEntityByID(entityId, entityType string, resourceTypes []string) ([]AccessAssignment, error)
Get a list of resources to which this entity has been granted direct access As of Nov '25 this will not consider implied permissions eg: user in group + group has access = user has access but no access assignment
func (*Cx1Client) GetResultSeverities ¶ added in v0.0.96
func (*Cx1Client) GetResultStates ¶ added in v0.0.96
func (*Cx1Client) GetResultStatuses ¶ added in v0.0.96
func (*Cx1Client) GetResultsChangeHistoryFiltered ¶ added in v0.1.32
func (c *Cx1Client) GetResultsChangeHistoryFiltered(filter ResultsChangeFilter) (uint64, []ResultsChangeHistory, error)
results bulk retrieval - Changelog
func (*Cx1Client) GetResultsChangeHistoryForProjectByID ¶ added in v0.1.32
func (c *Cx1Client) GetResultsChangeHistoryForProjectByID(projectID string) ([]ResultsChangeHistory, error)
returns the full history of results changes for a specific project
func (*Cx1Client) GetResultsChangeHistoryForScanByID ¶ added in v0.1.32
func (c *Cx1Client) GetResultsChangeHistoryForScanByID(scanID string) ([]ResultsChangeHistory, error)
returns the full history of results changes for a specific scan
func (*Cx1Client) GetResultsChangeHistoryForSimilarityID ¶ added in v0.1.32
func (c *Cx1Client) GetResultsChangeHistoryForSimilarityID(similarityID string) ([]ResultsChangeHistory, error)
returns the full history of results changes for a specific similarityID
func (*Cx1Client) GetRetries ¶ added in v0.1.10
func (*Cx1Client) GetRoleByClientIDAndName ¶
func (*Cx1Client) GetRoleByID ¶
roles are returned without sub-roles, use GetRoleComposites(&role) to fill
func (*Cx1Client) GetRoleByName ¶
roles are returned without sub-roles, use GetRoleComposites(&role) to fill
func (*Cx1Client) GetRoleComposites ¶
returns the sub-roles assigned to a specific composite role and also fills role.SubRoles
func (*Cx1Client) GetRoles ¶
convenience function to get both KeyCloak (system) roles plus the AST-APP-specific roles roles are returned without sub-roles, use GetRoleComposites(&role) to fill
func (*Cx1Client) GetRolesByClientID ¶
func (*Cx1Client) GetRolesByClientIDAndName ¶ added in v0.1.10
func (*Cx1Client) GetRolesByName ¶ added in v0.1.10
roles are returned without sub-roles, use GetRoleComposites(&role) to fill
func (*Cx1Client) GetSASTPresetByID ¶ added in v0.1.10
Includes the contents (query families/queries) of the preset as well
func (*Cx1Client) GetSASTPresetByName ¶ added in v0.1.10
Does not include the contents of the preset (query families etc) - use GetPresetContents to fill or GetPresetByID
func (*Cx1Client) GetSASTPresetCount ¶ added in v0.1.10
func (*Cx1Client) GetSASTPresetQueries ¶ added in v0.1.10
func (c *Cx1Client) GetSASTPresetQueries() (SASTQueryCollection, error)
this will return a list of queries that can be added to a preset, meaning only executable queries
func (*Cx1Client) GetSASTPresets ¶ added in v0.1.10
Presets do not include the contents of the preset (query families etc) - use GetPresetContents to fill or GetPresetByID
func (*Cx1Client) GetSASTQueryCollection ¶ added in v0.1.10
func (c *Cx1Client) GetSASTQueryCollection() (SASTQueryCollection, error)
func (*Cx1Client) GetSASTQueryFamilies ¶ added in v0.1.10
func (*Cx1Client) GetSASTQueryFamilyContents ¶ added in v0.1.10
func (c *Cx1Client) GetSASTQueryFamilyContents(family string) (SASTQueryCollection, error)
func (*Cx1Client) GetSASTResultsPredicatesByID ¶ added in v0.0.37
func (c *Cx1Client) GetSASTResultsPredicatesByID(SimilarityID string, ProjectID, ScanID string) ([]SASTResultsPredicates, error)
func (*Cx1Client) GetScanByID ¶
Get the details of a scan by scan ID
func (*Cx1Client) GetScanConfigurationByID ¶ added in v0.0.39
func (c *Cx1Client) GetScanConfigurationByID(projectID, scanID string) ([]ConfigurationSetting, error)
return the configuration settings for a scan in a specific project this will list configurations like presets, incremental scan settings etc
func (*Cx1Client) GetScanCount ¶ added in v0.0.84
returns the number of scans in the system
func (*Cx1Client) GetScanCountFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetScanCountFiltered(filter ScanFilter) (uint64, error)
returns the number of scans in the system matching a filter
func (*Cx1Client) GetScanLogsByID ¶
retieves the logs from a scan by ID, currently engine must be "sast"
func (*Cx1Client) GetScanMetadataByID ¶
func (c *Cx1Client) GetScanMetadataByID(scanID string) (ScanMetadata, error)
returns the metadata for a scan
func (*Cx1Client) GetScanMetricsByID ¶ added in v0.0.93
func (c *Cx1Client) GetScanMetricsByID(scanID string) (ScanMetrics, error)
returns the metrics for a scan
func (*Cx1Client) GetScanResultsByID ¶
func (c *Cx1Client) GetScanResultsByID(scanID string, limit uint64) (ScanResultSet, error)
func (*Cx1Client) GetScanResultsCountByID ¶
func (*Cx1Client) GetScanResultsFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetScanResultsFiltered(filter ScanResultsFilter) (uint64, ScanResultSet, error)
returns one 'page' of scan results matching the filter returns items (filter.Offset*filter.Limit) to (filter.Offset + 1)*filter.Limit returns the count of items retrieved, however some items may not be parsed into the result set depending on support in cx1clientgo
func (*Cx1Client) GetScanSASTAggregateSummaryByID ¶ added in v0.0.85
func (c *Cx1Client) GetScanSASTAggregateSummaryByID(scanId string) ([]SASTAggregateSummary, error)
returns the SAST Aggregate Summaries for a specific scan by default this function will group the results by Language Use GetAllScanSASTAggregateSummaryFiltered with a custom filter for different groupings and filters
func (*Cx1Client) GetScanSASTAggregateSummaryFiltered ¶ added in v0.0.85
func (c *Cx1Client) GetScanSASTAggregateSummaryFiltered(filter SASTAggregateSummaryFilter) (uint64, []SASTAggregateSummary, error)
returns one page of summaries, from filter.Offset to filter.Offset+filter.Limit At least that's how it should work, but it seems to ignore paging and just return everything regardless?
func (*Cx1Client) GetScanSASTResultSummary ¶ added in v0.0.37
func (c *Cx1Client) GetScanSASTResultSummary(results *ScanResultSet) ScanResultSummary
func (*Cx1Client) GetScanSASTResultsByID ¶ added in v0.1.10
func (c *Cx1Client) GetScanSASTResultsByID(scanID string, limit uint64) ([]ScanSASTResult, error)
func (*Cx1Client) GetScanSASTResultsCountByID ¶ added in v0.1.10
func (*Cx1Client) GetScanSASTResultsFiltered ¶ added in v0.1.10
func (c *Cx1Client) GetScanSASTResultsFiltered(filter ScanSASTResultsFilter) (uint64, []ScanSASTResult, error)
returns one 'page' of a scan's SAST results matching the filter returns items (filter.Offset*filter.Limit) to (filter.Offset + 1)*filter.Limit
func (*Cx1Client) GetScanScheduleCountFiltered ¶ added in v0.1.27
func (c *Cx1Client) GetScanScheduleCountFiltered(filter ProjectScanScheduleFilter) (uint64, error)
func (*Cx1Client) GetScanSchedulesByID ¶ added in v0.0.99
func (c *Cx1Client) GetScanSchedulesByID(projectId string) ([]ProjectScanSchedule, error)
Get scan schedules for a project
func (*Cx1Client) GetScanSchedulesFiltered ¶ added in v0.1.27
func (c *Cx1Client) GetScanSchedulesFiltered(filter ProjectScanScheduleFilter) (uint64, []ProjectScanSchedule, error)
Returns the total number of matching results plus an array of schedules with one page of results (from filter.Offset to filter.Offset+filter.Limit)
func (*Cx1Client) GetScanSourcesByID ¶ added in v0.0.91
retrieves the source code used to run a scan. the source code is in a zip archive
func (*Cx1Client) GetScanSummariesByID ¶ added in v0.0.49
func (c *Cx1Client) GetScanSummariesByID(scanIDs []string) ([]ScanSummary, error)
Returns the summary for multiple scans' results, by scan id
func (*Cx1Client) GetScanSummariesFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetScanSummariesFiltered(filter ScanSummaryFilter) ([]ScanSummary, error)
Return a list of scan summaries for scans matching the filter
func (*Cx1Client) GetScanSummaryByID ¶
func (c *Cx1Client) GetScanSummaryByID(scanID string) (ScanSummary, error)
Returns the summary for a scan's results, by scan id
func (*Cx1Client) GetScanWorkflowByID ¶ added in v0.0.11
func (c *Cx1Client) GetScanWorkflowByID(scanID string) ([]WorkflowLog, error)
returns the workflow for a scan by ID this shows the steps in the scan flow from when the scan was uploaded until it was complete
func (*Cx1Client) GetScansByProjectIDAndBranch ¶ added in v0.0.80
Return a list of all scans for a specific project by ID, filtered by branch
func (*Cx1Client) GetScansByStatus ¶ added in v0.0.49
Get a list of all scans filtered by status
func (*Cx1Client) GetScansFiltered ¶ added in v0.0.49
func (c *Cx1Client) GetScansFiltered(filter ScanFilter) (uint64, []Scan, error)
returns the number of scans matching the filter and an array of those scans returns one page of data (from filter.Offset to filter.Offset+filter.Limit)
func (*Cx1Client) GetScansSummary ¶ added in v0.0.48
func (c *Cx1Client) GetScansSummary() (ScanStatusSummary, error)
Returns a summary (count) of all scans in the tenant
func (*Cx1Client) GetServiceAccountByID ¶ added in v0.0.15
Retrieve the user account behind the OIDC Client The user account stores the roles, group access, and other mappings
func (*Cx1Client) GetSeverity ¶ added in v0.0.66
func (*Cx1Client) GetSeverityID ¶ added in v0.0.12
convenience
func (*Cx1Client) GetTenantConfiguration ¶ added in v0.1.35
func (c *Cx1Client) GetTenantConfiguration() ([]ConfigurationSetting, error)
return the configuration settings for scans set on the tenant level this will list default configurations like presets, incremental scan settings etc if set
func (*Cx1Client) GetTenantID ¶
func (*Cx1Client) GetTenantName ¶ added in v0.0.27
func (*Cx1Client) GetTenantOwner ¶ added in v0.0.55
func (c *Cx1Client) GetTenantOwner() (TenantOwner, error)
Check which user is set as the tenant owner
func (*Cx1Client) GetUploadURL ¶
Retrieve a URL to which data can be uploaded. This is required when uploading a zip file for a scan and when uploading SAST exports for import.
func (*Cx1Client) GetUserAgent ¶ added in v0.0.80
func (*Cx1Client) GetUserAssignedRoles ¶ added in v0.1.28
this returns the roles that are directly assigned to the user does not include roles inherited from group membership
func (*Cx1Client) GetUserByUserName ¶
func (*Cx1Client) GetUserCount ¶ added in v0.0.84
func (*Cx1Client) GetUserCountFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetUserCountFiltered(filter UserFilter) (uint64, error)
func (*Cx1Client) GetUserInheritedRoles ¶ added in v0.1.28
this returns the roles inherited from groups to which the user belongs
func (*Cx1Client) GetUserRoles ¶
this function was ambiguous (returned only directly-assigned roles) now you can use GetUserAssignedRoles (roles assigned directly to user), GetUserInheritedRoles (roles inherited from group membership) or GetAllUserRoles (GetUserAssignedRoles + GetUserInheritedRoles)
func (*Cx1Client) GetUsersByUserName ¶ added in v0.0.54
func (*Cx1Client) GetUsersFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetUsersFiltered(filter UserFilter) ([]User, error)
Underlying function used by many GetUsers* calls Returns the number of applications matching the filter and the array of matching applications
func (*Cx1Client) GetVersion ¶ added in v0.0.55
func (c *Cx1Client) GetVersion() (VersionInfo, error)
Retrieve the version strings for various system components
func (*Cx1Client) GetXApplicationOverviewsFiltered ¶ added in v0.1.22
func (c *Cx1Client) GetXApplicationOverviewsFiltered(filter ApplicationOverviewFilter, count uint64) (uint64, []ApplicationOverview, error)
Retrieves the top 'count' applications matching the filter
func (*Cx1Client) GetXApplicationsFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetXApplicationsFiltered(filter ApplicationFilter, count uint64) (uint64, []Application, error)
retrieves the first X applications matching the filter using pagination set via filter.Limit or Get/SetPaginationSettings
func (*Cx1Client) GetXClientsFiltered ¶ added in v0.1.33
func (c *Cx1Client) GetXClientsFiltered(filter OIDCClientFilter, count uint64) (uint64, []OIDCClient, error)
func (*Cx1Client) GetXCxLinksFiltered ¶ added in v0.1.26
func (c *Cx1Client) GetXCxLinksFiltered(filter CxLinkFilter, count uint64) (uint64, []CxLink, error)
Retrieves the top 'count' cxlinks matching the filter
func (*Cx1Client) GetXPoliciesFiltered ¶ added in v0.1.30
func (c *Cx1Client) GetXPoliciesFiltered(filter PolicyFilter, count uint64) (uint64, []Policy, error)
Retrieves the top 'count' policies matching the filter
func (*Cx1Client) GetXPolicyViolationsFiltered ¶ added in v0.1.30
func (c *Cx1Client) GetXPolicyViolationsFiltered(filter PolicyViolationFilter, count uint64) (uint64, []PolicyViolation, error)
Retrieves the top 'count' PolicyViolations matching the filter
func (*Cx1Client) GetXProjectBranchesFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetXProjectBranchesFiltered(filter ProjectBranchFilter, count uint64) ([]string, error)
retrieves the first X of a project's branches matching a filter
func (*Cx1Client) GetXProjectOverviewsFiltered ¶ added in v0.1.19
func (c *Cx1Client) GetXProjectOverviewsFiltered(filter ProjectOverviewFilter, count uint64) (uint64, []ProjectOverview, error)
Retrieves the top 'count' projects matching the filter
func (*Cx1Client) GetXProjectsFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetXProjectsFiltered(filter ProjectFilter, count uint64) (uint64, []Project, error)
Retrieves the top 'count' projects matching the filter
func (*Cx1Client) GetXResultsChangeHistoryFiltered ¶ added in v0.1.32
func (c *Cx1Client) GetXResultsChangeHistoryFiltered(filter ResultsChangeFilter, desiredcount uint64) (uint64, []ResultsChangeHistory, error)
will return at least X resultschanges matching the filter May return more due to paging eg: requesting 101 with a 100-item page can return 200 results
func (*Cx1Client) GetXScanResultsFiltered ¶ added in v0.0.84
func (c *Cx1Client) GetXScanResultsFiltered(filter ScanResultsFilter, desiredcount uint64) (uint64, ScanResultSet, error)
will return at least X results matching the filter May return more due to paging eg: requesting 101 with a 100-item page can return 200 results
func (*Cx1Client) GetXScanSASTResultsFiltered ¶ added in v0.1.10
func (c *Cx1Client) GetXScanSASTResultsFiltered(filter ScanSASTResultsFilter, desiredcount uint64) (uint64, []ScanSASTResult, error)
will return at least X results matching the filter May return more due to paging eg: requesting 101 with a 100-item page can return 200 results
func (*Cx1Client) GetXScanSchedulesFiltered ¶ added in v0.1.27
func (c *Cx1Client) GetXScanSchedulesFiltered(filter ProjectScanScheduleFilter, count uint64) (uint64, []ProjectScanSchedule, error)
Retrieves the top 'count' projects matching the filter
func (*Cx1Client) GetXScansFiltered ¶ added in v0.0.84
Return x scans matching a filter
func (*Cx1Client) GetXUsersFiltered ¶ added in v0.0.84
returns first X users matching the filter
func (*Cx1Client) ImportPollingByID ¶ added in v0.0.14
func (*Cx1Client) ImportPollingByIDWithTimeout ¶ added in v0.0.25
func (*Cx1Client) InitializeClient ¶ added in v0.0.18
func (*Cx1Client) IsEngineAllowed ¶ added in v0.0.40
Check if the license allows a specific engine: SAST, SCA, IAC/KICS, Containers
func (*Cx1Client) MoveProjectBetweenApplications ¶ added in v0.1.17
func (c *Cx1Client) MoveProjectBetweenApplications(project *Project, sourceApplicationIDs, destinationApplicationIDs []string) error
Moves a project from one application to another in one operation This is necessary for limited-permission users with application-based access assignments
func (*Cx1Client) PatchApplication ¶ added in v0.1.20
func (c *Cx1Client) PatchApplication(application *Application, update ApplicationPatch) error
This function patches a application, changing only the fields supplied to the function. The application behind the supplied pointer is not changed For CheckmarxOne v3.41+
func (*Cx1Client) PatchApplicationByID ¶ added in v0.1.20
func (c *Cx1Client) PatchApplicationByID(applicationId string, update ApplicationPatch) error
This function patches a application, changing only the fields supplied to the function. For CheckmarxOne v3.41+
func (*Cx1Client) PatchProject ¶ added in v0.1.20
func (c *Cx1Client) PatchProject(project *Project, update ProjectPatch) error
This function patches a project, changing only the fields supplied to the function. The project behind the supplied pointer is not changed For CheckmarxOne v3.41+
func (*Cx1Client) PatchProjectByID ¶ added in v0.1.20
func (c *Cx1Client) PatchProjectByID(projectId string, update ProjectPatch) error
This function patches a project, changing only the fields supplied to the function. For CheckmarxOne v3.41+
func (*Cx1Client) PresetLink ¶
func (*Cx1Client) ProjectInApplicationPollingByID ¶ added in v0.0.36
func (c *Cx1Client) ProjectInApplicationPollingByID(projectId, applicationId string) (Project, error)
Poll a specific project until it shows as attached to the application, by ID
func (*Cx1Client) ProjectInApplicationPollingByIDWithTimeout ¶ added in v0.0.36
func (c *Cx1Client) ProjectInApplicationPollingByIDWithTimeout(projectId, applicationId string, delaySeconds, maxSeconds int) (Project, error)
Poll a specific project until it shows as attached to the application, by ID Polling occurs every delaySeconds until maxSeconds is reached
func (*Cx1Client) ProjectLink ¶
Returns a URL to the project's overview page
func (*Cx1Client) PutFile ¶
Upload a file to an UploadURL retrieved from GetUploadURL. Returns the response body as a string, typically a URL
func (*Cx1Client) PutFileRaw ¶ added in v0.0.45
Upload a file to an UploadURL retrieved from GetUploadURL. Returns the actual http.Response if needed, for normal Zip scan & SAST Export/Import workflows it is simpler to use the regular PutFile
func (*Cx1Client) QueryGroupLink ¶
func (c *Cx1Client) QueryGroupLink(q *SASTQueryGroup) string
func (*Cx1Client) QueryLanguageLink ¶
func (c *Cx1Client) QueryLanguageLink(q *SASTQueryLanguage) string
func (*Cx1Client) QueryTypeApplication ¶ added in v0.0.66
func (*Cx1Client) QueryTypeProduct ¶ added in v0.0.66
func (*Cx1Client) QueryTypeProject ¶ added in v0.0.66
func (*Cx1Client) QueryTypeTenant ¶ added in v0.0.66
func (*Cx1Client) RefreshFlags ¶ added in v0.0.18
func (*Cx1Client) RegenerateClientSecret ¶ added in v0.0.28
func (c *Cx1Client) RegenerateClientSecret(client OIDCClient) (string, error)
func (*Cx1Client) RemoveApplicationFromProjectsByIDs ¶ added in v0.1.14
func (c *Cx1Client) RemoveApplicationFromProjectsByIDs(applicationId string, projectIds []string) error
Directly remove an application from one or more projects requires the direct_app_association feature
func (*Cx1Client) RemoveHeader ¶ added in v0.1.44
func (*Cx1Client) RemoveProjectFromApplicationsByIDs ¶ added in v0.1.14
func (c *Cx1Client) RemoveProjectFromApplicationsByIDs(projectId string, applicationIds []string) error
Directly assign a project to one or more applications This should be used separately from the Project.AssignApplication + UpdateProject(Project) flow
func (*Cx1Client) RemoveRoleComposites ¶
func (*Cx1Client) RemoveUserAppRoles ¶
func (*Cx1Client) RemoveUserFromGroupByID ¶
func (*Cx1Client) RemoveUserIAMRoles ¶
func (*Cx1Client) RemoveUserRoles ¶
func (*Cx1Client) ReportPollingByID ¶ added in v0.0.13
convenience function, polls and returns the URL to download the report
func (*Cx1Client) ReportPollingByIDWithTimeout ¶ added in v0.0.96
func (*Cx1Client) RequestNewExportByID ¶ added in v0.1.25
func (c *Cx1Client) RequestNewExportByID(scanId, format string, hidePrivatePackages, hideDevAndTestDependencies, showOnlyEffectiveLicenses bool) (string, error)
SCA-specific Export for SBOM formats: CycloneDxjson, CycloneDxxml, Spdxjson
func (*Cx1Client) RequestNewReportByID ¶
func (c *Cx1Client) RequestNewReportByID(scanID, projectID, branch, reportType string, engines, sections []string) (string, error)
Reports Added the 'sections' variable, originally: "ScanSummary", "ExecutiveSummary", "ScanResults",
func (*Cx1Client) RequestNewReportByIDsv2 ¶ added in v0.0.103
func (c *Cx1Client) RequestNewReportByIDsv2(entityType string, ids, sections, scanners, severities, states, statuses, emails, tags []string, format string) (string, error)
function used by RequestNewReportByIDv2
func (*Cx1Client) RequestNewReportByIDv2 ¶ added in v0.0.82
func (c *Cx1Client) RequestNewReportByIDv2(scanID string, scanners []string, format string) (string, error)
the v2 report is the "improved scan report" which can be used the same as the existing RequestNewReportByID returns the report ID which can be passed to GetReportStatusByID or ReportPollingByID supports pdf, csv, and json format (not xml)
func (*Cx1Client) RequestNewReportByProjectIDv2 ¶ added in v0.0.103
func (*Cx1Client) RequestNewReportByScanIDv2 ¶ added in v0.0.103
func (*Cx1Client) RunIACQuery ¶ added in v0.1.37
func (c *Cx1Client) RunIACQuery(auditSession *AuditSession, query *IACQuery, source string) (QueryFailure, error)
This will test if the code compiles and will not update the source code in Cx1 nor in the query object Cx1ClientGo does not yet expose a method to retrieve the results of an audit query execution - this is effectively the same as Validate*QuerySource
func (*Cx1Client) RunQueryByKey ¶ added in v0.0.91
func (c *Cx1Client) RunQueryByKey(auditSession *AuditSession, queryKey, source string) (QueryFailure, error)
Use Run(SAST|IAC)Query instead. Cx1ClientGo does not yet expose a method to retrieve the results of an audit query execution - this is effectively the same as Validate*QuerySource
func (*Cx1Client) RunSASTQuery ¶ added in v0.1.10
func (c *Cx1Client) RunSASTQuery(auditSession *AuditSession, query *SASTQuery, source string) (QueryFailure, error)
This will test if the code compiles and will not update the source code in Cx1 nor in the query object Cx1ClientGo does not yet expose a method to retrieve the results of an audit query execution - this is effectively the same as Validate*QuerySource
func (*Cx1Client) ScanPolling ¶
Poll a running scan periodically until the scan finishes or fails, or the default timeout is reached. The default timeout can be accessed via Get/SetClientVars
func (*Cx1Client) ScanPollingDetailed ¶ added in v0.0.12
Poll a running scan periodically until the scan finishes or fails, or the default timeout is reached. Prints the scan status to the log. The default timeout can be accessed via Get/SetClientVars
func (*Cx1Client) ScanPollingWithTimeout ¶ added in v0.0.25
func (c *Cx1Client) ScanPollingWithTimeout(s *Scan, detailed bool, delaySeconds, maxSeconds int) (Scan, error)
Poll a running scan periodically until the scan finishes or fails, or the specified timeout is reached. The detailed boolean enables log output with the scan status.
func (*Cx1Client) ScanProjectByID ¶
func (c *Cx1Client) ScanProjectByID(projectID, sourceUrl, branch, scanType string, settings []ScanConfiguration, tags map[string]string) (Scan, error)
convenience function wrapping ScanProjectZipByID and ScanProjectGitByID
func (*Cx1Client) ScanProjectGitByID ¶
func (c *Cx1Client) ScanProjectGitByID(projectID, repoUrl, branch string, settings []ScanConfiguration, tags map[string]string) (Scan, error)
Run a scan from a git repo. You can use a ScanConfigurationSet to generate the settings.
func (*Cx1Client) ScanProjectGitByIDWithHandler ¶ added in v0.0.95
func (c *Cx1Client) ScanProjectGitByIDWithHandler(projectID string, handler ScanHandler, settings []ScanConfiguration, tags map[string]string) (Scan, error)
Run a scan from a git repo with commit/credentials included. You can use a ScanConfigurationSet to generate the settings.
func (*Cx1Client) ScanProjectSBOMByID ¶ added in v0.1.25
func (c *Cx1Client) ScanProjectSBOMByID(projectID, sourceUrl, branch, fileType string, tags map[string]string) (Scan, error)
After uploading an SBOM to cx1 via UploadBytes, supply the URL here. filetype can be json or xml, using SBOM exported via RequestNewExportByID (format: CycloneDxjson, CycloneDxxml, Spdxjson)
func (*Cx1Client) ScanProjectZipByID ¶
func (c *Cx1Client) ScanProjectZipByID(projectID, sourceUrl, branch string, settings []ScanConfiguration, tags map[string]string) (Scan, error)
Run a scan from a zip file. You can use a ScanConfigurationSet to generate the settings.
func (*Cx1Client) SetClientVars ¶ added in v0.0.19
func (c *Cx1Client) SetClientVars(clientvars ClientVars)
func (*Cx1Client) SetDeprecationWarning ¶ added in v0.1.19
If you are heavily using functions that throw deprecation warnings you can mute them here Just don't be surprised when they are actually deprecated
func (*Cx1Client) SetGroupParent ¶
Sets group g as child of group parent If parent == nil, sets the group as top-level
func (*Cx1Client) SetPaginationSettings ¶ added in v0.0.84
func (c *Cx1Client) SetPaginationSettings(pagination PaginationSettings)
func (*Cx1Client) SetProjectBranchByID ¶
Set a project's configured git branch
func (*Cx1Client) SetProjectFileFilterByID ¶
Sets a projet's default file filter
func (*Cx1Client) SetProjectLanguageModeByID ¶
func (c *Cx1Client) SetProjectLanguageModeByID(projectID, languageMode string, allowOverride bool) error
Sets a project's default language mode (single/multi language scanning)
func (*Cx1Client) SetProjectPresetByID ¶
Sets a project's default preset configuration
func (*Cx1Client) SetProjectRepositoryByID ¶ added in v0.0.56
func (c *Cx1Client) SetProjectRepositoryByID(projectID, repository string, allowOverride bool) error
Sets a project's default repository configuration
func (*Cx1Client) SetRetries ¶ added in v0.1.10
func (*Cx1Client) SetUserAgent ¶ added in v0.0.80
func (*Cx1Client) SetUserAgentFirefox ¶ added in v0.0.80
func (c *Cx1Client) SetUserAgentFirefox()
this function sets the U-A to be the old one that was previously default in Cx1ClientGo
func (*Cx1Client) StartImport ¶ added in v0.0.14
func (*Cx1Client) StartMigration ¶ added in v0.0.14
func (*Cx1Client) UpdateApplication ¶
func (c *Cx1Client) UpdateApplication(app *Application) error
This updates all fields of the application based on the content of the Application object. The passed-in application object is not modified, you must GetApplication* again for an updated object
func (*Cx1Client) UpdateClient ¶ added in v0.0.94
func (c *Cx1Client) UpdateClient(client OIDCClient) error
The UpdateClient function should be used sparingly - it will use the contents of the OIDCClient.OIDCClientRaw variable of type map[string]interface{} in the PUT request. As a result, changes to the member variables in the OIDCClient object itself (creator & clientsecretexpiry) will not be saved using this method unless they are also updated in OIDCClientRaw.
func (*Cx1Client) UpdateCxLink ¶ added in v0.1.26
func (*Cx1Client) UpdateGroup ¶
func (*Cx1Client) UpdateIACPreset ¶ added in v0.1.10
func (*Cx1Client) UpdateIACQuery ¶ added in v0.1.10
func (c *Cx1Client) UpdateIACQuery(auditSession *AuditSession, query IACQuery) (IACQuery, []QueryFailure, error)
This function should be used only if you have updated both the source code and the metadata of a query Use UpdateIACQuerySource and UpdateIACQueryMetadata separately if you are only updating one of those It will perform both updates in sequence. Performing the update without a change may throw an error.
func (*Cx1Client) UpdateIACQueryMetadata ¶ added in v0.1.10
func (c *Cx1Client) UpdateIACQueryMetadata(auditSession *AuditSession, query IACQuery, metadata AuditIACQueryMetadata) (IACQuery, error)
This function will update the query metadata
func (*Cx1Client) UpdateIACQuerySource ¶ added in v0.1.10
func (c *Cx1Client) UpdateIACQuerySource(auditSession *AuditSession, query IACQuery, source string) (IACQuery, []QueryFailure, error)
Update the source code of a query This function updates the query only if the source code has changed - the backend may return an error if the source is unchanged
func (*Cx1Client) UpdatePreset_v330 ¶ added in v0.1.10
func (c *Cx1Client) UpdatePreset_v330(preset *Preset_v330) error
func (*Cx1Client) UpdateProject ¶
This updates a project, including any changes in Application membership. All fields are updated based on the provided data. The project behind the supplied pointer is not changed For partial updates use PatchProject
func (*Cx1Client) UpdateProjectConfiguration ¶
func (c *Cx1Client) UpdateProjectConfiguration(project *Project, settings []ConfigurationSetting) error
updates the configuration of the project eg: preset, incremental scans
func (*Cx1Client) UpdateProjectConfigurationByID ¶
func (c *Cx1Client) UpdateProjectConfigurationByID(projectID string, settings []ConfigurationSetting) error
update the project's configuration
func (*Cx1Client) UpdateQueriesMetadata_v310 ¶ added in v0.1.19
func (c *Cx1Client) UpdateQueriesMetadata_v310(level, levelid string, queries []QueryUpdate_v310) error
func (*Cx1Client) UpdateQueries_v310 ¶ added in v0.0.66
func (c *Cx1Client) UpdateQueries_v310(level, levelid string, queries []QueryUpdate_v310) error
func (*Cx1Client) UpdateQueryMetadata_v310 ¶ added in v0.1.19
func (c *Cx1Client) UpdateQueryMetadata_v310(query AuditQuery_v310) error
func (*Cx1Client) UpdateQuery_v310 ¶ added in v0.0.66
func (c *Cx1Client) UpdateQuery_v310(query AuditQuery_v310) error
PUT is the only option to create an override on the project-level (and maybe in the future on application-level)
func (*Cx1Client) UpdateSASTPreset ¶ added in v0.1.10
func (*Cx1Client) UpdateSASTQuery ¶ added in v0.1.10
func (c *Cx1Client) UpdateSASTQuery(auditSession *AuditSession, query SASTQuery) (SASTQuery, []QueryFailure, error)
This function should be used only if you have updated both the source code and the metadata of a query Use UpdateSASTQuerySource and UpdateSASTQueryMetadata separately if you are only updating one of those It will perform both updates in sequence. Performing the update without a change may throw an error.
func (*Cx1Client) UpdateSASTQueryMetadata ¶ added in v0.1.10
func (c *Cx1Client) UpdateSASTQueryMetadata(auditSession *AuditSession, query SASTQuery, metadata AuditSASTQueryMetadata) (SASTQuery, error)
This function will update the query metadata
func (*Cx1Client) UpdateSASTQuerySource ¶ added in v0.1.10
func (c *Cx1Client) UpdateSASTQuerySource(auditSession *AuditSession, query SASTQuery, source string) (SASTQuery, []QueryFailure, error)
Update the source code of a query This function updates the query only if the source code has changed - the backend may return an error if the source is unchanged
func (*Cx1Client) UpdateScanSchedule ¶ added in v0.0.99
func (c *Cx1Client) UpdateScanSchedule(project *Project, schedule ProjectScanSchedule) error
func (*Cx1Client) UpdateScanScheduleByID ¶ added in v0.0.99
func (c *Cx1Client) UpdateScanScheduleByID(projectId string, schedule ProjectScanSchedule) error
func (*Cx1Client) UpdateUser ¶
func (*Cx1Client) UploadBytes ¶ added in v0.0.9
Simplifies uploading a zip file for use when starting a scan creates upload URL, uploads, returns upload URL
func (*Cx1Client) UploadBytesForProjectByID ¶ added in v0.0.9
func (c *Cx1Client) UploadBytesForProjectByID(projectID string, fileContents *[]byte) (string, error)
this function exists only for compatibility with a generic interface supporting both SAST and Cx1 wraps UploadBytes which should be used instead
func (*Cx1Client) UserIsTenantOwner ¶ added in v0.0.55
func (*Cx1Client) ValidateIACQuerySource ¶ added in v0.1.37
func (c *Cx1Client) ValidateIACQuerySource(auditSession *AuditSession, query *IACQuery, source string) ([]QueryFailure, error)
func (*Cx1Client) ValidateQuerySourceByKey ¶ added in v0.0.91
func (c *Cx1Client) ValidateQuerySourceByKey(auditSession *AuditSession, queryKey, source string) ([]QueryFailure, error)
You should use ValidateS(AST|IAC)QuerySource instead of this function This will test if the code compiles and will not update the source code in Cx1 nor in the query object
func (*Cx1Client) ValidateSASTQuerySource ¶ added in v0.1.10
func (c *Cx1Client) ValidateSASTQuerySource(auditSession *AuditSession, query *SASTQuery, source string) ([]QueryFailure, error)
type Cx1ClientAuth ¶ added in v0.1.10
type Cx1ClientConfiguration ¶ added in v0.1.45
type Cx1ClientConfiguration struct {
HttpClient *http.Client
Auth Cx1ClientAuth
Cx1Url string
IAMUrl string
Tenant string
QuickStart bool // Skip certain checks (flags, versions) during initialization. may affect some functionality due to API changes between Cx1 versions
Logger Logger
Polling *ClientVars
Pagination *PaginationSettings
MaxRetries *int
RetryDelay *int
SuppressDepWarn bool
HTTPHeaders http.Header
}
func (*Cx1ClientConfiguration) GetDefaultClientVars ¶ added in v0.1.45
func (c *Cx1ClientConfiguration) GetDefaultClientVars() ClientVars
func (*Cx1ClientConfiguration) GetPaginationDefaultsMultiTenant ¶ added in v0.1.45
func (c *Cx1ClientConfiguration) GetPaginationDefaultsMultiTenant() PaginationSettings
func (*Cx1ClientConfiguration) GetPaginationDefaultsSingleTenant ¶ added in v0.1.45
func (c *Cx1ClientConfiguration) GetPaginationDefaultsSingleTenant() PaginationSettings
func (*Cx1ClientConfiguration) ParseClaims ¶ added in v0.1.45
func (c *Cx1ClientConfiguration) ParseClaims(claims Cx1Claims)
func (*Cx1ClientConfiguration) ParseToken ¶ added in v0.1.45
func (c *Cx1ClientConfiguration) ParseToken(token string) error
func (*Cx1ClientConfiguration) Validate ¶ added in v0.1.45
func (c *Cx1ClientConfiguration) Validate() error
Validate that the configuration is valid
type Cx1LongTime ¶ added in v0.0.74
func (*Cx1LongTime) UnmarshalJSON ¶ added in v0.0.74
func (ct *Cx1LongTime) UnmarshalJSON(b []byte) (err error)
type Cx1TokenUserInfo ¶ added in v0.1.35
type Cx1TokenUserInfo struct {
UserID string // token.sub
UserName string // token.preferred_username
ClientName string // token.azp
}
func (Cx1TokenUserInfo) String ¶ added in v0.1.45
func (u Cx1TokenUserInfo) String() string
type CxLink ¶ added in v0.1.26
type CxLink struct {
LinkID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
PrivateURL string `json:"privateUrl"`
LinkURL string `json:"linkUrl"`
TunnelName string `json:"tunnelName"` // unique tunnel name
State string `json:"state"`
CreatedAt time.Time `json:"createdAt"`
}
func (CxLink) StringDetailed ¶ added in v0.1.26
type CxLinkFilter ¶ added in v0.1.26
type CxLinkFilter struct {
BaseFilter
}
type CxLinkResponse ¶ added in v0.1.26
type CxLinkResponse struct {
Link CxLink `json:"link"`
Token string `json:"token"`
ServerURL string `json:"tunnelServerUrl"`
}
func (CxLinkResponse) DockerCommand ¶ added in v0.1.26
func (newlink CxLinkResponse) DockerCommand() string
type DataImport ¶ added in v0.0.14
type DataImport struct {
MigrationId string `json:"migrationId"`
Status string `json:"status"`
CreatedAt string `json:"createdAt"`
Logs []DataImportStatus `json:"logs"`
}
type DataImportStatus ¶ added in v0.0.20
type ExportStatus ¶ added in v0.1.25
type Group ¶
type Group struct {
GroupID string `json:"id"`
ParentID string `json:"parentId"`
Name string `json:"name"`
Path string `json:"path"`
SubGroups []Group `json:"subGroups"`
SubGroupCount uint64 `json:"subGroupCount"`
DescendentCount uint64 `json:"-"`
ClientRoles map[string][]string `json:"clientRoles"`
RealmRoles []string `json:"realmRoles"`
Filled bool `json:"-"`
}
func RemoveGroup ¶ added in v0.0.11
func RemoveGroupByID ¶ added in v0.0.11
func (*Group) RemoveRole ¶ added in v0.0.16
type GroupAMFilter ¶ added in v0.1.43
type GroupAMFilter struct {
BaseFilter
Search string `url:"search"`
GroupIds []string `url:"ids"`
BriefRepresentation *bool `url:"briefRepresentation"`
}
type GroupFilter ¶ added in v0.0.84
type GroupFilter struct {
BaseIAMFilter
BriefRepresentation *bool `url:"briefRepresentation,omitempty"`
Exact *bool `url:"exact,omitempty"`
PopulateHierarchy *bool `url:"populateHierarchy,omitempty"`
Q *bool `url:"q,omitempty"`
Search string `url:"search,omitempty"` // used in both GetGroup and GetGroupCount
Top bool `url:"-"` // used only in GetGroupCount
}
type GroupMembersFilter ¶ added in v0.1.10
type GroupMembersFilter struct {
BaseIAMFilter
BriefRepresentation bool `url:"briefRepresentation,omitempty"`
}
type IACQuery ¶ added in v0.1.10
type IACQuery struct {
QueryID string `json:"queryId"` // this is a unique ID per query per level (eg: query1 tenant-level override will have a different ID from the query1 project-level override)
Name string `json:"name"`
Description string `json:"description"`
DescriptionID string `json:"descriptionId"`
DescriptionURL string `json:"descriptionUrl"`
Platform string `json:"platform"`
Group string `json:"group"` // aka cloudprovider?
Category string `json:"category"`
Severity string `json:"severity"`
CWE string `json:"cwe"`
Level string `json:"level"`
LevelID string `json:"-"`
Custom bool `json:"-"`
Key string `json:"-"` // this is the ID of the query consistent across overrides (eg: query1 tenant-level override will have the same ID as the query1 project-level override)
Path string `json:"path"`
Source string `json:"-"`
}
func (IACQuery) GetMetadata ¶ added in v0.1.10
func (q IACQuery) GetMetadata() AuditIACQueryMetadata
func (*IACQuery) MergeQuery ¶ added in v0.1.10
func (IACQuery) MetadataDifferent ¶ added in v0.1.10
func (q IACQuery) MetadataDifferent(metadata AuditIACQueryMetadata) bool
func (IACQuery) StringDetailed ¶ added in v0.1.10
func (*IACQuery) UnmarshalJSON ¶ added in v0.1.21
type IACQueryCollection ¶ added in v0.1.10
type IACQueryCollection struct {
Platforms []IACQueryPlatform
}
func (*IACQueryCollection) AddCollection ¶ added in v0.1.10
func (qc *IACQueryCollection) AddCollection(collection *IACQueryCollection)
func (*IACQueryCollection) AddQuery ¶ added in v0.1.10
func (qc *IACQueryCollection) AddQuery(q IACQuery)
func (*IACQueryCollection) AddQueryTree ¶ added in v0.1.10
func (qc *IACQueryCollection) AddQueryTree(t *[]AuditQueryTree, appId, projectId string)
func (IACQueryCollection) GetCustomQueryCollection ¶ added in v0.1.10
func (qc IACQueryCollection) GetCustomQueryCollection() IACQueryCollection
func (IACQueryCollection) GetPlatformByName ¶ added in v0.1.10
func (qc IACQueryCollection) GetPlatformByName(technology string) *IACQueryPlatform
func (IACQueryCollection) GetQueryByID ¶ added in v0.1.10
func (qc IACQueryCollection) GetQueryByID(qid string) *IACQuery
func (IACQueryCollection) GetQueryByLevelAndKey ¶ added in v0.1.10
func (qc IACQueryCollection) GetQueryByLevelAndKey(level, levelID, key string) *IACQuery
func (IACQueryCollection) GetQueryByLevelAndName ¶ added in v0.1.10
func (qc IACQueryCollection) GetQueryByLevelAndName(level, levelID, language, group, query string) *IACQuery
func (IACQueryCollection) GetQueryByName ¶ added in v0.1.10
func (qc IACQueryCollection) GetQueryByName(language, group, query string) *IACQuery
func (IACQueryCollection) GetQueryFamilies ¶ added in v0.1.10
func (qc IACQueryCollection) GetQueryFamilies(_ bool) []QueryFamily
func (IACQueryCollection) Print ¶ added in v0.1.10
func (qc IACQueryCollection) Print(logger Logger)
func (*IACQueryCollection) UpdateFromCollection ¶ added in v0.1.10
func (qc *IACQueryCollection) UpdateFromCollection(collection *IACQueryCollection)
func (*IACQueryCollection) UpdateNewQuery ¶ added in v0.1.10
func (qc *IACQueryCollection) UpdateNewQuery(query *IACQuery) error
This function may not be necessary in the future, it is used to fill in missing fields when creating new queries
type IACQueryGroup ¶ added in v0.1.10
func (IACQueryGroup) GetQueryByID ¶ added in v0.1.10
func (qg IACQueryGroup) GetQueryByID(qid string) *IACQuery
func (IACQueryGroup) GetQueryByKey ¶ added in v0.1.10
func (qg IACQueryGroup) GetQueryByKey(key string) *IACQuery
func (IACQueryGroup) GetQueryByLevelAndKey ¶ added in v0.1.10
func (qg IACQueryGroup) GetQueryByLevelAndKey(level, levelID, key string) *IACQuery
func (IACQueryGroup) GetQueryByLevelAndName ¶ added in v0.1.10
func (qg IACQueryGroup) GetQueryByLevelAndName(level, levelID, name string) *IACQuery
func (IACQueryGroup) GetQueryByName ¶ added in v0.1.10
func (qg IACQueryGroup) GetQueryByName(name string) *IACQuery
func (IACQueryGroup) Print ¶ added in v0.1.10
func (qg IACQueryGroup) Print(logger Logger)
convenience functions for debugging
type IACQueryPlatform ¶ added in v0.1.10
type IACQueryPlatform struct {
Name string
QueryGroups []IACQueryGroup
}
func (IACQueryPlatform) GetQueryByID ¶ added in v0.1.10
func (ql IACQueryPlatform) GetQueryByID(qid string) *IACQuery
func (IACQueryPlatform) GetQueryByKey ¶ added in v0.1.10
func (ql IACQueryPlatform) GetQueryByKey(key string) *IACQuery
func (IACQueryPlatform) GetQueryByLevelAndKey ¶ added in v0.1.10
func (ql IACQueryPlatform) GetQueryByLevelAndKey(level, levelID, key string) *IACQuery
func (IACQueryPlatform) GetQueryGroupByName ¶ added in v0.1.10
func (ql IACQueryPlatform) GetQueryGroupByName(name string) *IACQueryGroup
func (IACQueryPlatform) Print ¶ added in v0.1.10
func (ql IACQueryPlatform) Print(logger Logger)
type IACResultsPredicates ¶ added in v0.1.10
type IACResultsPredicates struct {
ResultsPredicatesBase // actually the same structure but different endpoint
}
type OIDCClient ¶ added in v0.0.15
type OIDCClient struct {
ID string `json:"id"`
ClientID string `json:"clientId"`
Enabled bool `json:"enabled"`
ClientSecret string `json:"secret"`
ClientSecretExpiry uint64 `json:"-"` // this is the actual time/date it will expire
SecretExpirationDays uint64 `json:"-"` // this is the number of days after which a secret will expire
Creator string `json:"-"`
NotificationEmails []string `json:"-"` // array of emails to be notified prior to secret expiry
OIDCClientRaw map[string]interface{} `json:"-"`
}
func (*OIDCClient) ClientFromMap ¶ added in v0.1.10
func (c *OIDCClient) ClientFromMap(data map[string]interface{}) error
Used internally to update an OIDC Client struct from JSON data
func (OIDCClient) String ¶ added in v0.0.54
func (client OIDCClient) String() string
type OIDCClientAMFilter ¶ added in v0.1.43
type OIDCClientAMFilter struct {
BaseFilter
Search string `json:"search"`
}
type OIDCClientFilter ¶ added in v0.1.33
type OIDCClientFilter struct {
BaseIAMFilter
ClientID string `url:"clientId,omitempty"`
Q string `url:"q,omitempty"`
Search *bool `url:"search,omitempty"`
ViewableOnly *bool `url:"viewableOnly,omitempty"`
}
type OIDCClientScope ¶ added in v0.0.15
type PaginationSettings ¶ added in v0.0.84
type PaginationSettings struct {
Applications uint64
Branches uint64
Clients uint64
CxLinks uint64
Groups uint64
GroupMembers uint64
Policies uint64
PolicyViolations uint64
Projects uint64
ProjectOverviews uint64
Results uint64
Scans uint64
ScanSchedules uint64
SASTAggregate uint64
Users uint64
}
Related to pagination and filtering
type Permission ¶ added in v0.1.43
type Permission struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
ChildIDs []string `json:"childIds"`
ParentIDs []string `json:"parentIds"`
Category string `json:"category"`
Custom bool `json:"-"`
}
Access Management phase2
func (Permission) String ¶ added in v0.1.43
func (p Permission) String() string
type Policy ¶ added in v0.1.30
type Policy struct {
PolicyID uint64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
IsActivated bool `json:"isActivated"`
Tags []string `json:"tags"`
BreakBuild bool `json:"breakBuild"`
PinPolicy bool `json:"pinPolicy"`
LastViolated time.Time `json:"lastViolated"`
UpdatedAt time.Time `json:"updatedAt"`
Projects []struct {
AstProjectID string `json:"astProjectId"`
} `json:"projects"`
NetNewBreakBuild bool `json:"netNewBreakBuild"`
Type string `json:"type"`
AllScannersSeverities []any `json:"allScannersSeverities"`
ViolatingAssocProjects struct {
AssocProjects uint64 `json:"assocProjects"`
Violating uint64 `json:"violating"`
} `json:"violatingAssocProjects"`
DefaultPolicy bool `json:"defaultPolicy"`
}
type PolicyFilter ¶ added in v0.1.30
type PolicyFilter struct {
BasePolicyFilter
}
type PolicyViolation ¶ added in v0.1.30
type PolicyViolation struct {
ViolationID uint64 `json:"id"`
PolicyName string `json:"policyName"`
ProjectName string `json:"projectName"`
Branch string `json:"branch"`
RuleName string `json:"ruleName"`
ScanID string `json:"scanId"`
ScanDate time.Time `json:"scanDate"`
PolicyTags []string `json:"policyTags"`
DefaultPolicy bool `json:"defaultPolicy"`
DefaultPolicyEvaluation bool `json:"defaultPolicyEvaluation"`
}
func (PolicyViolation) String ¶ added in v0.1.30
func (pv PolicyViolation) String() string
type PolicyViolationDetails ¶ added in v0.1.30
type PolicyViolationDetails struct {
Status string `json:"status"`
BreakBuild bool `json:"breakBuild"`
Policies []PolicyViolationInfoPolicy `json:"policies"`
}
type PolicyViolationFilter ¶ added in v0.1.30
type PolicyViolationFilter struct {
BasePolicyFilter
}
type PolicyViolationInfoPolicy ¶ added in v0.1.30
type Preset ¶
type Preset struct {
PresetID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
AssociatedProjects uint64 `json:"associatedProjects"`
Custom bool `json:"custom"`
IsTenantDefault bool `json:"isTenantDefault"`
IsMigrated bool `json:"isMigrated"`
Filled bool `json:"-"`
Engine string `json:"-"`
QueryFamilies []QueryFamily `json:"queries"` // this member variable should not be modified, any content changes come from the QueryCollection objects
}
func (Preset) GetIACQueryCollection ¶ added in v0.1.10
func (p Preset) GetIACQueryCollection(queries IACQueryCollection) IACQueryCollection
func (Preset) GetSASTQueryCollection ¶ added in v0.1.10
func (p Preset) GetSASTQueryCollection(queries SASTQueryCollection) SASTQueryCollection
func (Preset) ToPreset_v330 ¶ added in v0.1.10
func (p Preset) ToPreset_v330() Preset_v330
func (*Preset) UpdateQueries ¶ added in v0.1.10
func (p *Preset) UpdateQueries(collection QueryCollection)
type Preset_v330 ¶ added in v0.1.10
type Preset_v330 struct {
PresetID uint64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Custom bool `json:"custom"`
QueryIDs []uint64
Filled bool
Queries []SASTQuery `json:"-"`
}
func (*Preset_v330) AddQueryID ¶ added in v0.1.10
func (p *Preset_v330) AddQueryID(queryId uint64)
func (*Preset_v330) LinkQueries ¶ added in v0.1.10
func (p *Preset_v330) LinkQueries(qc *SASTQueryCollection)
func (Preset_v330) String ¶ added in v0.1.10
func (p Preset_v330) String() string
func (Preset_v330) ToPreset ¶ added in v0.1.10
func (p Preset_v330) ToPreset(collection *SASTQueryCollection) Preset
type Project ¶
type Project struct {
ProjectID string `json:"id"`
Name string `json:"name"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
Groups []string `json:"groups,omitempty"`
Applications *[]string `json:"applicationIds,omitempty"`
Tags map[string]string `json:"tags"`
RepoUrl string `json:"repoUrl"`
MainBranch string `json:"mainBranch"`
Origin string `json:"origin"`
Criticality uint `json:"criticality"`
Configuration []ConfigurationSetting `json:"-"`
// contains filtered or unexported fields
}
func (*Project) AssignApplication ¶ added in v0.1.13
func (p *Project) AssignApplication(app *Application)
Assign a project to an application. You must call UpdateProject() on this project to save the changes.
func (*Project) AssignApplicationByID ¶ added in v0.1.14
this should only be used if you are separately tracking changes to the Application or have direct_app_association enabled
func (*Project) AssignGroup ¶
Assign a project to a group. You must call UpdateProject() on this project to save the changes.
func (Project) GetConfigurationByName ¶ added in v0.0.9
func (p Project) GetConfigurationByName(configKey string) *ConfigurationSetting
Returns a specific configuration by 'key'
func (*Project) IsInApplication ¶ added in v0.1.13
func (p *Project) IsInApplication(app *Application) bool
check if project is assigned to an application
func (*Project) IsInApplicationID ¶ added in v0.1.13
check if project is assigned to an application by ID
func (*Project) IsInGroupID ¶
check if project is assigned to a group by ID
func (*Project) RemoveApplication ¶ added in v0.1.14
func (p *Project) RemoveApplication(app *Application)
Remove a project from an application and vice versa. Requires the project or application to be saved via UpdateProject/UpdateApplication to take effect
func (*Project) RemoveApplicationByID ¶ added in v0.1.14
this should only be used if you are separately tracking changes to the Application or have direct_app_association enabled
type ProjectAMFilter ¶ added in v0.1.43
type ProjectAMFilter struct {
BaseFilter
Action string `url:"action"`
Name string `url:"name"`
TagsKeys []string `url:"tagsKeys"`
TagsValues []string `url:"tagsValues"`
}
type ProjectBranchFilter ¶ added in v0.0.80
type ProjectBranchFilter struct {
BaseFilter
ProjectID string `url:"project-id,omitempty"`
Name string `url:"branch-name,omitempty"`
}
type ProjectFilter ¶ added in v0.0.84
type ProjectFilter struct {
BaseFilter
ProjectIDs []string `url:"ids,omitempty"`
Names []string `url:"names,omitempty"`
Name string `url:"name,omitempty"`
NameRegex string `url:"name-regex,omitempty"`
Groups []string `url:"groups,omitempty"`
Origins []string `url:"origins,omitempty"`
TagsKeys []string `url:"tags-keys,omitempty"`
TagsValues []string `url:"tags-values,omitempty"`
EmptyTags *bool `url:"empty-tags,omitempty"`
RepoURL string `url:"repo-url,omitempty"`
}
type ProjectOverview ¶ added in v0.1.19
type ProjectOverview struct {
ProjectID string `json:"projectId"`
Name string `json:"projectName"`
Origin string `json:"sourceOrigin"`
LastScanDate string `json:"lastScanDate"` // can be an empty string
SourceType string `json:"sourceType"`
Tags map[string]string `json:"tags"`
GroupIDs []string `json:"groupIds"`
RiskLevel string `json:"riskLevel"`
RepoID uint64 `json:"repoId"`
SCMRepoID string `json:"scmRepoId"`
//TotalCounters TODO
//EnginesData TODO
IsDeployed bool `json:"isDeployed"`
IsPublic bool `json:"isPublic"`
ImportedProjectName string `json:"importedProjName"`
ProjectOrigin string `json:"projectOrigin"`
ApplicationIDs []struct {
Id string `json:"id"`
Name string `json:"name"`
} `json:"applications"`
}
func (ProjectOverview) String ¶ added in v0.1.19
func (o ProjectOverview) String() string
type ProjectOverviewFilter ¶ added in v0.1.19
type ProjectOverviewFilter struct {
BaseFilter
Name string `url:"name,omitempty"`
Origin []string `url:"scan-origin,omitempty"`
SourceType []string `url:"source-type,omitempty"`
GroupIDs []string `url:"group-ids,omitempty"`
ApplicationIDs []string `url:"applications,omitempty"`
TagKeys []string `url:"tag-keys,omitempty"`
TagValues []string `url:"tag-values,omitempty"`
EmptyTags *bool `url:"empty-tags,omitempty"`
RiskLevel []string `url:"risk-level,omitempty"`
FromDate string `url:"from-date,omitempty"`
ToDate string `url:"to-date,omitempty"`
IsDeployed *bool `url:"is-deployed,omitempty"`
IsPublic *bool `url:"is-public,omitempty"`
Search string `url:"search,omitempty"`
Sort []string `url:"sort,omitempty"` // name, scan-origin, last-scan-date, source-type, risk-level, is-public, applications
}
type ProjectPatch ¶ added in v0.1.20
type ProjectScanSchedule ¶ added in v0.0.99
type ProjectScanSchedule struct {
ID string `json:"id"`
Name string `json:"name"`
ProjectID string `json:"projectID"`
NextStartTime time.Time `json:"start_time"`
StartTime string `json:"-"`
CreatedAt time.Time `json:"create_at"`
UpdatedAt time.Time `json:"update_at"`
Frequency string `json:"frequency"` // weekly or daily
Days []string `json:"days,omitempty"` // monday, tuesday ... iff weekly
Active bool `json:"active"`
Engines []string `json:"engines"`
Branch string `json:"branch"`
Tags map[string]string `json:"tags"`
}
func (ProjectScanSchedule) String ¶ added in v0.0.99
func (s ProjectScanSchedule) String() string
type ProjectScanScheduleFilter ¶ added in v0.1.27
type ProjectScanScheduleFilter struct {
BaseFilter
Search string `url:"string,omitempty"`
Name string `url:"name,omitempty"`
Active *bool `url:"active,omitempty"`
Frequency []string `url:"frequency,omitempty"`
FromCreationDate *time.Time `url:"from-creation-date,omitempty"`
ToCreationDate *time.Time `url:"to-creation-date,omitempty"`
FromTriggerDate *time.Time `url:"from-trigger-date,omitempty"`
ToTriggerDate *time.Time `url:"to-trigger-date,omitempty"`
Sort []string `url:"sort,omitempty"` // -created_at, +created_at, -status, +status, +name, -name, +trigger_time, -trigger_time
}
type QueryCollection ¶
type QueryCollection interface {
GetQueryFamilies(executableOnly bool) []QueryFamily
}
type QueryError ¶ added in v0.0.91
type QueryFailure ¶ added in v0.0.91
type QueryFailure struct {
QueryID string `json:"query_id"`
Errors []QueryError `json:"error"`
}
type QueryFamily ¶ added in v0.1.10
type QueryUpdateMetadata_v310 ¶ added in v0.0.69
type QueryUpdateMetadata_v310 struct {
Severity uint `json:"severity"`
}
type QueryUpdate_v310 ¶ added in v0.0.69
type ReportStatus ¶
type ResultState ¶ added in v0.1.11
type ResultState struct {
ID uint64 `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
IsAllowed bool `json:"isAllowed"`
}
func (ResultState) String ¶ added in v0.1.11
func (c ResultState) String() string
type ResultsChangeFilter ¶ added in v0.1.32
type ResultsChangeFilter struct {
BaseFilter
History bool `url:"history,omitempty"` // default false
EntityID string `url:"entityId"`
EntityType string `url:"entityType"` // Possible values: similarityID, scanID, projectID
}
type ResultsChangeHistory ¶ added in v0.1.32
type ResultsChangeHistory struct {
SimilarityID string `json:"similarityId"`
Predicates []ResultsChangelog `json:"predicates"`
}
type ResultsChangelog ¶ added in v0.1.32
type ResultsPredicatesBase ¶ added in v0.0.37
type ResultsPredicatesBase struct {
PredicateID string `json:"ID,omitempty"`
SimilarityID string `json:"similarityId"`
ProjectID string `json:"projectId"`
ScanID string `json:"scanId"`
State string `json:"state,omitempty"`
Comment string `json:"comment"`
Severity string `json:"severity,omitempty"`
CreatedBy string `json:"createdBy,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
}
func (ResultsPredicatesBase) String ¶ added in v0.1.10
func (b ResultsPredicatesBase) String() string
func (*ResultsPredicatesBase) Update ¶ added in v0.0.37
func (p *ResultsPredicatesBase) Update(state, severity, comment string)
convenience function
type Role ¶
type Role struct {
ClientID string `json:"containerId"` // the 'client' in Keycloak - AST roles with have the "ast-app" client ID
RoleID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Attributes struct {
Creator []string
Type []string
Category []string
LastUpdate []string // it is returned as [ "uint",... ]
} `json:"attributes"`
Composite bool `json:"composite"`
ClientRole bool `json:"clientRole"`
SubRoles []Role `json:"-"`
}
func RemoveRole ¶ added in v0.0.11
func RemoveRoleByID ¶ added in v0.0.11
func (Role) HasCategory ¶
type RunningScan ¶
type SASTAggregateSummary ¶ added in v0.0.85
type SASTAggregateSummaryFilter ¶ added in v0.0.85
type SASTAggregateSummaryFilter struct {
BaseFilter
ScanID string `url:"scan-id"`
GroupBy []string `url:"group-by-field,omitempty" del:","` //Options: QUERY,SEVERITY,STATE,STATUS,SOURCE_NODE,SINK_NODE,SOURCE_FILE,SINK_FILE,LANGUAGE
Language []string `url:"language,omitempty"`
Status []string `url:"status,omitempty"` //NEW, RECURRENT
Severity []string `url:"severity,omitempty"` //CRITICAL, HIGH, MEDIUM, LOW, INFO
SourceFile string `url:"source-file,omitempty"`
SourceFileOperation string `url:"source-file-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, CONTAINS, NOT_CONTAINS, START_WITH
SourceNode string `url:"source-node,omitempty"`
SourceNodeOperation string `url:"source-node-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, CONTAINS, NOT_CONTAINS, START_WITH
SourceLine uint64 `url:"source-line,omitempty"`
SourceLineOperation string `url:"source-line-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL
SinkFile string `url:"sink-file,omitempty"`
SinkFileOperation string `url:"sink-file-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, CONTAINS, NOT_CONTAINS, START_WITH
SinkNode string `url:"sink-node,omitempty"`
SinkNodeOperation string `url:"sink-node-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, CONTAINS, NOT_CONTAINS, START_WITH
NumberOfNodes uint64 `url:"number-of-nodes,omitempty"`
NumberOfNodesOperation string `url:"number-of-nodes-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL
Notes string `url:"notes,omitempty"`
NotesOperation string `url:"notes-operation,omitempty"` // CONTAINS, STARTS_WITH
FirstFoundAt string `url:"first-found-at,omitempty"`
FirstFoundAtOperation string `url:"first-found-at-operation,omitempty"` // LESS_THAN, GREATER_THAN
QueryIDs []uint64 `url:"query-ids,omitempty"`
PresetID uint64 `url:"preset-id,omitempty"`
ResultIDs []string `url:"result-ids,omitempty"`
Categories string `url:"categories,omitempty"` // comma-separated list
Search string `url:"search,omitempty"`
ApplyPredicates *bool `url:"apply-predicates,omitempty"`
}
type SASTQuery ¶ added in v0.1.10
type SASTQuery struct {
QueryID uint64 `json:"queryID,string"`
Level string `json:"level"`
LevelID string `json:"levelId"`
Path string `json:"path"`
Modified string `json:"-"`
Source string `json:"-"`
Name string `json:"queryName"`
Group string `json:"group"`
Language string `json:"language"`
Severity string `json:"severity"`
CweID int64 `json:"cweID"`
IsExecutable bool `json:"isExecutable"`
QueryDescriptionId int64 `json:"queryDescriptionId"`
Custom bool `json:"custom"`
EditorKey string `json:"key"`
SastID uint64 `json:"sastId"`
}
func (*SASTQuery) CalculateEditorKey ¶ added in v0.1.10
func (*SASTQuery) CalculateQueryID ¶ added in v0.1.10
func (SASTQuery) GetMetadata ¶ added in v0.1.10
func (q SASTQuery) GetMetadata() AuditSASTQueryMetadata
func (*SASTQuery) MergeQuery ¶ added in v0.1.10
func (SASTQuery) MetadataDifferent ¶ added in v0.1.10
func (q SASTQuery) MetadataDifferent(metadata AuditSASTQueryMetadata) bool
func (SASTQuery) StringDetailed ¶ added in v0.1.10
func (SASTQuery) ToAuditQuery_v310 ¶ added in v0.1.10
func (q SASTQuery) ToAuditQuery_v310() AuditQuery_v310
type SASTQueryCollection ¶ added in v0.1.10
type SASTQueryCollection struct {
QueryLanguages []SASTQueryLanguage
}
func (*SASTQueryCollection) AddAuditQueries_v310 ¶ added in v0.1.10
func (qc *SASTQueryCollection) AddAuditQueries_v310(queries *[]AuditQuery_v310)
func (*SASTQueryCollection) AddCollection ¶ added in v0.1.10
func (qc *SASTQueryCollection) AddCollection(collection *SASTQueryCollection)
Adds new queries and update existing
func (*SASTQueryCollection) AddQueries ¶ added in v0.1.10
func (qc *SASTQueryCollection) AddQueries(queries *[]SASTQuery)
func (*SASTQueryCollection) AddQuery ¶ added in v0.1.10
func (qc *SASTQueryCollection) AddQuery(q SASTQuery)
func (*SASTQueryCollection) AddQueryTree ¶ added in v0.1.10
func (qc *SASTQueryCollection) AddQueryTree(t *[]AuditQueryTree, appId, projectId string, setExecutable bool)
func (SASTQueryCollection) GetClosestQueryByLevelAndID ¶ added in v0.1.37
func (qc SASTQueryCollection) GetClosestQueryByLevelAndID(level, levelID, language, group string, queryID uint64) *SASTQuery
func (SASTQueryCollection) GetClosestQueryByLevelAndName ¶ added in v0.1.37
func (qc SASTQueryCollection) GetClosestQueryByLevelAndName(level, levelID, language, group, query string) *SASTQuery
func (SASTQueryCollection) GetCustomQueryCollection ¶ added in v0.1.10
func (qc SASTQueryCollection) GetCustomQueryCollection() SASTQueryCollection
func (SASTQueryCollection) GetDiffs ¶ added in v0.1.10
func (qc SASTQueryCollection) GetDiffs(collection *SASTQueryCollection) (missing SASTQueryCollection, extra SASTQueryCollection)
func (SASTQueryCollection) GetExtraQueries ¶ added in v0.1.10
func (qc SASTQueryCollection) GetExtraQueries(collection *SASTQueryCollection) (extra SASTQueryCollection)
func (SASTQueryCollection) GetQueries ¶ added in v0.1.10
func (qc SASTQueryCollection) GetQueries() []SASTQuery
func (SASTQueryCollection) GetQueryByID ¶ added in v0.1.10
func (qc SASTQueryCollection) GetQueryByID(qid uint64) *SASTQuery
func (SASTQueryCollection) GetQueryByLevelAndID ¶ added in v0.1.10
func (qc SASTQueryCollection) GetQueryByLevelAndID(level, levelID string, qid uint64) *SASTQuery
func (SASTQueryCollection) GetQueryByLevelAndName ¶ added in v0.1.10
func (qc SASTQueryCollection) GetQueryByLevelAndName(level, levelID, language, group, query string) *SASTQuery
func (SASTQueryCollection) GetQueryByName ¶ added in v0.1.10
func (qc SASTQueryCollection) GetQueryByName(language, group, query string) *SASTQuery
func (*SASTQueryCollection) GetQueryCount ¶ added in v0.1.10
func (qc *SASTQueryCollection) GetQueryCount() uint
func (SASTQueryCollection) GetQueryFamilies ¶ added in v0.1.10
func (qc SASTQueryCollection) GetQueryFamilies(executableOnly bool) []QueryFamily
func (SASTQueryCollection) GetQueryIDs ¶ added in v0.1.10
func (qc SASTQueryCollection) GetQueryIDs() []uint64
func (SASTQueryCollection) GetQueryLanguageByName ¶ added in v0.1.10
func (qc SASTQueryCollection) GetQueryLanguageByName(language string) *SASTQueryLanguage
func (SASTQueryCollection) IsSubset ¶ added in v0.1.10
func (qc SASTQueryCollection) IsSubset(collection *SASTQueryCollection) bool
func (SASTQueryCollection) Print ¶ added in v0.1.10
func (qc SASTQueryCollection) Print(logger Logger)
func (*SASTQueryCollection) UpdateFromCollection ¶ added in v0.1.10
func (qc *SASTQueryCollection) UpdateFromCollection(collection *SASTQueryCollection)
Update existing queries only, do not add new
func (*SASTQueryCollection) UpdateFromSession ¶ added in v0.1.40
func (qc *SASTQueryCollection) UpdateFromSession(cx1client *Cx1Client, session *AuditSession) error
func (*SASTQueryCollection) UpdateNewQuery ¶ added in v0.1.10
func (qc *SASTQueryCollection) UpdateNewQuery(query *SASTQuery) error
This function may not be necessary in the future, it is used to fill in missing fields when creating new queries
type SASTQueryGroup ¶ added in v0.1.10
func (SASTQueryGroup) GetQueryByID ¶ added in v0.1.10
func (qg SASTQueryGroup) GetQueryByID(qid uint64) *SASTQuery
func (SASTQueryGroup) GetQueryByLevelAndID ¶ added in v0.1.10
func (qg SASTQueryGroup) GetQueryByLevelAndID(level, levelID string, qid uint64) *SASTQuery
func (SASTQueryGroup) GetQueryByLevelAndName ¶ added in v0.1.10
func (qg SASTQueryGroup) GetQueryByLevelAndName(level, levelID, name string) *SASTQuery
func (SASTQueryGroup) GetQueryByName ¶ added in v0.1.10
func (qg SASTQueryGroup) GetQueryByName(name string) *SASTQuery
func (SASTQueryGroup) Print ¶ added in v0.1.10
func (qg SASTQueryGroup) Print(logger Logger)
convenience functions for debugging
func (SASTQueryGroup) String ¶ added in v0.1.10
func (q SASTQueryGroup) String() string
type SASTQueryLanguage ¶ added in v0.1.10
type SASTQueryLanguage struct {
Name string
QueryGroups []SASTQueryGroup
}
func (SASTQueryLanguage) GetQueryByID ¶ added in v0.1.10
func (ql SASTQueryLanguage) GetQueryByID(qid uint64) *SASTQuery
func (SASTQueryLanguage) GetQueryByLevelAndID ¶ added in v0.1.10
func (ql SASTQueryLanguage) GetQueryByLevelAndID(level, levelID string, qid uint64) *SASTQuery
func (SASTQueryLanguage) GetQueryGroupByName ¶ added in v0.1.10
func (ql SASTQueryLanguage) GetQueryGroupByName(name string) *SASTQueryGroup
func (SASTQueryLanguage) Print ¶ added in v0.1.10
func (ql SASTQueryLanguage) Print(logger Logger)
func (SASTQueryLanguage) String ¶ added in v0.1.10
func (q SASTQueryLanguage) String() string
type SASTResultsPredicates ¶ added in v0.0.37
type SASTResultsPredicates struct {
ResultsPredicatesBase // actually the same structure but different endpoint
}
type Scan ¶
type Scan struct {
ScanID string `json:"id"`
Status string `json:"status"`
StatusDetails []ScanStatusDetails `json:"statusDetails"`
Branch string `json:"branch"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
ProjectID string `json:"projectId"`
ProjectName string `json:"projectName"`
UserAgent string `json:"userAgent"`
Initiator string `json:"initiator"`
Tags map[string]string `json:"tags"`
Metadata struct {
Type string `json:"type"`
Configs []ScanConfiguration `json:"configs"`
} `json:"metadata"`
Engines []string `json:"engines"`
SourceType string `json:"sourceType"`
SourceOrigin string `json:"sourceOrigin"`
}
func (*Scan) IsIncremental ¶
convenience function to retrieve if a Scan was incremental this information is also available through the Scan.Metadata.Configs struct
type ScanConfiguration ¶
type ScanConfigurationSet ¶ added in v0.1.10
type ScanConfigurationSet struct {
Configurations []ScanConfiguration
}
func (*ScanConfigurationSet) AddConfig ¶ added in v0.1.10
func (s *ScanConfigurationSet) AddConfig(engine, key, value string)
Add a specific key-value configuration for a scan, for example "sast", "incremental", "true" You can find the full list of key-value pairs via Swagger or Get*Configuration calls
func (*ScanConfigurationSet) AddScanEngine ¶ added in v0.1.35
func (s *ScanConfigurationSet) AddScanEngine(engine string)
Add a scan engine to a configuration set. This is only required if you don't want to set specific configs via AddConfig
func (*ScanConfigurationSet) SetKey ¶ added in v0.1.35
func (s *ScanConfigurationSet) SetKey(key, value string) error
To be used with full key names - shortcuts are defined in Cx1ClientGo.ConfigurationSettings eg to set a scan to incremental: s.SetKey( Cx1ClientGo.ConfigurationSettings.SAST.Incremental, "true" ) Consumed when starting a scan: cx1client.ScanProjectZipByID( projectId, repoUrl, branch, s.Configurations, tags )
type ScanContainersResult ¶ added in v0.0.84
type ScanContainersResult struct {
ScanResultBase
Data ScanContainersResultData
VulnerabilityDetails ScanContainersResultDetails
}
func (ScanContainersResult) String ¶ added in v0.0.84
func (r ScanContainersResult) String() string
type ScanContainersResultData ¶ added in v0.0.84
type ScanContainersResultDetails ¶ added in v0.0.84
type ScanContainersResultDetails struct {
CVSSScore float64
CveName string
CweID string
Cvss struct {
Scope string
Score string
Severity string
AttackVector string `json:"attack_vector"`
IntegrityImpact string `json:"integrity_impact"`
UserInteraction string `json:"user_interaction"`
AttackComplexity string `json:"attack_complexity"`
AvailabilityImpact string `json:"availability_impact"`
PrivilegesRequired string `json:"privileges_required"`
ConfidentialityImpact string `json:"confidentiality_impact"`
}
}
type ScanFilter ¶ added in v0.0.13
type ScanFilter struct {
BaseFilter
ProjectID string `url:"project-id"`
Sort []string `url:"sort,omitempty"` // Available values : -created_at, +created_at, -status, +status, +branch, -branch, +initiator, -initiator, +user_agent, -user_agent, +name, -name
TagKeys []string `url:"tags-keys,omitempty"`
TagValues []string `url:"tags-values,omitempty"`
Statuses []string `url:"statuses,omitempty"`
Branches []string `url:"branches,omitempty"`
FromDate time.Time `url:"from-date,omitempty"`
ToDate time.Time `url:"to-date,omitempty"`
}
type ScanHandler ¶ added in v0.0.95
type ScanIACResult ¶ added in v0.1.10
type ScanIACResult struct {
ScanResultBase
Data ScanIACResultData
}
func (ScanIACResult) CreateResultsPredicate ¶ added in v0.1.10
func (r ScanIACResult) CreateResultsPredicate(projectId, scanId string) IACResultsPredicates
func (ScanIACResult) String ¶ added in v0.1.10
func (r ScanIACResult) String() string
type ScanIACResultData ¶ added in v0.1.10
type ScanMetadata ¶
type ScanMetadata struct {
ScanID string
ProjectID string
LOC uint64
FileCount uint64
IsIncremental bool
IsIncrementalCanceled bool
IncrementalCancelReason string
BaseID string
AddedFilesCount uint64
ChangedFilesCount uint64
DeletedFilesCount uint64
ChangePercentage float64
PresetName string `json:"queryPreset"`
}
type ScanMetrics ¶ added in v0.0.93
type ScanMetrics struct {
ScanID string
MemoryPeak uint64
VirtualMemoryPeak uint64
TotalScannedFilesCount uint64
TotalScannedLOC uint64
DOMObjectsPerLanguage map[string]uint64
SuccessfullLocPerLanguage map[string]uint64
FailedLocPerLanguage map[string]uint64
FileCountOfDetectedButNotScannedLanguages map[string]uint64
ScannedFilesPerLanguage map[string]struct {
GoodFiles uint64
PartiallyGoodFiles uint64
BadFiles uint64
}
}
func (ScanMetrics) GetLanguages ¶ added in v0.0.93
func (s ScanMetrics) GetLanguages() []string
returns the languages
func (ScanMetrics) HasLanguage ¶ added in v0.0.93
func (s ScanMetrics) HasLanguage(lang string) bool
HasLanguage checks if the scan metrics contain data for a specific programming language.
type ScanResultBase ¶ added in v0.0.37
type ScanResultBase struct {
Type string
ResultID string `json:"id"`
SimilarityID string `json:"similarityId"`
AlternateID string `json:"alternateId"`
Status string
State string
Severity string
ConfidenceLevel int `json:"confidenceLevel"`
CreatedAt string `json:"created"`
FirstFoundAt string
FoundAt string
FirstScanId string
Description string
// Comments // currently doesn't do anything?
CVSSScore float64
ProjectID string
ScanID string
SourceFileName string
}
generic data common to all
type ScanResultSet ¶ added in v0.0.34
type ScanResultSet struct {
SAST []ScanSASTResult
SCA []ScanSCAResult
SCAContainer []ScanSCAContainerResult
IAC []ScanIACResult
Containers []ScanContainersResult
}
func (*ScanResultSet) Append ¶ added in v0.0.84
func (s *ScanResultSet) Append(results *ScanResultSet)
func (ScanResultSet) Count ¶ added in v0.0.84
func (s ScanResultSet) Count() uint64
func (ScanResultSet) String ¶ added in v0.0.46
func (s ScanResultSet) String() string
type ScanResultStatusSummary ¶
type ScanResultStatusSummary struct {
ToVerify uint64
NotExploitable uint64
Confirmed uint64
ProposedNotExploitable uint64
Urgent uint64
}
func (ScanResultStatusSummary) String ¶
func (s ScanResultStatusSummary) String() string
func (ScanResultStatusSummary) Total ¶
func (s ScanResultStatusSummary) Total() uint64
type ScanResultSummary ¶
type ScanResultSummary struct {
High ScanResultStatusSummary
Medium ScanResultStatusSummary
Low ScanResultStatusSummary
Information ScanResultStatusSummary
}
func (ScanResultSummary) String ¶
func (s ScanResultSummary) String() string
type ScanResultsFilter ¶ added in v0.0.84
type ScanResultsFilter struct {
BaseFilter
ScanID string `url:"scan-id"`
Severity []string `url:"severity"`
State []string `url:"state"`
Status []string `url:"status"`
ExcludeResultTypes []string `url:"exclude-result-types"` // Available values : DEV_AND_TEST, NONE
Sort []string `url:"sort"` //Available values : -severity, +severity, -status, +status, -state, +state, -type, +type, -firstfoundat, +firstfoundat, -foundat, +foundat, -firstscanid, +firstscanid
}
func (*ScanResultsFilter) Bump ¶ added in v0.0.84
func (s *ScanResultsFilter) Bump()
type ScanSASTResult ¶ added in v0.0.34
type ScanSASTResult struct {
ScanResultBase
Data ScanSASTResultData
VulnerabilityDetails ScanSASTResultDetails
}
func (ScanSASTResult) CreateResultsPredicate ¶ added in v0.0.37
func (r ScanSASTResult) CreateResultsPredicate(projectId, scanId string) SASTResultsPredicates
Note: when creating SAST overrides, you cannot change multiple fields at once unless mandatory. For example, changing state to "Confirmed" and adding a comment-text requires two predicates, 1 "Confirmed" + 1 comment
func (ScanSASTResult) String ¶ added in v0.0.34
func (r ScanSASTResult) String() string
type ScanSASTResultData ¶ added in v0.0.34
type ScanSASTResultDetails ¶ added in v0.0.34
type ScanSASTResultNodes ¶ added in v0.0.34
type ScanSASTResultsFilter ¶ added in v0.1.10
type ScanSASTResultsFilter struct {
BaseFilter
ScanID string `url:"scan-id"`
Language []string `url:"language,omitempty"`
Status []string `url:"status,omitempty"` //NEW, RECURRENT
Severity []string `url:"severity,omitempty"` //CRITICAL, HIGH, MEDIUM, LOW, INFO
SourceFile string `url:"source-file,omitempty"`
SourceFileOperation string `url:"source-file-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, CONTAINS, NOT_CONTAINS, START_WITH
SourceNode string `url:"source-node,omitempty"`
SourceNodeOperation string `url:"source-node-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, CONTAINS, NOT_CONTAINS, START_WITH
SourceLine uint64 `url:"source-line,omitempty"`
SourceLineOperation string `url:"source-line-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL
SinkFile string `url:"sink-file,omitempty"`
SinkFileOperation string `url:"sink-file-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, CONTAINS, NOT_CONTAINS, START_WITH
SinkNode string `url:"sink-node,omitempty"`
SinkNodeOperation string `url:"sink-node-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, CONTAINS, NOT_CONTAINS, START_WITH
SinkLine uint64 `url:"sink-line,omitempty"`
SinkLineOperation string `url:"sink-line-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL
NumberOfNodes uint64 `url:"number-of-nodes,omitempty"`
NumberOfNodesOperation string `url:"number-of-nodes-operation,omitempty"` // LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL
Notes string `url:"notes,omitempty"`
NotesOperation string `url:"notes-operation,omitempty"` // CONTAINS, STARTS_WITH
FirstFoundAt string `url:"first-found-at,omitempty"`
FirstFoundAtOperation string `url:"first-found-at-operation,omitempty"` // LESS_THAN, GREATER_THAN
QueryIDs []uint64 `url:"query-ids,omitempty"`
PresetID uint64 `url:"preset-id,omitempty"`
ResultIDs []string `url:"result-ids,omitempty"`
Categories string `url:"category,omitempty"` // comma-separated list
Search string `url:"search,omitempty"`
IncludeNodes *bool `url:"include-nodes,omitempty"`
ApplyPredicates *bool `url:"apply-predicates,omitempty"`
Sort []string `url:"sort,omitempty"` // Default value : +status,+severity,-queryname
VisibleColumns []string `url:"visible-columns,omitempty"`
State []string `url:"state,omitempty"`
}
func (*ScanSASTResultsFilter) Bump ¶ added in v0.1.10
func (s *ScanSASTResultsFilter) Bump()
type ScanSCAContainerResult ¶ added in v0.0.46
type ScanSCAContainerResult struct {
ScanResultBase
Data ScanSCAContainerResultData `json:"data"`
VulnerabilityDetails ScanSCAResultDetails
}
func (ScanSCAContainerResult) String ¶ added in v0.0.84
func (r ScanSCAContainerResult) String() string
type ScanSCAContainerResultData ¶ added in v0.0.46
type ScanSCAResult ¶ added in v0.0.34
type ScanSCAResult struct {
ScanResultBase
Data ScanSCAResultData `json:"data"`
VulnerabilityDetails ScanSCAResultDetails
}
func (ScanSCAResult) String ¶ added in v0.0.34
func (r ScanSCAResult) String() string
type ScanSCAResultCVSS ¶ added in v0.0.34
type ScanSCAResultData ¶ added in v0.0.34
type ScanSCAResultData struct {
PackageIdentifier string
PublishedAt string
Recommendation string
RecommendedVersion string
//ExploitableMethods // TODO
PackageData []ScanSCAResultPackageData
}
func (ScanSCAResultData) GetType ¶ added in v0.0.34
func (r ScanSCAResultData) GetType(packageDataType string) ScanSCAResultPackageData
type ScanSCAResultDetails ¶ added in v0.0.34
type ScanSCAResultDetails struct {
CweId string
CVSSScore float64
CveName string
Cvss ScanSCAResultCVSS
}
type ScanSCAResultPackageData ¶ added in v0.0.34
type ScanStatusDetails ¶
type ScanStatusSummary ¶ added in v0.0.48
type ScanStatusSummary struct {
Canceled uint64
Completed uint64
Partial uint64
Queued uint64
Failed uint64
Running uint64
}
func (ScanStatusSummary) String ¶ added in v0.0.48
func (s ScanStatusSummary) String() string
type ScanSummary ¶
type ScanSummary struct {
TenantID string
ScanID string
SASTCounters struct {
QueriesCounters []ScanSummaryQueriesCounter
SinkFileCounters []ScanSummaryFileCounter
LanguageCounters []ScanSummaryLanguageCounter
ComplianceCounters []ScanSummaryComplianceCounter
SeverityCounters []ScanSummarySeverityCounter
StatusCounters []ScanSummaryStatusCounter
StateCounters []ScanSummaryStateCounter
SeverityStatusCounters []ScanSummarySeverityStatusCounter
SourceFileCounters []ScanSummaryFileCounter
AgeCounters []ScanSummaryAgeCounter
TotalCounter uint64
FilesScannedCounter uint64
}
IACCounters struct {
SeverityCounters []ScanSummarySeverityCounter
StatusCounters []ScanSummaryStatusCounter
StateCounters []ScanSummaryStateCounter
SeverityStatusCounters []ScanSummarySeverityStatusCounter
SourceFileCounters []ScanSummaryFileCounter
AgeCounters []ScanSummaryAgeCounter
TotalCounter uint64
FilesScannedCounter uint64
PlatformSummary []ScanSummaryPlatformCounter
CategorySummary []ScanSummaryCategoryCounter
} `json:"kicsCounters"`
SCACounters struct {
SeverityCounters []ScanSummarySeverityCounter
StatusCounters []ScanSummaryStatusCounter
StateCounters []ScanSummaryStateCounter
SeverityStatusCounters []ScanSummarySeverityStatusCounter
SourceFileCounters []ScanSummaryFileCounter
AgeCounters []ScanSummaryAgeCounter
TotalCounter uint64
FilesScannedCounter uint64
}
SCAPackagesCounters struct {
SeverityCounters []ScanSummarySeverityCounter
StatusCounters []ScanSummaryStatusCounter
StateCounters []ScanSummaryStateCounter
SeverityStatusCounters []ScanSummarySeverityStatusCounter
SourceFileCounters []ScanSummaryFileCounter
AgeCounters []ScanSummaryAgeCounter
TotalCounter uint64
FilesScannedCounter uint64
OutdatedCounter uint64
RiskLevelCounters []ScanSummaryRiskLevelCounter
LicenseCounters []ScanSummaryLicenseCounter
PackageCounters []ScanSummaryPackageCounter
}
SCAContainersCounters struct {
TotalPackagesCounters uint64
TotalVulnerabilitiesCounter uint64
SeverityVulnerabilitiesCounters []ScanSummarySeverityCounter
StateVulnerabilityCounters []ScanSummaryStateCounter
StatusVulnerabilityCounters []ScanSummaryStatusCounter
AgeVulnerabilityCounters []ScanSummaryAgeCounter
PackageVulnerabilitiesCounters []ScanSummaryPackageCounter
}
APISecCounters struct {
SeverityCounters []ScanSummarySeverityCounter
StatusCounters []ScanSummaryStatusCounter
StateCounters []ScanSummaryStateCounter
SeverityStatusCounters []ScanSummarySeverityStatusCounter
SourceFileCounters []ScanSummaryFileCounter
AgeCounters []ScanSummaryAgeCounter
TotalCounter uint64
FilesScannedCounter uint64
RiskLevel string
APISecTotal uint64
}
MicroEnginesCounters struct {
SeverityCounters []ScanSummarySeverityCounter
StatusCounters []ScanSummaryStatusCounter
StateCounters []ScanSummaryStateCounter
SeverityStatusCounters []ScanSummarySeverityStatusCounter
SourceFileCounters []ScanSummaryFileCounter
AgeCounters []ScanSummaryAgeCounter
TotalCounter uint64
FilesScannedCounter uint64
}
ContainersCounters struct {
TotalPackagesCounter uint64
TotalCounter uint64
SeverityCounters []ScanSummarySeverityCounter
StatusCounters []ScanSummaryStatusCounter
StateCounters []ScanSummaryStateCounter
AgeCounters []ScanSummaryAgeCounter
PackageCounters []ScanSummaryContainerPackageCounter
SeverityStatusCounters []ScanSummarySeverityStatusCounter
}
}
Very simplified for now
func (ScanSummary) String ¶ added in v0.0.84
func (s ScanSummary) String() string
func (ScanSummary) TotalCount ¶
func (s ScanSummary) TotalCount() uint64
TotalCount calculates the total number of results across all scanner types within a ScanSummary.
type ScanSummaryAgeCounter ¶ added in v0.0.84
type ScanSummaryAgeCounter struct {
Age string
SeverityCounters []ScanSummarySeverityCounter
Counter int64
}
type ScanSummaryCategoryCounter ¶ added in v0.0.84
type ScanSummaryComplianceCounter ¶ added in v0.0.84
type ScanSummaryContainerPackageCounter ¶ added in v0.0.84
type ScanSummaryFileCounter ¶ added in v0.0.84
type ScanSummaryFilter ¶ added in v0.0.84
type ScanSummaryFilter struct {
BaseFilter
ScanIDs string `url:"scan-ids"` // comma-separated list of scan ids
SeverityStatus *bool `url:"include-severity-status"`
Status *bool `url:"include-status-counters"`
Queries *bool `url:"include-queries"`
Files *bool `url:"include-files"`
Predicates *bool `url:"apply-predicates"`
Language string `url:"language"`
ExcludeTypes []string `url:"exclude-result-types"` // DEV_AND_TEST, NONE
}
type ScanSummaryLanguageCounter ¶ added in v0.0.84
type ScanSummaryLicenseCounter ¶ added in v0.0.84
type ScanSummaryPackageCounter ¶ added in v0.0.84
type ScanSummaryPlatformCounter ¶ added in v0.0.84
type ScanSummaryQueriesCounter ¶ added in v0.0.84
type ScanSummaryQueriesCounter struct {
QueryID uint64 `json:"queryID"`
Name uint64 `json:"queryName"`
Severity string `json:"severity"`
StatusCounters []ScanSummaryStatusCounter `json:"statusCounters"`
Counter int64 `json:"counter"`
}
type ScanSummaryRiskLevelCounter ¶ added in v0.0.84
type ScanSummarySeverityCounter ¶ added in v0.0.84
type ScanSummarySeverityStatusCounter ¶ added in v0.0.84
type ScanSummaryStateCounter ¶ added in v0.0.84
type ScanSummaryStatusCounter ¶ added in v0.0.84
type Status ¶
type Status struct {
ID int `json:"id"`
Name string `json:"name"`
Details ScanStatusDetails `json:"details"`
}
type TenantOwner ¶ added in v0.0.55
type User ¶
type User struct {
Enabled bool `json:"enabled"`
UserID string `json:"id,omitempty"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
UserName string `json:"username"`
Email string `json:"email"`
LastLogin Cx1LongTime `json:"-"`
Groups []Group `json:"-"` // only returned from /users/{id}/groups. Use GetUserGroups to fill.
FilledGroups bool `json:"-"` // indicates if the user object has had the Groups array filled.
Roles []Role `json:"-"` // only returned from /users/{id}/role-mappings. Use GetUserRoles to fill.
FilledRoles bool `json:"-"` // indicates if the user object has had the Roles array filled.
}
type UserAMFilter ¶ added in v0.1.43
type UserAMFilter struct {
BaseFilter
Search string `url:"search"`
}
type UserFilter ¶ added in v0.0.84
type UserFilter struct {
BaseIAMFilter
BriefRepresentation *bool `url:"briefRepresentation,omitempty"` // only used by GetUser* (not GetUserCount)
Email string `url:"email,omitempty"`
EmailVerified *bool `url:"emailVerified,omitempty"`
Enabled *bool `url:"enabled,omitempty"`
Exact *bool `url:"exact,omitempty"` // only used by GetUser* (not GetUserCount)
FirstName string `url:"firstName,omitempty"`
IDPAlias string `url:"idpAlias,omitempty"` // only used by GetUser* (not GetUserCount)
IDPUserId string `url:"idpUserId,omitempty"` // only used by GetUser* (not GetUserCount)
Q string `url:"q,omitempty"`
Search string `url:"search,omitempty"`
Username string `url:"username,omitempty"`
Realm string `url:"realm"`
}
type UserWithAttributes ¶ added in v0.0.74
type UserWithAttributes struct {
User
Attributes struct {
LastLogin []Cx1LongTime `json:"lastLogin"`
} `json:"attributes"`
}
type VersionInfo ¶ added in v0.0.55
type VersionInfo struct {
CxOne string
IAC string `json:"kics"`
SAST string
// contains filtered or unexported fields
}
func (VersionInfo) CheckCxOne ¶ added in v0.0.66
func (v VersionInfo) CheckCxOne(version string) (int, error)
version check returns -1 (current cx1 version lower), 0 (equal), 1 (current cx1 version greater)
func (VersionInfo) CheckIAC ¶ added in v0.1.10
func (v VersionInfo) CheckIAC(version string) (int, error)
func (VersionInfo) CheckKICS ¶ added in v0.0.108
func (v VersionInfo) CheckKICS(version string) (int, error)
func (VersionInfo) CheckSAST ¶ added in v0.0.108
func (v VersionInfo) CheckSAST(version string) (int, error)
func (VersionInfo) String ¶ added in v0.0.55
func (v VersionInfo) String() string
type VersionTriad ¶ added in v0.0.108
func (VersionTriad) Compare ¶ added in v0.0.108
func (v VersionTriad) Compare(test VersionTriad) int
type WorkflowLog ¶
Source Files
¶
- access.go
- analytics.go
- applications.go
- applicationsoverview.go
- audit.go
- audit_v310.go
- clients.go
- configurationsettings.go
- cx1cache.go
- cx1client.go
- cx1clientconfiguration.go
- cxlink.go
- groups.go
- iacquerycollection.go
- iam.go
- lists.go
- migration.go
- misc.go
- plumbing.go
- policies.go
- presets.go
- presets_v330.go
- projects.go
- projectsoverview.go
- queries.go
- queries_v310.go
- reports.go
- results.go
- roles.go
- sastquerycollection.go
- sastresults.go
- scans.go
- scanschedule.go
- types.go
- user.go
- users.go
- util.go