Documentation
¶
Index ¶
- Variables
- func GetSeverity(severity uint) string
- func GetSeverityID(severity string) uint
- func RemoveIndex(slice []interface{}, index int) []interface{}
- func ShortenGUID(guid string) string
- type ASTLicense
- type AccessAssignedRole
- type AccessAssignment
- type AccessibleResource
- type Application
- func (a *Application) AddRule(ruletype, value string)
- func (a *Application) AssignProject(project *Project)
- func (a *Application) GetRuleByType(ruletype string) *ApplicationRule
- func (a *Application) RemoveRule(rule *ApplicationRule)
- func (a *Application) String() string
- func (a *Application) UnassignProject(project *Project)
- type ApplicationRule
- type AuditPermissions
- type AuditQuery
- type AuditQueryMetadata
- 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() Query
- type AuditQuery_v312
- type AuditScanSourceFile
- type AuditSession
- type AuditSessionFilters
- type AuditSessionLanguage
- type AuditSessionLanguageFilters
- type AuthenticationProvider
- type AuthenticationProviderMapper
- type AuthenticationProviderMapperConfig
- 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(presetID uint64) (*Preset, error)
- func (c *Cx1Cache) GetPresetByName(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) (*Query, error)
- func (c *Cx1Cache) GetQueryByNames(language, group, query string) (*Query, 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, base_url string, iam_url string, tenant string, ...) (*Cx1Client, error)
- func NewClient(client *http.Client, logger *logrus.Logger) (*Cx1Client, error)
- func NewOAuthClient(client *http.Client, base_url string, iam_url string, tenant string, ...) (*Cx1Client, error)
- func (c Cx1Client) AddAccessAssignment(access AccessAssignment) error
- func (c Cx1Client) AddAuthenticationProviderMapper(mapper AuthenticationProviderMapper) error
- func (c Cx1Client) AddClientScopeByID(oidcId, clientScopeId string) error
- func (c Cx1Client) AddKICSResultsPredicates(predicates []KICSResultsPredicates) 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) AssignUserToGroupByID(user *User, groupId string) error
- func (c Cx1Client) AuditCreateSession(engine, filter 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) 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) CreateGroup(groupname string) (Group, error)
- func (c Cx1Client) CreateNewQuery(auditSession *AuditSession, query Query) (Query, error)
- func (c Cx1Client) CreatePreset(name, description string, queryIDs []uint64) (Preset, 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) CreateQueryOverride(auditSession *AuditSession, level string, baseQuery *Query) (Query, error)
- func (c Cx1Client) CreateSAMLUser(newuser User, idpAlias, idpUserId, idpUserName string) (User, 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) DeleteAuthenticationProvider(provider AuthenticationProvider) error
- func (c Cx1Client) DeleteAuthenticationProviderMapper(mapper AuthenticationProviderMapper) error
- func (c Cx1Client) DeleteClientByID(id string) error
- func (c Cx1Client) DeleteGroup(group *Group) error
- func (c Cx1Client) DeletePreset(preset *Preset) 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) DeleteUser(user *User) error
- func (c Cx1Client) DeleteUserByID(userid string) error
- func (c Cx1Client) DownloadReport(reportUrl string) ([]byte, error)
- func (c Cx1Client) FindQueryByName_v310(queries []AuditQuery_v310, level, language, group, name string) (AuditQuery_v310, error)
- func (c Cx1Client) GetASTAppID() string
- func (c Cx1Client) GetAccessAssignmentByID(entityId, resourceId string) (AccessAssignment, error)
- func (c Cx1Client) GetAllPresets() ([]Preset, error)
- func (c Cx1Client) GetAppRoleByName(name string) (Role, error)
- func (c Cx1Client) GetAppRoles() ([]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) GetApplications(limit uint) ([]Application, error)
- func (c Cx1Client) GetApplicationsByName(name string, limit uint64) ([]Application, error)
- func (c Cx1Client) GetAuditQueriesByLevelID(auditSession *AuditSession, level, levelId string) ([]Query, error)
- func (c Cx1Client) GetAuditQueryByKey(auditSession *AuditSession, key string) (Query, error)
- func (c Cx1Client) GetAuditSessionByID(engine, projectId, scanId string) (AuditSession, error)
- func (c Cx1Client) GetAuditSessionFilters() (AuditSessionFilters, 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) GetClaims() Cx1Claims
- func (c Cx1Client) GetClientByID(id 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) GetClientVars() ClientVars
- func (c Cx1Client) GetClients() ([]OIDCClient, error)
- func (c Cx1Client) GetConfigurationByName(config *[]ConfigurationSetting, configKey string) *ConfigurationSetting
- func (c *Cx1Client) GetCurrentUser() (User, error)
- func (c Cx1Client) GetCx1QueryFromSAST(sastId uint64, language, group, name string, mapping *map[uint64]uint64, ...) *Query
- func (c Cx1Client) GetEntitiesAccessToResourceByID(resourceId, resourceType string) ([]AccessAssignment, 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 int) ([]Group, error)
- func (c Cx1Client) GetGroupMembers(group *Group) ([]User, error)
- func (c Cx1Client) GetGroupMembersByID(groupID string) ([]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) GetGroupsPIP() ([]Group, error)
- func (c Cx1Client) GetIAMRoleByName(name string) (Role, error)
- func (c Cx1Client) GetIAMRoles() ([]Role, error)
- func (c Cx1Client) GetImportByID(importID string) (DataImport, error)
- func (c Cx1Client) GetImportLogsByID(importID, engine string) ([]byte, error)
- func (c Cx1Client) GetImports() ([]DataImport, error)
- func (c Cx1Client) GetKICSResultsPredicatesByID(SimilarityID string, ProjectID string) ([]KICSResultsPredicates, error)
- func (c Cx1Client) GetLastScansByID(projectID string, limit int) ([]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 int, status []string) ([]Scan, error)
- func (c Cx1Client) GetLastScansFiltered(filter ScanFilter) ([]Scan, error)
- func (c Cx1Client) GetLicense() ASTLicense
- 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) GetPresetByID(id uint64) (Preset, error)
- func (c Cx1Client) GetPresetByName(name string) (Preset, error)
- func (c Cx1Client) GetPresetContents(p *Preset, qc *QueryCollection) error
- func (c Cx1Client) GetPresetCount() (uint64, error)
- func (c Cx1Client) GetPresetQueries() ([]Query, error)
- func (c Cx1Client) GetPresets(count uint64) ([]Preset, 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(projectname 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) GetProjects(limit uint64) ([]Project, error)
- func (c Cx1Client) GetProjectsByName(projectname string, limit uint64) ([]Project, error)
- func (c Cx1Client) GetProjectsByNameAndGroupID(projectName string, groupID string) ([]Project, error)
- func (c Cx1Client) GetQueries() (QueryCollection, error)
- func (c Cx1Client) GetQueriesByLevelID(level, levelId string) ([]Query, error)
- func (c Cx1Client) GetQueriesByLevelID_v310(level, levelId string) ([]AuditQuery_v310, error)
- func (c Cx1Client) GetQueries_v310() (QueryCollection, error)
- func (c Cx1Client) GetQueryByName_v310(level, levelid, language, group, query string) (AuditQuery_v310, 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) 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) GetSASTResultsPredicatesByID(SimilarityID string, ProjectID string) ([]SASTResultsPredicates, error)
- func (c Cx1Client) GetScanByID(scanID string) (Scan, error)
- func (c Cx1Client) GetScanConfigurationByID(projectID, scanID string) ([]ConfigurationSetting, error)
- func (c Cx1Client) GetScanLogsByID(scanID, engine string) ([]byte, error)
- func (c Cx1Client) GetScanMetadataByID(scanID string) (ScanMetadata, error)
- func (c Cx1Client) GetScanResultsByID(scanID string, limit uint64) (ScanResultSet, error)
- func (c Cx1Client) GetScanResultsCountByID(scanID string) (uint64, error)
- func (c Cx1Client) GetScanSASTResultSummary(results *ScanResultSet) ScanResultSummary
- func (c Cx1Client) GetScanSummariesByID(scanIDs []string) ([]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) ([]Scan, error)
- func (c Cx1Client) GetScansSummary() (ScanStatusSummary, error)
- func (c Cx1Client) GetServiceAccountByID(oidcId string) (User, error)
- func (c Cx1Client) GetSeverity(severity uint) string
- func (c Cx1Client) GetSeverityID(severity string) uint
- 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) GetUserByEmail(email string) (User, error)
- func (c Cx1Client) GetUserByID(userID string) (User, error)
- func (c Cx1Client) GetUserByUserName(name string) (User, error)
- func (c Cx1Client) GetUserGroups(user *User) ([]Group, error)
- func (c Cx1Client) GetUserIAMRoles(user *User) ([]Role, error)
- func (c Cx1Client) GetUserRoles(user *User) ([]Role, error)
- func (c Cx1Client) GetUsers() ([]User, error)
- func (c Cx1Client) GetUsersByUserName(search string) ([]User, error)
- func (c Cx1Client) GetVersion() (VersionInfo, 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() error
- func (c Cx1Client) IsEngineAllowed(engine string) bool
- 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 *QueryGroup) string
- func (c Cx1Client) QueryLanguageLink(q *QueryLanguage) string
- func (c Cx1Client) QueryLink(q *Query) 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) 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) RequestNewReportByID(scanID, projectID, branch, reportType string) (string, error)
- func (c Cx1Client) RequestNewReportByIDv2(scanID string, engines []string) (string, error)
- func (c Cx1Client) RoleLink(r *Role) string
- func (c Cx1Client) SaveClient(client OIDCClient) 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) ScanProjectZipByID(projectID, sourceUrl, branch string, settings []ScanConfiguration, ...) (Scan, error)
- func (c *Cx1Client) SetClientVars(clientvars ClientVars)
- func (c Cx1Client) SetGroupParent(g *Group, parent *Group) error
- 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) 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) UpdateGroup(g *Group) error
- func (c Cx1Client) UpdatePreset(preset *Preset) 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) UpdateQueries_v310(level, levelid string, queries []QueryUpdate_v310) error
- func (c Cx1Client) UpdateQuery(auditSession *AuditSession, query *Query) error
- func (c Cx1Client) UpdateQueryMetadata(auditSession *AuditSession, query *Query, metadata AuditQueryMetadata) (Query, error)
- func (c Cx1Client) UpdateQueryMetadataByKey(auditSession *AuditSession, queryKey string, metadata AuditQueryMetadata) (Query, error)
- func (c Cx1Client) UpdateQuerySource(auditSession *AuditSession, query *Query, source string) (Query, error)
- func (c Cx1Client) UpdateQuerySourceByKey(auditSession *AuditSession, queryKey, source string) (Query, error)
- func (c Cx1Client) UpdateQuery_v310(query AuditQuery_v310) 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) Whoami() (WhoAmI, error)
- type Cx1LongTime
- type DataImport
- type DataImportStatus
- type Group
- type KICSResultsPredicates
- type OIDCClient
- type OIDCClientScope
- type Preset
- type Project
- type ProjectBranchFilter
- type Query
- func (q *Query) CalculateEditorKey() string
- func (q *Query) CalculateQueryID() (uint64, error)
- func (q Query) GetMetadata() AuditQueryMetadata
- func (q *Query) MergeQuery(nq Query)
- func (q Query) String() string
- func (q Query) StringDetailed() string
- func (q Query) ToAuditQuery_v310() AuditQuery_v310
- type QueryCollection
- func (qc *QueryCollection) AddAuditQueries_v310(queries *[]AuditQuery_v310)
- func (qc *QueryCollection) AddQueries(queries *[]Query)
- func (qc *QueryCollection) AddQuery(q Query)
- func (qc *QueryCollection) GetCustomQueryCollection() QueryCollection
- func (qc QueryCollection) GetQueryByID(qid uint64) *Query
- func (qc QueryCollection) GetQueryByLevelAndID(level, levelID string, qid uint64) *Query
- func (qc QueryCollection) GetQueryByLevelAndName(level, levelID, language, group, query string) *Query
- func (qc QueryCollection) GetQueryByName(language, group, query string) *Query
- func (qc *QueryCollection) GetQueryCount() uint
- func (qc QueryCollection) GetQueryLanguageByName(language string) *QueryLanguage
- func (qc *QueryCollection) UpdateNewQuery(query *Query) error
- type QueryGroup
- func (qg QueryGroup) GetQueryByID(qid uint64) *Query
- func (qg QueryGroup) GetQueryByLevelAndID(level, levelID string, qid uint64) *Query
- func (qg QueryGroup) GetQueryByLevelAndName(level, levelID, name string) *Query
- func (qg QueryGroup) GetQueryByName(name string) *Query
- func (q QueryGroup) String() string
- type QueryLanguage
- type QueryUpdateMetadata_v310
- type QueryUpdate_v310
- type ReportStatus
- type ResultsPredicatesBase
- type Role
- type RunningScan
- type SASTResultsPredicates
- type Scan
- type ScanConfiguration
- type ScanFilter
- type ScanKICSResult
- type ScanKICSResultData
- type ScanMetadata
- type ScanResultBase
- type ScanResultSet
- type ScanResultStatusSummary
- type ScanResultSummary
- type ScanSASTResult
- type ScanSASTResultData
- type ScanSASTResultDetails
- type ScanSASTResultNodes
- type ScanSCAContainerResult
- type ScanSCAContainerResultData
- type ScanSCAResult
- type ScanSCAResultCVSS
- type ScanSCAResultData
- type ScanSCAResultDetails
- type ScanSCAResultPackageData
- type ScanStatusDetails
- type ScanStatusSummary
- type ScanSummary
- 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 UserWithAttributes
- type VersionInfo
- type WhoAmI
- type WorkflowLog
Constants ¶
This section is empty.
Variables ¶
var AUDIT_QUERY_APPLICATION = "Team"
var AUDIT_QUERY_PRODUCT = "Cx"
var AUDIT_QUERY_PROJECT = "Project"
var AUDIT_QUERY_TENANT = "Corp"
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 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"`
}
type AccessibleResource ¶ added in v0.0.15
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"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
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) GetRuleByType ¶
func (a *Application) GetRuleByType(ruletype string) *ApplicationRule
func (*Application) RemoveRule ¶ added in v0.0.68
func (a *Application) RemoveRule(rule *ApplicationRule)
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 ApplicationRule ¶
func (*ApplicationRule) RemoveItem ¶ added in v0.0.70
func (ar *ApplicationRule) RemoveItem(item string)
type AuditPermissions ¶ added in v0.0.66
type AuditQuery ¶ added in v0.0.11
type AuditQuery struct {
Key string `json:"id"`
Name string
Level string
LevelID string
Path string
Source string
Metadata AuditQueryMetadata
}
func (*AuditQuery) CalculateEditorKey ¶ added in v0.0.66
func (q *AuditQuery) CalculateEditorKey() string
func (AuditQuery) CalculateQueryID ¶ added in v0.0.66
func (q AuditQuery) CalculateQueryID() (uint64, error)
func (AuditQuery) String ¶ added in v0.0.11
func (q AuditQuery) String() string
func (AuditQuery) ToQuery ¶ added in v0.0.66
func (q AuditQuery) ToQuery() Query
type AuditQueryMetadata ¶ added in v0.0.11
type AuditQueryMetadata 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 AuditQueryTree ¶ added in v0.0.66
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() Query
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() Query
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"`
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"`
ProjectID string `json:"-"`
ApplicationID string `json:"-"`
ScanID string `json:"-"`
Languages []string `json:"-"`
}
func (AuditSession) HasLanguage ¶ added in v0.0.67
func (s AuditSession) HasLanguage(language string) bool
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 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
ScanPollingMaxSeconds int
ScanPollingDelaySeconds int
ProjectApplicationLinkPollingMaxSeconds int
ProjectApplicationLinkPollingDelaySeconds int
}
type ConfigurationSetting ¶ added in v0.0.39
type ConfigurationSetting struct {
Key string `json:"key"`
Name string `json:"name"`
Category string `json:"category"`
OriginLevel string `json:"originLevel"`
Value string `json:"value"`
ValueType string `json:"valuetype"`
ValueTypeParams string `json:"valuetypeparams"`
AllowOverride bool `json:"allowOverride"`
}
type Cx1Cache ¶
type Cx1Cache struct {
ProjectRefresh bool
Projects []Project
GroupRefresh bool
Groups []Group
UserRefresh bool
Users []User
QueryRefresh bool
Queries QueryCollection
PresetRefresh bool
Presets []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) 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 ¶
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"`
UserID string `json:"sub"`
}
type Cx1Client ¶
type Cx1Client struct {
// contains filtered or unexported fields
}
func NewAPIKeyClient ¶
func NewAPIKeyClient(client *http.Client, base_url string, iam_url string, tenant string, api_key string, logger *logrus.Logger) (*Cx1Client, error)
Main entry for users of this client when using API Key
func NewClient ¶ added in v0.0.73
Convenience function that reads command-line flags to create the Cx1Client
func NewOAuthClient ¶
func NewOAuthClient(client *http.Client, base_url string, iam_url string, tenant string, client_id string, client_secret string, logger *logrus.Logger) (*Cx1Client, error)
Main entry for users of this client when using OAuth Client ID & Client Secret:
func (Cx1Client) AddAccessAssignment ¶ added in v0.0.15
func (c Cx1Client) AddAccessAssignment(access AccessAssignment) error
func (Cx1Client) AddAuthenticationProviderMapper ¶ added in v0.0.54
func (c Cx1Client) AddAuthenticationProviderMapper(mapper AuthenticationProviderMapper) error
func (Cx1Client) AddClientScopeByID ¶ added in v0.0.15
func (Cx1Client) AddKICSResultsPredicates ¶ added in v0.0.37
func (c Cx1Client) AddKICSResultsPredicates(predicates []KICSResultsPredicates) 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) AssignUserToGroupByID ¶
func (Cx1Client) AuditCreateSession ¶ added in v0.0.79
func (c Cx1Client) AuditCreateSession(engine, filter string) (AuditSession, error)
func (Cx1Client) AuditCreateSessionByID ¶ added in v0.0.11
func (c Cx1Client) AuditCreateSessionByID(engine, projectId, scanId string) (AuditSession, error)
func (Cx1Client) AuditDeleteSession ¶ added in v0.0.67
func (c Cx1Client) AuditDeleteSession(auditSession *AuditSession) error
func (Cx1Client) AuditGetRequestStatusByID ¶ added in v0.0.66
func (c Cx1Client) AuditGetRequestStatusByID(auditSession *AuditSession, requestId string) (bool, interface{}, error)
func (Cx1Client) AuditGetScanSourcesByID ¶ added in v0.0.66
func (c Cx1Client) AuditGetScanSourcesByID(auditSession *AuditSession) ([]AuditScanSourceFile, error)
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)
func (Cx1Client) AuditRequestStatusPollingByIDWithTimeout ¶ added in v0.0.68
func (c Cx1Client) AuditRequestStatusPollingByIDWithTimeout(auditSession *AuditSession, requestId string, delaySeconds, maxSeconds int) (interface{}, error)
func (Cx1Client) AuditRunScanByID ¶ added in v0.0.11
func (c Cx1Client) AuditRunScanByID(auditSession *AuditSession) error
func (Cx1Client) AuditSessionKeepAlive ¶ added in v0.0.11
func (c Cx1Client) AuditSessionKeepAlive(auditSession *AuditSession) error
func (Cx1Client) CancelScanByID ¶ added in v0.0.50
func (Cx1Client) CheckAccessToResourceByID ¶ added in v0.0.15
func (Cx1Client) CheckAccessibleResources ¶ added in v0.0.15
func (Cx1Client) CreateAppRole ¶
func (Cx1Client) CreateApplication ¶
func (c Cx1Client) CreateApplication(appname string) (Application, error)
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 (Cx1Client) CreateNewQuery ¶ added in v0.0.66
func (c Cx1Client) CreateNewQuery(auditSession *AuditSession, query Query) (Query, error)
func (Cx1Client) CreatePreset ¶
func (Cx1Client) CreateProject ¶
func (c Cx1Client) CreateProject(projectname string, cx1_group_ids []string, tags map[string]string) (Project, error)
Projects
func (Cx1Client) CreateProjectInApplication ¶ added in v0.0.31
func (Cx1Client) CreateQueryOverride ¶ added in v0.0.66
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) DeleteAccessAssignmentByID ¶ added in v0.0.15
func (Cx1Client) DeleteApplication ¶
func (c Cx1Client) DeleteApplication(application *Application) error
func (Cx1Client) DeleteApplicationByID ¶
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
func (Cx1Client) DeleteGroup ¶
func (Cx1Client) DeletePreset ¶
func (Cx1Client) DeleteProject ¶
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
func (Cx1Client) DeleteUser ¶
func (Cx1Client) DeleteUserByID ¶
func (Cx1Client) DownloadReport ¶
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) GetAccessAssignmentByID ¶ added in v0.0.15
func (c Cx1Client) GetAccessAssignmentByID(entityId, resourceId string) (AccessAssignment, error)
func (Cx1Client) GetAllPresets ¶ added in v0.0.10
convenience
func (Cx1Client) GetAppRoles ¶
func (Cx1Client) GetApplicationByID ¶ added in v0.0.70
func (c Cx1Client) GetApplicationByID(id string) (Application, error)
func (Cx1Client) GetApplicationByName ¶
func (c Cx1Client) GetApplicationByName(name string) (Application, error)
func (Cx1Client) GetApplicationCount ¶
convenience
func (Cx1Client) GetApplicationCountByName ¶
func (Cx1Client) GetApplications ¶
func (c Cx1Client) GetApplications(limit uint) ([]Application, error)
Applications
func (Cx1Client) GetApplicationsByName ¶
func (c Cx1Client) GetApplicationsByName(name string, limit uint64) ([]Application, error)
func (Cx1Client) GetAuditQueriesByLevelID ¶ added in v0.0.66
func (c Cx1Client) GetAuditQueriesByLevelID(auditSession *AuditSession, level, levelId string) ([]Query, 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-level queries QueryTypeTenant(), QueryTypeTenant() : same value for both when retrieving tenant-level queries QueryTypeApplication(), application.ApplicationID : when retrieving application-level queries QueryTypeProject(), project.ProjectID : when retrieving project-level queries
The resulting array of queries should be merged into a QueryCollection object returned by the GetQueries function.
func (Cx1Client) GetAuditQueryByKey ¶ added in v0.0.66
func (c Cx1Client) GetAuditQueryByKey(auditSession *AuditSession, key string) (Query, error)
func (Cx1Client) GetAuditSessionByID ¶ added in v0.0.11
func (c Cx1Client) GetAuditSessionByID(engine, projectId, scanId string) (AuditSession, error)
Convenience function
func (Cx1Client) GetAuditSessionFilters ¶ added in v0.0.79
func (c Cx1Client) GetAuditSessionFilters() (AuditSessionFilters, error)
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) GetClientByID ¶ added in v0.0.22
func (c Cx1Client) GetClientByID(id string) (OIDCClient, error)
func (Cx1Client) GetClientByName ¶
func (c Cx1Client) GetClientByName(clientName string) (OIDCClient, error)
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) GetClientVars ¶ added in v0.0.19
func (c Cx1Client) GetClientVars() ClientVars
func (Cx1Client) GetConfigurationByName ¶ added in v0.0.39
func (c Cx1Client) GetConfigurationByName(config *[]ConfigurationSetting, configKey string) *ConfigurationSetting
func (*Cx1Client) GetCurrentUser ¶
func (Cx1Client) GetCx1QueryFromSAST ¶ added in v0.0.67
func (Cx1Client) GetEntitiesAccessToResourceByID ¶ added in v0.0.15
func (c Cx1Client) GetEntitiesAccessToResourceByID(resourceId, resourceType string) ([]AccessAssignment, error)
func (Cx1Client) GetGroupByName ¶
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
func (Cx1Client) GetGroupChildrenByID ¶ added in v0.0.82
func (Cx1Client) GetGroupMembers ¶ added in v0.0.62
func (Cx1Client) GetGroupMembersByID ¶ added in v0.0.62
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
func (Cx1Client) GetGroupsPIP ¶
func (Cx1Client) GetIAMRoles ¶
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) ([]KICSResultsPredicates, error)
func (Cx1Client) GetLastScansByID ¶
func (Cx1Client) GetLastScansByIDFiltered ¶ added in v0.0.13
func (c Cx1Client) GetLastScansByIDFiltered(projectID string, filter ScanFilter) ([]Scan, error)
func (Cx1Client) GetLastScansByStatus ¶
func (Cx1Client) GetLastScansByStatusAndID ¶
func (Cx1Client) GetLastScansFiltered ¶ added in v0.0.30
func (c Cx1Client) GetLastScansFiltered(filter ScanFilter) ([]Scan, error)
func (Cx1Client) GetLicense ¶ added in v0.0.40
func (c Cx1Client) GetLicense() ASTLicense
func (Cx1Client) GetOrCreateApplicationByName ¶
func (c Cx1Client) GetOrCreateApplicationByName(name string) (Application, error)
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)
func (Cx1Client) GetPresetContents ¶
func (c Cx1Client) GetPresetContents(p *Preset, qc *QueryCollection) error
func (Cx1Client) GetPresetCount ¶ added in v0.0.10
func (Cx1Client) GetPresetQueries ¶ added in v0.0.66
func (Cx1Client) GetProjectBranchesByID ¶ added in v0.0.80
func (Cx1Client) GetProjectBranchesFiltered ¶ added in v0.0.80
func (c Cx1Client) GetProjectBranchesFiltered(filter ProjectBranchFilter) ([]string, error)
func (Cx1Client) GetProjectByID ¶
func (Cx1Client) GetProjectByName ¶
func (Cx1Client) GetProjectConfiguration ¶
func (Cx1Client) GetProjectConfigurationByID ¶
func (c Cx1Client) GetProjectConfigurationByID(projectID string) ([]ConfigurationSetting, error)
func (Cx1Client) GetProjectCountByName ¶
func (Cx1Client) GetProjectsByName ¶
func (Cx1Client) GetProjectsByNameAndGroupID ¶
func (Cx1Client) GetQueries ¶
func (c Cx1Client) GetQueries() (QueryCollection, error)
func (Cx1Client) GetQueriesByLevelID ¶ added in v0.0.12
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() (QueryCollection, 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) 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)
func (Cx1Client) GetRoleByClientIDAndName ¶
func (Cx1Client) GetRoleComposites ¶
func (Cx1Client) GetRoles ¶
convenience function to get both KeyCloak (system) roles plus the AST-APP-specific roles
func (Cx1Client) GetRolesByClientID ¶
func (Cx1Client) GetSASTResultsPredicatesByID ¶ added in v0.0.37
func (c Cx1Client) GetSASTResultsPredicatesByID(SimilarityID string, ProjectID string) ([]SASTResultsPredicates, error)
func (Cx1Client) GetScanConfigurationByID ¶ added in v0.0.39
func (c Cx1Client) GetScanConfigurationByID(projectID, scanID string) ([]ConfigurationSetting, error)
func (Cx1Client) GetScanLogsByID ¶
func (Cx1Client) GetScanMetadataByID ¶
func (c Cx1Client) GetScanMetadataByID(scanID string) (ScanMetadata, error)
func (Cx1Client) GetScanResultsByID ¶
func (c Cx1Client) GetScanResultsByID(scanID string, limit uint64) (ScanResultSet, error)
func (Cx1Client) GetScanResultsCountByID ¶
func (Cx1Client) GetScanSASTResultSummary ¶ added in v0.0.37
func (c Cx1Client) GetScanSASTResultSummary(results *ScanResultSet) ScanResultSummary
func (Cx1Client) GetScanSummariesByID ¶ added in v0.0.49
func (c Cx1Client) GetScanSummariesByID(scanIDs []string) ([]ScanSummary, error)
func (Cx1Client) GetScanSummaryByID ¶
func (c Cx1Client) GetScanSummaryByID(scanID string) (ScanSummary, error)
func (Cx1Client) GetScanWorkflowByID ¶ added in v0.0.11
func (c Cx1Client) GetScanWorkflowByID(scanID string) ([]WorkflowLog, error)
func (Cx1Client) GetScansByProjectIDAndBranch ¶ added in v0.0.80
func (Cx1Client) GetScansByStatus ¶ added in v0.0.49
func (Cx1Client) GetScansFiltered ¶ added in v0.0.49
func (c Cx1Client) GetScansFiltered(filter ScanFilter) ([]Scan, error)
func (Cx1Client) GetScansSummary ¶ added in v0.0.48
func (c Cx1Client) GetScansSummary() (ScanStatusSummary, error)
func (Cx1Client) GetServiceAccountByID ¶ added in v0.0.15
func (Cx1Client) GetSeverity ¶ added in v0.0.66
func (Cx1Client) GetSeverityID ¶ added in v0.0.12
convenience
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)
func (Cx1Client) GetUploadURL ¶
func (Cx1Client) GetUserAgent ¶ added in v0.0.80
func (Cx1Client) GetUserByUserName ¶
func (Cx1Client) GetUserRoles ¶
New generic functions for roles for convenience
func (Cx1Client) GetUsersByUserName ¶ added in v0.0.54
func (Cx1Client) GetVersion ¶ added in v0.0.55
func (c Cx1Client) GetVersion() (VersionInfo, error)
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
func (Cx1Client) PresetLink ¶
func (Cx1Client) ProjectInApplicationPollingByID ¶ added in v0.0.36
func (Cx1Client) ProjectInApplicationPollingByIDWithTimeout ¶ added in v0.0.36
func (Cx1Client) ProjectLink ¶
func (Cx1Client) PutFileRaw ¶ added in v0.0.45
func (Cx1Client) QueryGroupLink ¶
func (c Cx1Client) QueryGroupLink(q *QueryGroup) string
func (Cx1Client) QueryLanguageLink ¶
func (c Cx1Client) QueryLanguageLink(q *QueryLanguage) 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) RemoveRoleComposites ¶
func (Cx1Client) RemoveUserAppRoles ¶
func (Cx1Client) RemoveUserFromGroupByID ¶
func (Cx1Client) RemoveUserIAMRoles ¶
func (Cx1Client) RemoveUserRoles ¶
func (Cx1Client) ReportPollingByID ¶ added in v0.0.13
convenience
func (Cx1Client) RequestNewReportByID ¶
func (Cx1Client) RequestNewReportByIDv2 ¶ added in v0.0.82
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
func (Cx1Client) SaveClient ¶ added in v0.0.66
func (c Cx1Client) SaveClient(client OIDCClient) error
The SaveClient 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) ScanPollingDetailed ¶ added in v0.0.12
func (Cx1Client) ScanPollingWithTimeout ¶ added in v0.0.25
func (Cx1Client) ScanProjectByID ¶
func (c Cx1Client) ScanProjectByID(projectID, sourceUrl, branch, scanType string, settings []ScanConfiguration, tags map[string]string) (Scan, error)
convenience function
func (Cx1Client) ScanProjectGitByID ¶
func (Cx1Client) ScanProjectZipByID ¶
func (*Cx1Client) SetClientVars ¶ added in v0.0.19
func (c *Cx1Client) SetClientVars(clientvars ClientVars)
func (Cx1Client) SetProjectBranchByID ¶
func (Cx1Client) SetProjectFileFilterByID ¶
func (Cx1Client) SetProjectLanguageModeByID ¶
func (Cx1Client) SetProjectPresetByID ¶
func (Cx1Client) SetProjectRepositoryByID ¶ added in v0.0.56
func (Cx1Client) SetUserAgent ¶ added in v0.0.80
func (Cx1Client) SetUserAgentFirefox ¶ added in v0.0.80
func (c Cx1Client) SetUserAgentFirefox()
this function set 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
func (Cx1Client) UpdateGroup ¶
func (Cx1Client) UpdatePreset ¶
func (Cx1Client) UpdateProject ¶
func (Cx1Client) UpdateProjectConfiguration ¶
func (c Cx1Client) UpdateProjectConfiguration(project *Project, settings []ConfigurationSetting) error
UpdateProjectConfiguration updates the configuration of the project addressed by projectID
func (Cx1Client) UpdateProjectConfigurationByID ¶
func (c Cx1Client) UpdateProjectConfigurationByID(projectID string, settings []ConfigurationSetting) error
func (Cx1Client) UpdateQueries_v310 ¶ added in v0.0.66
func (c Cx1Client) UpdateQueries_v310(level, levelid string, queries []QueryUpdate_v310) error
func (Cx1Client) UpdateQuery ¶ added in v0.0.11
func (c Cx1Client) UpdateQuery(auditSession *AuditSession, query *Query) error
convenience/wrapper function
func (Cx1Client) UpdateQueryMetadata ¶ added in v0.0.67
func (c Cx1Client) UpdateQueryMetadata(auditSession *AuditSession, query *Query, metadata AuditQueryMetadata) (Query, error)
func (Cx1Client) UpdateQueryMetadataByKey ¶ added in v0.0.66
func (c Cx1Client) UpdateQueryMetadataByKey(auditSession *AuditSession, queryKey string, metadata AuditQueryMetadata) (Query, error)
This function will update the query metadata, however currently only the Severity of a query can be changed. Changes to CWE, description, and other fields will not take effect. Also, the data returned by the query-editor api does not include the query ID, so it will be 0. Use "UpdateQueryMetadata" wrapper instead to address that.
func (Cx1Client) UpdateQuerySource ¶ added in v0.0.67
func (Cx1Client) UpdateQuerySourceByKey ¶ added in v0.0.66
func (c Cx1Client) UpdateQuerySourceByKey(auditSession *AuditSession, queryKey, source string) (Query, error)
The data returned by the query-editor api does not include the query ID, so it will be 0. Use "UpdateQueryMetadata" wrapper instead to address that.
func (Cx1Client) UpdateQuery_v310 ¶ added in v0.0.66
func (c Cx1Client) UpdateQuery_v310(query AuditQuery_v310) error
updating queries via PUT is possible, but only allows changing the source code, not metadata around each query. this will be fixed in the future PUT is the only option to create an override on the project-level (and maybe in the future on application-level)
func (Cx1Client) UpdateUser ¶
func (Cx1Client) UploadBytes ¶ added in v0.0.9
creates upload URL, uploads, returns upload URL
func (Cx1Client) UploadBytesForProjectByID ¶ added in v0.0.9
func (Cx1Client) UserIsTenantOwner ¶ added in v0.0.55
type Cx1LongTime ¶ added in v0.0.74
func (*Cx1LongTime) UnmarshalJSON ¶ added in v0.0.74
func (ct *Cx1LongTime) UnmarshalJSON(b []byte) (err error)
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 Group ¶
type Group struct {
GroupID string `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
SubGroups []Group `json:"subGroups"`
SubGroupCount int `json:"subGroupCount"`
ClientRoles map[string][]string `json:"clientRoles"`
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 KICSResultsPredicates ¶ added in v0.0.37
type KICSResultsPredicates 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:"-"`
Creator string `json:"-"`
OIDCClientRaw map[string]interface{} `json:"-"`
}
func (OIDCClient) String ¶ added in v0.0.54
func (client OIDCClient) String() string
type OIDCClientScope ¶ added in v0.0.15
type Preset ¶
type Preset struct {
PresetID uint64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Custom bool `json:"custom"`
QueryIDs []uint64
Filled bool
Queries []Query `json:"-"`
}
func (*Preset) AddQueryID ¶
func (*Preset) LinkQueries ¶ added in v0.0.59
func (p *Preset) LinkQueries(qc *QueryCollection)
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"`
Applications []string `json:"applicationIds"`
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:"-"`
}
func (*Project) AssignGroup ¶
func (Project) GetConfigurationByName ¶ added in v0.0.9
func (p Project) GetConfigurationByName(configKey string) *ConfigurationSetting
type ProjectBranchFilter ¶ added in v0.0.80
type ProjectBranchFilter struct {
ProjectID string `json:"project-id,omitempty"`
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
Name string `json:"branch-name,omitempty"`
}
func (ProjectBranchFilter) AddURLValues ¶ added in v0.0.80
func (f ProjectBranchFilter) AddURLValues(params *url.Values)
type Query ¶
type Query 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 (*Query) CalculateEditorKey ¶ added in v0.0.66
func (*Query) CalculateQueryID ¶ added in v0.0.66
func (Query) GetMetadata ¶ added in v0.0.66
func (q Query) GetMetadata() AuditQueryMetadata
func (*Query) MergeQuery ¶ added in v0.0.66
func (Query) StringDetailed ¶ added in v0.0.66
func (Query) ToAuditQuery_v310 ¶ added in v0.0.69
func (q Query) ToAuditQuery_v310() AuditQuery_v310
type QueryCollection ¶
type QueryCollection struct {
QueryLanguages []QueryLanguage
}
func (*QueryCollection) AddAuditQueries_v310 ¶ added in v0.0.66
func (qc *QueryCollection) AddAuditQueries_v310(queries *[]AuditQuery_v310)
func (*QueryCollection) AddQueries ¶ added in v0.0.66
func (qc *QueryCollection) AddQueries(queries *[]Query)
func (*QueryCollection) AddQuery ¶ added in v0.0.66
func (qc *QueryCollection) AddQuery(q Query)
func (*QueryCollection) GetCustomQueryCollection ¶ added in v0.0.66
func (qc *QueryCollection) GetCustomQueryCollection() QueryCollection
func (QueryCollection) GetQueryByID ¶
func (qc QueryCollection) GetQueryByID(qid uint64) *Query
func (QueryCollection) GetQueryByLevelAndID ¶ added in v0.0.66
func (qc QueryCollection) GetQueryByLevelAndID(level, levelID string, qid uint64) *Query
func (QueryCollection) GetQueryByLevelAndName ¶ added in v0.0.66
func (qc QueryCollection) GetQueryByLevelAndName(level, levelID, language, group, query string) *Query
func (QueryCollection) GetQueryByName ¶
func (qc QueryCollection) GetQueryByName(language, group, query string) *Query
func (*QueryCollection) GetQueryCount ¶ added in v0.0.66
func (qc *QueryCollection) GetQueryCount() uint
func (QueryCollection) GetQueryLanguageByName ¶
func (qc QueryCollection) GetQueryLanguageByName(language string) *QueryLanguage
func (*QueryCollection) UpdateNewQuery ¶ added in v0.0.66
func (qc *QueryCollection) UpdateNewQuery(query *Query) error
This function may not be necessary in the future, it is used to fill in missing fields when creating new queries
type QueryGroup ¶
func (QueryGroup) GetQueryByID ¶ added in v0.0.66
func (qg QueryGroup) GetQueryByID(qid uint64) *Query
func (QueryGroup) GetQueryByLevelAndID ¶ added in v0.0.66
func (qg QueryGroup) GetQueryByLevelAndID(level, levelID string, qid uint64) *Query
func (QueryGroup) GetQueryByLevelAndName ¶ added in v0.0.66
func (qg QueryGroup) GetQueryByLevelAndName(level, levelID, name string) *Query
func (QueryGroup) GetQueryByName ¶
func (qg QueryGroup) GetQueryByName(name string) *Query
func (QueryGroup) String ¶
func (q QueryGroup) String() string
type QueryLanguage ¶
type QueryLanguage struct {
Name string
QueryGroups []QueryGroup
}
func (QueryLanguage) GetQueryByID ¶ added in v0.0.66
func (ql QueryLanguage) GetQueryByID(qid uint64) *Query
func (QueryLanguage) GetQueryByLevelAndID ¶ added in v0.0.66
func (ql QueryLanguage) GetQueryByLevelAndID(level, levelID string, qid uint64) *Query
func (QueryLanguage) GetQueryGroupByName ¶
func (ql QueryLanguage) GetQueryGroupByName(name string) *QueryGroup
func (QueryLanguage) String ¶
func (q QueryLanguage) String() string
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 ResultsPredicatesBase ¶ added in v0.0.37
type ResultsPredicatesBase struct {
PredicateID string `json:"ID"`
SimilarityID string `json:"similarityId"`
ProjectID string `json:"projectId"`
State string `json:"state"`
Comment string `json:"comment"`
Severity string `json:"severity"`
CreatedBy string `json:"createdBy"`
CreatedAt string `json:"createdAt"`
}
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 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"`
}
type ScanConfiguration ¶
type ScanFilter ¶ added in v0.0.13
type ScanFilter struct {
ProjectID string `json:"project-id"`
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
Sort string `json:"sort,omitempty"`
TagKeys []string `json:"tags-keys,omitempty"`
TagValues []string `json:"tags-values,omitempty"`
Statuses []string `json:"statuses,omitempty"`
Branches []string `json:"branches,omitempty"`
FromDate time.Time `json:"from-date,omitempty"`
ToDate time.Time `json:"to-date,omitempty"`
}
func (ScanFilter) AddURLValues ¶ added in v0.0.13
func (f ScanFilter) AddURLValues(params *url.Values)
type ScanKICSResult ¶ added in v0.0.34
type ScanKICSResult struct {
ScanResultBase
Data ScanKICSResultData
}
func (ScanKICSResult) CreateResultsPredicate ¶ added in v0.0.37
func (r ScanKICSResult) CreateResultsPredicate(projectId string) KICSResultsPredicates
func (ScanKICSResult) String ¶ added in v0.0.34
func (r ScanKICSResult) String() string
type ScanKICSResultData ¶ added in v0.0.34
type ScanMetadata ¶
type ScanResultBase ¶ added in v0.0.37
type ScanResultBase struct {
Type string
ResultID string `json:"id"`
SimilarityID string `json:"similarityId"`
Status string
State string
Severity string
ConfidenceLevel int `json:"confidenceLevel"`
CreatedAt string `json:"created"`
FirstFoundAt string
FoundAt string
FirstScanId string
Description string
}
generic data common to all
type ScanResultSet ¶ added in v0.0.34
type ScanResultSet struct {
SAST []ScanSASTResult
SCA []ScanSCAResult
SCAContainer []ScanSCAContainerResult
KICS []ScanKICSResult
}
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 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 string) SASTResultsPredicates
convenience function
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 ScanSCAContainerResult ¶ added in v0.0.46
type ScanSCAContainerResult struct {
ScanResultBase
Data ScanSCAContainerResultData `json:"data"`
VulnerabilityDetails ScanSCAResultDetails
}
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 []?
//SinkFileCounters []?
LanguageCounters []struct {
Language string
Counter uint64
}
ComplianceCounters []struct {
Compliance string
Counter uint64
}
SeverityCounters []struct {
Severity string
Counter uint64
}
StatusCounters []struct {
Status string
Counter uint64
}
StateCounters []struct {
State string
Counter uint64
}
TotalCounter uint64
FilesScannedCounter uint64
}
}
Very simplified for now
func (*ScanSummary) TotalCount ¶
func (s *ScanSummary) TotalCount() uint64
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 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
func (VersionInfo) CheckCxOne ¶ added in v0.0.66
func (v VersionInfo) CheckCxOne(version string) int
version check returns -1 (current cx1 version lower), 0 (equal), 1 (current cx1 version greater)
func (VersionInfo) String ¶ added in v0.0.55
func (v VersionInfo) String() string