Documentation
¶
Index ¶
- func ShortenGUID(guid string) string
- type Application
- type ApplicationRule
- type Cx1Cache
- 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) PresetSummary() string
- func (c *Cx1Cache) ProjectSummary() string
- func (c *Cx1Cache) QuerySummary() string
- func (c *Cx1Cache) Refresh(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 Cx1Client
- func (c *Cx1Client) AddResultsPredicates(predicates []ResultsPredicates) error
- func (c *Cx1Client) AddRoleComposites(role *Role, roles *[]Role) error
- func (c *Cx1Client) AddRolesToGroupByID(g *Group, clientRoles map[string][]string) error
- func (c *Cx1Client) AddUserASTRoleMappings(userID string, roles []Role) error
- func (c *Cx1Client) AddUserAppRoles(user *User, roles *[]Role) error
- func (c *Cx1Client) AddUserIAMRoles(user *User, roles *[]Role) error
- func (c *Cx1Client) AddUserRoleMappings(userID string, clientID string, roles []Role) error
- func (c *Cx1Client) AddUserRoles(user *User, roles *[]Role) error
- func (c *Cx1Client) AssignUserToGroup(user *User, groupId string) error
- func (c *Cx1Client) AssignUserToGroupByID(user *User, groupId string) error
- func (c *Cx1Client) CreateASTRole(roleName, createdBy string) (Role, error)
- func (c *Cx1Client) CreateAppRole(roleName, createdBy string) (Role, error)
- func (c *Cx1Client) CreateApplication(appname string) (Application, error)
- func (c *Cx1Client) CreateChildGroup(parentGroup *Group, childGroupName string) (Group, error)
- func (c *Cx1Client) CreateGroup(groupname string) (Group, 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) CreateUser(newuser User) (User, error)
- func (c *Cx1Client) DeleteApplication(applicationId string) error
- func (c *Cx1Client) DeleteApplicationByID(applicationId 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) DeleteRoleByID(roleId string) error
- func (c *Cx1Client) DeleteRolesFromGroupByID(g *Group, clientRoles map[string][]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) GetASTAppID() string
- func (c *Cx1Client) GetASTRoleByName(name string) (Role, error)
- func (c *Cx1Client) GetASTRoles() ([]Role, error)
- func (c *Cx1Client) GetAppRoleByName(name string) (Role, error)
- func (c *Cx1Client) GetAppRoles() ([]Role, 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) GetClientByName(clientName string) (KeyCloakClient, error)
- func (c *Cx1Client) GetClients() ([]KeyCloakClient, error)
- func (c *Cx1Client) GetCombinedRoleByName(name string) (Role, error)
- func (c *Cx1Client) GetCombinedRoles() ([]Role, error)
- func (c *Cx1Client) GetCurrentUser() (User, error)
- func (c *Cx1Client) GetGroupByID(groupID string) (Group, error)
- func (c *Cx1Client) GetGroupByName(groupname string) (Group, 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) GetKeyCloakRoleByName(name string) (Role, error)
- func (c *Cx1Client) GetKeyCloakRoles() ([]Role, error)
- func (c *Cx1Client) GetLastScans(projectID string, limit int) ([]Scan, error)
- func (c *Cx1Client) GetLastScansByID(projectID string, limit int) ([]Scan, error)
- func (c *Cx1Client) GetLastScansByStatus(projectID string, limit int, status []string) ([]Scan, error)
- func (c *Cx1Client) GetLastScansByStatusAndID(projectID string, limit int, status []string) ([]Scan, error)
- func (c *Cx1Client) GetOrCreateApplication(name string) (Application, error)
- func (c *Cx1Client) GetOrCreateApplicationByName(name string) (Application, error)
- func (c *Cx1Client) GetOrCreateGroup(name string) (Group, error)
- func (c *Cx1Client) GetOrCreateGroupByName(name string) (Group, error)
- func (c *Cx1Client) GetOrCreateProject(name string) (Project, error)
- func (c *Cx1Client) GetOrCreateProjectByName(name string) (Project, 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) GetPresets() ([]Preset, error)
- func (c *Cx1Client) GetProjectByID(projectID string) (Project, error)
- func (c *Cx1Client) GetProjectByName(projectname string) (Project, error)
- func (c *Cx1Client) GetProjectConfiguration(projectID string) ([]ProjectConfigurationSetting, error)
- func (c *Cx1Client) GetProjectConfigurationByID(projectID string) ([]ProjectConfigurationSetting, 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) GetProjectsByNameAndGroup(projectName string, groupID string) ([]Project, error)
- func (c *Cx1Client) GetProjectsByNameAndGroupID(projectName string, groupID string) ([]Project, error)
- func (c *Cx1Client) GetQueries() (QueryCollection, error)
- func (c *Cx1Client) GetQueryByID(qid uint64) (Query, error)
- func (c *Cx1Client) GetReportStatus(reportID string) (ReportStatus, error)
- func (c *Cx1Client) GetReportStatusByID(reportID string) (ReportStatus, error)
- func (c *Cx1Client) GetResultsPredicates(SimilarityID int64, ProjectID string) ([]ResultsPredicates, error)
- func (c *Cx1Client) GetResultsPredicatesByID(SimilarityID int64, ProjectID string) ([]ResultsPredicates, error)
- func (c *Cx1Client) GetRoleByClientAndName(clientId string, name string) (Role, 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) GetRolesByClient(clientId string) ([]Role, error)
- func (c *Cx1Client) GetRolesByClientID(clientId string) ([]Role, error)
- func (c *Cx1Client) GetScan(scanID string) (Scan, error)
- func (c *Cx1Client) GetScanByID(scanID string) (Scan, error)
- func (c *Cx1Client) GetScanLogs(scanID, engine string) ([]byte, error)
- func (c *Cx1Client) GetScanLogsByID(scanID, engine string) ([]byte, error)
- func (c *Cx1Client) GetScanMetadata(scanID string) (ScanMetadata, error)
- func (c *Cx1Client) GetScanMetadataByID(scanID string) (ScanMetadata, error)
- func (c *Cx1Client) GetScanResultSummary(results []ScanResult) ScanResultSummary
- func (c *Cx1Client) GetScanResults(scanID string, limit uint64) ([]ScanResult, error)
- func (c *Cx1Client) GetScanResultsByID(scanID string, limit uint64) ([]ScanResult, error)
- func (c *Cx1Client) GetScanResultsCount(scanID string) (uint64, error)
- func (c *Cx1Client) GetScanResultsCountByID(scanID string) (uint64, error)
- func (c *Cx1Client) GetScanSummary(scanID string) (ScanSummary, error)
- func (c *Cx1Client) GetScanSummaryByID(scanID string) (ScanSummary, error)
- func (c *Cx1Client) GetTenantID() string
- func (c *Cx1Client) GetUploadURL() (string, error)
- func (c *Cx1Client) GetUserASTRoleMappings(userID string) ([]Role, error)
- 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) GetUserRoleMappings(userID string, clientID string) ([]Role, error)
- func (c *Cx1Client) GetUserRoles(user *User) ([]Role, error)
- func (c *Cx1Client) GetUsers() ([]User, error)
- func (c *Cx1Client) GroupLink(g *Group) string
- func (c *Cx1Client) PresetLink(p *Preset) string
- func (c *Cx1Client) ProjectLink(p *Project) string
- func (c *Cx1Client) PutFile(URL string, filename string) (string, 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) RemoveRoleComposites(role *Role, roles *[]Role) error
- func (c *Cx1Client) RemoveUserASTRoleMappings(userID string, roles []Role) error
- func (c *Cx1Client) RemoveUserAppRoles(user *User, roles *[]Role) error
- func (c *Cx1Client) RemoveUserFromGroup(user *User, groupId string) error
- func (c *Cx1Client) RemoveUserFromGroupByID(user *User, groupId string) error
- func (c *Cx1Client) RemoveUserIAMRoles(user *User, roles *[]Role) error
- func (c *Cx1Client) RemoveUserRoleMappings(userID string, clientID string, roles []Role) error
- func (c *Cx1Client) RemoveUserRoles(user *User, roles *[]Role) error
- func (c *Cx1Client) RequestNewReport(scanID, projectID, branch, reportType string) (string, error)
- func (c *Cx1Client) RequestNewReportByID(scanID, projectID, branch, reportType string) (string, error)
- func (c *Cx1Client) RoleLink(r *Role) string
- func (c *Cx1Client) ScanPolling(s *Scan) (Scan, error)
- func (c *Cx1Client) ScanProject(projectID, sourceUrl, branch, scanType string, settings []ScanConfiguration, ...) (Scan, error)
- func (c *Cx1Client) ScanProjectByID(projectID, sourceUrl, branch, scanType string, settings []ScanConfiguration, ...) (Scan, error)
- func (c *Cx1Client) ScanProjectGit(projectID, repoUrl, branch string, settings []ScanConfiguration, ...) (Scan, error)
- func (c *Cx1Client) ScanProjectGitByID(projectID, repoUrl, branch string, settings []ScanConfiguration, ...) (Scan, error)
- func (c *Cx1Client) ScanProjectZip(projectID, sourceUrl, branch string, settings []ScanConfiguration, ...) (Scan, error)
- func (c *Cx1Client) ScanProjectZipByID(projectID, sourceUrl, branch string, settings []ScanConfiguration, ...) (Scan, error)
- func (c *Cx1Client) SetGroupParent(g *Group, parent *Group) error
- func (c *Cx1Client) SetProjectBranch(projectID, branch string, allowOverride bool) error
- func (c *Cx1Client) SetProjectBranchByID(projectID, branch string, allowOverride bool) error
- func (c *Cx1Client) SetProjectFileFilter(projectID, filter string, allowOverride bool) error
- func (c *Cx1Client) SetProjectFileFilterByID(projectID, filter string, allowOverride bool) error
- func (c *Cx1Client) SetProjectLanguageMode(projectID, languageMode string, allowOverride bool) error
- func (c *Cx1Client) SetProjectLanguageModeByID(projectID, languageMode string, allowOverride bool) error
- func (c *Cx1Client) SetProjectPreset(projectID, presetName string, allowOverride bool) error
- func (c *Cx1Client) SetProjectPresetByID(projectID, presetName string, allowOverride bool) 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(projectID string, settings []ProjectConfigurationSetting) error
- func (c *Cx1Client) UpdateProjectConfigurationByID(projectID string, settings []ProjectConfigurationSetting) error
- func (c *Cx1Client) UpdateUser(user *User) error
- func (c *Cx1Client) UserLink(u *User) string
- type Group
- type KeyCloakClient
- type Preset
- type Project
- type ProjectConfigurationSetting
- type Query
- type QueryCollection
- type QueryGroup
- type QueryLanguage
- type ReportStatus
- type ResultsPredicates
- type Role
- type RunningScan
- type Scan
- type ScanConfiguration
- type ScanMetadata
- type ScanResult
- type ScanResultData
- type ScanResultDetails
- type ScanResultNodes
- type ScanResultStatusSummary
- type ScanResultSummary
- type ScanStatusDetails
- type ScanSummary
- type Status
- type User
- func (u *User) HasRole(role *Role) bool
- func (u *User) HasRoleByID(roleID string) bool
- func (u *User) HasRoleByName(role string) bool
- func (u *User) IsInGroup(group *Group) bool
- func (u *User) IsInGroupByID(groupId string) bool
- func (u *User) IsInGroupByName(groupName string) bool
- func (u *User) String() string
- type WorkflowLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShortenGUID ¶
Types ¶
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"`
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)
func (*Application) GetRuleByType ¶
func (a *Application) GetRuleByType(ruletype string) *ApplicationRule
func (*Application) String ¶
func (a *Application) String() string
type ApplicationRule ¶
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
}
func (*Cx1Cache) GetProjectByName ¶
func (*Cx1Cache) GetQueryByNames ¶
func (*Cx1Cache) GetUserByString ¶
func (*Cx1Cache) GroupSummary ¶
func (*Cx1Cache) PresetSummary ¶
func (*Cx1Cache) ProjectSummary ¶
func (*Cx1Cache) QuerySummary ¶
func (*Cx1Cache) RefreshGroups ¶
func (*Cx1Cache) RefreshPresets ¶
func (*Cx1Cache) RefreshProjects ¶
func (*Cx1Cache) RefreshQueries ¶
func (*Cx1Cache) RefreshRoles ¶
func (*Cx1Cache) RefreshUsers ¶
func (*Cx1Cache) UserSummary ¶
type Cx1Client ¶
type Cx1Client struct {
// contains filtered or unexported fields
}
func NewAPIKeyClient ¶
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:
func (*Cx1Client) AddResultsPredicates ¶
func (c *Cx1Client) AddResultsPredicates(predicates []ResultsPredicates) error
results
func (*Cx1Client) AddRoleComposites ¶
func (*Cx1Client) AddRolesToGroupByID ¶
func (*Cx1Client) AddUserASTRoleMappings ¶
func (*Cx1Client) AddUserAppRoles ¶
func (*Cx1Client) AddUserIAMRoles ¶
func (*Cx1Client) AddUserRoleMappings ¶
func (*Cx1Client) AssignUserToGroup ¶
func (*Cx1Client) AssignUserToGroupByID ¶
func (*Cx1Client) CreateASTRole ¶
func (*Cx1Client) CreateAppRole ¶
func (*Cx1Client) CreateApplication ¶
func (c *Cx1Client) CreateApplication(appname string) (Application, error)
func (*Cx1Client) CreateChildGroup ¶
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) DeleteApplication ¶
func (*Cx1Client) DeleteApplicationByID ¶
func (*Cx1Client) DeleteGroup ¶
func (*Cx1Client) DeletePreset ¶
func (*Cx1Client) DeleteProject ¶
func (*Cx1Client) DeleteRoleByID ¶
func (*Cx1Client) DeleteRolesFromGroupByID ¶
func (*Cx1Client) DeleteUser ¶
func (*Cx1Client) DeleteUserByID ¶
func (*Cx1Client) DownloadReport ¶
func (*Cx1Client) GetASTRoleByName ¶
func (*Cx1Client) GetASTRoles ¶
func (*Cx1Client) GetAppRoleByName ¶
func (*Cx1Client) GetAppRoles ¶
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) GetClientByName ¶
func (c *Cx1Client) GetClientByName(clientName string) (KeyCloakClient, error)
func (*Cx1Client) GetClients ¶
func (c *Cx1Client) GetClients() ([]KeyCloakClient, error)
Roles and Clients
func (*Cx1Client) GetCombinedRoleByName ¶
func (*Cx1Client) GetCombinedRoles ¶
convenience function to get both KeyCloak (system) roles plus the AST-APP-specific roles
func (*Cx1Client) GetCurrentUser ¶
func (*Cx1Client) GetGroupByName ¶
func (*Cx1Client) GetGroupPIPByName ¶
func (*Cx1Client) GetGroupsByName ¶
func (*Cx1Client) GetGroupsPIP ¶
func (*Cx1Client) GetIAMRoleByName ¶
func (*Cx1Client) GetIAMRoles ¶
func (*Cx1Client) GetKeyCloakRoleByName ¶
func (*Cx1Client) GetKeyCloakRoles ¶
func (*Cx1Client) GetLastScans ¶
GetScans returns all scan status on the project addressed by projectID
func (*Cx1Client) GetLastScansByID ¶
func (*Cx1Client) GetLastScansByStatus ¶
func (c *Cx1Client) GetLastScansByStatus(projectID string, limit int, status []string) ([]Scan, error)
GetScans returns all scan status on the project addressed by projectID
func (*Cx1Client) GetLastScansByStatusAndID ¶
func (*Cx1Client) GetOrCreateApplication ¶
func (c *Cx1Client) GetOrCreateApplication(name string) (Application, error)
func (*Cx1Client) GetOrCreateApplicationByName ¶
func (c *Cx1Client) GetOrCreateApplicationByName(name string) (Application, error)
func (*Cx1Client) GetOrCreateGroup ¶
convenience
func (*Cx1Client) GetOrCreateGroupByName ¶
func (*Cx1Client) GetOrCreateProject ¶
func (*Cx1Client) GetOrCreateProjectByName ¶
func (*Cx1Client) GetPresetByName ¶
func (*Cx1Client) GetPresetContents ¶
func (c *Cx1Client) GetPresetContents(p *Preset, qc *QueryCollection) error
func (*Cx1Client) GetPresets ¶
func (*Cx1Client) GetProjectByID ¶
func (*Cx1Client) GetProjectByName ¶
func (*Cx1Client) GetProjectConfiguration ¶
func (c *Cx1Client) GetProjectConfiguration(projectID string) ([]ProjectConfigurationSetting, error)
func (*Cx1Client) GetProjectConfigurationByID ¶
func (c *Cx1Client) GetProjectConfigurationByID(projectID string) ([]ProjectConfigurationSetting, error)
func (*Cx1Client) GetProjectCount ¶
convenience
func (*Cx1Client) GetProjectCountByName ¶
func (*Cx1Client) GetProjectsByName ¶
func (*Cx1Client) GetProjectsByNameAndGroup ¶
func (*Cx1Client) GetProjectsByNameAndGroupID ¶
func (*Cx1Client) GetQueries ¶
func (c *Cx1Client) GetQueries() (QueryCollection, error)
func (*Cx1Client) GetReportStatus ¶
func (c *Cx1Client) GetReportStatus(reportID string) (ReportStatus, error)
func (*Cx1Client) GetReportStatusByID ¶
func (c *Cx1Client) GetReportStatusByID(reportID string) (ReportStatus, error)
func (*Cx1Client) GetResultsPredicates ¶
func (c *Cx1Client) GetResultsPredicates(SimilarityID int64, ProjectID string) ([]ResultsPredicates, error)
func (*Cx1Client) GetResultsPredicatesByID ¶
func (c *Cx1Client) GetResultsPredicatesByID(SimilarityID int64, ProjectID string) ([]ResultsPredicates, error)
func (*Cx1Client) GetRoleByClientAndName ¶
func (*Cx1Client) GetRoleByClientIDAndName ¶
func (*Cx1Client) GetRoleComposites ¶
func (*Cx1Client) GetRolesByClient ¶
func (*Cx1Client) GetRolesByClientID ¶
func (*Cx1Client) GetScanLogs ¶
func (*Cx1Client) GetScanLogsByID ¶
func (*Cx1Client) GetScanMetadata ¶
func (c *Cx1Client) GetScanMetadata(scanID string) (ScanMetadata, error)
func (*Cx1Client) GetScanMetadataByID ¶
func (c *Cx1Client) GetScanMetadataByID(scanID string) (ScanMetadata, error)
func (*Cx1Client) GetScanResultSummary ¶
func (c *Cx1Client) GetScanResultSummary(results []ScanResult) ScanResultSummary
func (*Cx1Client) GetScanResults ¶
func (c *Cx1Client) GetScanResults(scanID string, limit uint64) ([]ScanResult, error)
func (*Cx1Client) GetScanResultsByID ¶
func (c *Cx1Client) GetScanResultsByID(scanID string, limit uint64) ([]ScanResult, error)
func (*Cx1Client) GetScanResultsCount ¶
func (*Cx1Client) GetScanResultsCountByID ¶
func (*Cx1Client) GetScanSummary ¶
func (c *Cx1Client) GetScanSummary(scanID string) (ScanSummary, error)
func (*Cx1Client) GetScanSummaryByID ¶
func (c *Cx1Client) GetScanSummaryByID(scanID string) (ScanSummary, error)
func (*Cx1Client) GetTenantID ¶
func (*Cx1Client) GetUploadURL ¶
func (*Cx1Client) GetUserASTRoleMappings ¶
func (*Cx1Client) GetUserByUserName ¶
func (*Cx1Client) GetUserRoleMappings ¶
these functions to be deprecated/hidden in favor of simpler functions below
func (*Cx1Client) GetUserRoles ¶
New generic functions for roles for convenience
func (*Cx1Client) PresetLink ¶
func (*Cx1Client) ProjectLink ¶
func (*Cx1Client) QueryGroupLink ¶
func (c *Cx1Client) QueryGroupLink(q *QueryGroup) string
func (*Cx1Client) QueryLanguageLink ¶
func (c *Cx1Client) QueryLanguageLink(q *QueryLanguage) string
func (*Cx1Client) RemoveRoleComposites ¶
func (*Cx1Client) RemoveUserASTRoleMappings ¶
func (*Cx1Client) RemoveUserAppRoles ¶
func (*Cx1Client) RemoveUserFromGroup ¶
func (*Cx1Client) RemoveUserFromGroupByID ¶
func (*Cx1Client) RemoveUserIAMRoles ¶
func (*Cx1Client) RemoveUserRoleMappings ¶
func (*Cx1Client) RemoveUserRoles ¶
func (*Cx1Client) RequestNewReport ¶
Reports
func (*Cx1Client) RequestNewReportByID ¶
func (*Cx1Client) ScanProject ¶
func (c *Cx1Client) ScanProject(projectID, sourceUrl, branch, scanType string, settings []ScanConfiguration, tags map[string]string) (Scan, error)
convenience function
func (*Cx1Client) ScanProjectByID ¶
func (*Cx1Client) ScanProjectGit ¶
func (*Cx1Client) ScanProjectGitByID ¶
func (*Cx1Client) ScanProjectZip ¶
func (*Cx1Client) ScanProjectZipByID ¶
func (*Cx1Client) SetGroupParent ¶
func (*Cx1Client) SetProjectBranch ¶
func (*Cx1Client) SetProjectBranchByID ¶
func (*Cx1Client) SetProjectFileFilter ¶
func (*Cx1Client) SetProjectFileFilterByID ¶
func (*Cx1Client) SetProjectLanguageMode ¶
func (*Cx1Client) SetProjectLanguageModeByID ¶
func (*Cx1Client) SetProjectPreset ¶
func (*Cx1Client) SetProjectPresetByID ¶
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(projectID string, settings []ProjectConfigurationSetting) error
UpdateProjectConfiguration updates the configuration of the project addressed by projectID
func (*Cx1Client) UpdateProjectConfigurationByID ¶
func (c *Cx1Client) UpdateProjectConfigurationByID(projectID string, settings []ProjectConfigurationSetting) error
func (*Cx1Client) UpdateUser ¶
type Group ¶
type Group struct {
GroupID string `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
SubGroups []Group `json:"subGroups"`
ClientRoles map[string][]string `json:"clientRoles"`
Filled bool `json:"-"`
}
func (*Group) AddRoleByID ¶
func (*Group) RemoveRoleByID ¶
type KeyCloakClient ¶
type Preset ¶
type Preset struct {
PresetID uint64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Custom bool `json:"custom"`
QueryIDs []uint64 `json:"-"`
Filled bool `json:"-"`
Queries []Query
}
func (*Preset) AddQueryID ¶
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"`
Tags map[string]string `json:"tags"`
RepoUrl string `json:"repoUrl"`
MainBranch string `json:"mainBranch"`
Origin string `json:"origin"`
Criticality uint `json:"criticality"`
}
func (*Project) AssignGroup ¶
type ProjectConfigurationSetting ¶
type ProjectConfigurationSetting 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 Query ¶
type QueryCollection ¶
type QueryCollection struct {
QueryLanguages []QueryLanguage
}
func (*QueryCollection) GetQueryByID ¶
func (qc *QueryCollection) GetQueryByID(qid uint64) *Query
func (*QueryCollection) GetQueryByName ¶
func (qc *QueryCollection) GetQueryByName(language, group, query string) *Query
func (*QueryCollection) GetQueryLanguageByName ¶
func (qc *QueryCollection) GetQueryLanguageByName(language string) *QueryLanguage
type QueryGroup ¶
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) GetQueryGroupByName ¶
func (ql *QueryLanguage) GetQueryGroupByName(name string) *QueryGroup
func (*QueryLanguage) String ¶
func (q *QueryLanguage) String() string
type ReportStatus ¶
type ResultsPredicates ¶
type ResultsPredicates struct {
PredicateID string `json:"ID"`
SimilarityID int64 `json:"similarityId,string"`
ProjectID string `json:"projectId"`
State string `json:"state"`
Comment string `json:"comment"`
Severity string `json:"severity"`
CreatedBy string `json:"createdBy"`
CreatedAt string `json:"createdAt"`
}
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 (*Role) HasCategory ¶
type RunningScan ¶
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 ScanMetadata ¶
type ScanResult ¶
type ScanResult struct {
Type string
ResultID string `json:"id"`
SimilarityID int64 `json:"similarityId,string"`
Status string
State string
Severity string
CreatedAt string `json:"created"`
FirstFoundAt string
FoundAt string
FirstScanId string
Description string
Data ScanResultData
VulnerabilityDetails ScanResultDetails
}
func (ScanResult) String ¶
func (r ScanResult) String() string
type ScanResultData ¶
type ScanResultDetails ¶
type ScanResultNodes ¶
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 ScanStatusDetails ¶
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 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"`
Groups []Group `json:"-"` // only returned from regular /auth/realms/../user endpoint, as string IDs
Roles []Role `json:"-"` // only returned from regular /auth/realms/../user endpoint, as string IDs
}
func (*User) HasRoleByID ¶
func (*User) HasRoleByName ¶
func (*User) IsInGroupByID ¶
func (*User) IsInGroupByName ¶
type WorkflowLog ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.