public interface CxClient
| Modifier and Type | Method and Description |
|---|---|
Integer |
createProject(String ownerId,
String name)
Create Project under a given Owner Id team
|
Integer |
createScan(CxScanParams params,
String comment)
Create a scan based on the CxScanParams and return the scan Id
|
CxXMLResultsType |
createScanAndReport(CxScanParams params,
String comment)
Create a scan based on the CxScanParams and wait for the scan to complete, returning the result XML Jaxb object
|
ScanResults |
createScanAndReport(CxScanParams params,
String comment,
List<Filter> filters)
Create a scan based on the CxScanParams and return the ScanResults object based on filters
|
Integer |
createScanReport(Integer scanId)
Generate a scan report request (xml) based on ScanId
|
Integer |
createScanSetting(Integer projectId,
Integer presetId,
Integer engineConfigId)
Create Scan Settings
|
String |
createTeam(String parentTeamId,
String teamName)
Create team under given parentId - Will use REST API to create team for version 9.0+
|
String |
createTeamWS(String parentTeamId,
String teamName)
Create team under given parentId
|
void |
deleteProject(Integer projectId)
Delete a project by Id
|
void |
deleteScan(Integer scanId) |
void |
deleteTeam(String teamId)
Create team under given parentId - Will use REST API to create team for version 9.0+
|
void |
deleteTeamWS(String teamId)
Delete a team based on the name for a given parent team id
|
Map<String,String> |
getCustomFields(Integer projectId)
Returns custom field values read from a Checkmarx project, based on given projectId.
|
String |
getIssueDescription(Long scanId,
Long pathId) |
LocalDateTime |
getLastScanDate(Integer projectId)
Fetches the Timestamp of the last full scan
|
Integer |
getLastScanId(Integer projectId)
Get the last scan Id of a given project Id
|
CxXMLResultsType |
getLatestScanReport(String teamName,
String projectName)
Create a scan based on the CxScanParams and wait for the scan to complete, returning the result XML Jaxb object
|
ScanResults |
getLatestScanResults(String teamName,
String projectName,
List<Filter> filters)
Create a scan based on the CxScanParams and return the ScanResults object based on filters
|
Integer |
getLdapRoleMapId(Integer ldapServerId,
Integer roleId,
String ldapGroupDn)
Retrieve the Id of a role mapping associated with an LDAP Group DN
|
Integer |
getLdapServerId(String serverName) |
Integer |
getLdapTeamMapId(Integer ldapServerId,
String teamId,
String ldapGroupDn) |
ScanResults |
getOsaReportContent(File vulnsFile,
File libsFile,
List<Filter> filter) |
Integer |
getPresetId(String preset)
Fetch the Id of a given preset name
|
String |
getPresetName(Integer presetId)
Get Preset Name based on Id
|
CxProject |
getProject(Integer projectId)
Return Project based on projectId
|
Integer |
getProjectId(String ownerId,
String name)
Get All Projects under a specific team within Checkmarx
|
Integer |
getProjectPresetId(Integer projectId)
Get Preset Id of an existing project
|
List<CxProject> |
getProjects()
Get All Projects in Checkmarx
|
List<CxProject> |
getProjects(String teamId)
Get All Projects in Checkmarx
|
ScanResults |
getReportContent(File file,
List<Filter> filter)
Parse CX report file, mapped to ScanResults DTO, applying filtering as requested
|
ScanResults |
getReportContent(Integer reportId,
List<Filter> filter)
Retrieve the report by reportId, mapped to ScanResults DTO, applying filtering as requested
|
ScanResults |
getReportContentByScanId(Integer scanId,
List<Filter> filter)
Retrieve the report by scanId, mapped to ScanResults DTO, applying filtering as requested
|
Integer |
getReportStatus(Integer reportId)
Get the status of a report being generated by reportId
|
Integer |
getRoleId(String roleName)
Returns the Id of an associated role in Checkmarx
|
List<CxRoleLdap> |
getRoleLdap(Integer ldapServerId)
Retrieve list of Role LDAP mappings associated with an LDAP server Id
|
List<CxRole> |
getRoles()
Returns a list of roles in Checkmarx
|
Integer |
getScanConfiguration(String configuration)
Get scan configuration Id
|
org.json.JSONObject |
getScanData(String scanId)
Fetches scan data based on given scan identifier, as a
JSONObject. |
String |
getScanSetting(Integer projectId)
Get Scan Settings for an existing project (JSON String)
|
Integer |
getScanStatus(Integer scanId)
Get the status of a given scanId
|
CxScanSummary |
getScanSummary(Integer projectId)
Get scan summary for the latest scan of a given project Id
|
CxScanSummary |
getScanSummary(String teamName,
String projectName)
Get scan summary for the latest scan associated with a teamName & projectName
|
CxScanSummary |
getScanSummaryByScanId(Integer scanId)
Get scan summary for given scanId
|
String |
getTeamId(String teamPath)
Get teamId for given path
|
String |
getTeamId(String parentTeamId,
String teamName)
Get a team Id based on the name and the Parent Team Id
|
List<CxTeamLdap> |
getTeamLdap(Integer ldapServerId)
Retrieve LDAP team mapping associations
|
List<CxTeam> |
getTeams()
Fetches all teams
|
CxXMLResultsType |
getXmlReportContent(Integer reportId)
Retrieve the xml report by reportId, mapped to ScanResults DTO, applying filtering as requested
|
void |
mapRoleLdap(Integer ldapServerId,
Integer roleId,
String ldapGroupDn) |
void |
mapTeamLdap(Integer ldapServerId,
String teamId,
String teamName,
String ldapGroupDn)
Adds an LDAP team association - uses SOAP Web Service
|
void |
mapTeamLdapWS(Integer ldapServerId,
String teamId,
String teamName,
String ldapGroupDn)
Adds an LDAP team association - uses SOAP Web Service
|
void |
removeRoleLdap(Integer roleMapId)
Removes a role/ldap mapping association
|
void |
removeRoleLdap(Integer ldapServerId,
Integer roleId,
String ldapGroupDn)
Removes a role/ldap mapping association
|
void |
removeTeamLdap(Integer ldapServerId,
String teamId,
String teamName,
String ldapGroupDn)
Removes an LDAP team association - uses SOAP Web Service
|
void |
removeTeamLdapWS(Integer ldapServerId,
String teamId,
String teamName,
String ldapGroupDn)
Removes an LDAP team association - uses SOAP Web Service
|
boolean |
scanExists(Integer projectId)
Check if a scan exists for a projectId
|
void |
setProjectExcludeDetails(Integer projectId,
List<String> excludeFolders,
List<String> excludeFiles) |
void |
setProjectRepositoryDetails(Integer projectId,
String gitUrl,
String branch)
Set Repository details for a project
|
void |
uploadProjectSource(Integer projectId,
File file)
Upload file (zip of source) for a project
|
void |
waitForScanCompletion(Integer scanId)
Wait for the scan of a given scan Id to finish
|
Integer getLastScanId(Integer projectId)
projectId - project Idorg.json.JSONObject getScanData(String scanId)
JSONObject.scanId - scan ID to useJSONObject if scan data was fetched; empty otherwise.LocalDateTime getLastScanDate(Integer projectId)
projectId - Integer getScanStatus(Integer scanId)
scanId - Integer createScanReport(Integer scanId)
scanId - Integer getReportStatus(Integer reportId) throws CheckmarxException
reportId - CheckmarxExceptionScanResults getReportContentByScanId(Integer scanId, List<Filter> filter) throws CheckmarxException
scanId - filter - CheckmarxExceptionScanResults getReportContent(Integer reportId, List<Filter> filter) throws CheckmarxException
reportId - filter - CheckmarxExceptionCxXMLResultsType getXmlReportContent(Integer reportId) throws CheckmarxException
reportId - CheckmarxExceptionMap<String,String> getCustomFields(Integer projectId)
projectId - ID of project to lookup from CheckmarxScanResults getReportContent(File file, List<Filter> filter) throws CheckmarxException
file - filter - CheckmarxExceptionScanResults getOsaReportContent(File vulnsFile, File libsFile, List<Filter> filter) throws CheckmarxException
vulnsFile - libsFile - filter - CheckmarxExceptionInteger createProject(String ownerId, String name)
ownerId - name - void deleteProject(Integer projectId)
projectId - List<CxProject> getProjects() throws CheckmarxException
CheckmarxExceptionList<CxProject> getProjects(String teamId) throws CheckmarxException
CheckmarxExceptionInteger getProjectId(String ownerId, String name)
using TeamId does not work.
ownerId - boolean scanExists(Integer projectId)
projectId - Integer createScanSetting(Integer projectId, Integer presetId, Integer engineConfigId)
projectId - presetId - engineConfigId - String getScanSetting(Integer projectId)
projectId - String getPresetName(Integer presetId)
presetId - Integer getProjectPresetId(Integer projectId)
projectId - void setProjectRepositoryDetails(Integer projectId, String gitUrl, String branch) throws CheckmarxException
projectId - gitUrl - branch - CheckmarxExceptionvoid uploadProjectSource(Integer projectId, File file) throws CheckmarxException
projectId - file - CheckmarxExceptionvoid setProjectExcludeDetails(Integer projectId, List<String> excludeFolders, List<String> excludeFiles)
projectId - Id of Checkmarx ProjectexcludeFolders - list of folder exclusions to apply to a scanexcludeFiles - list of file exclusions to apply to a scanInteger getLdapTeamMapId(Integer ldapServerId, String teamId, String ldapGroupDn) throws CheckmarxException
ldapServerId - ldapGroupDn - CheckmarxExceptionString getTeamId(String teamPath) throws CheckmarxException
teamPath - CheckmarxExceptionList<CxTeam> getTeams() throws CheckmarxException
CheckmarxExceptionvoid mapTeamLdap(Integer ldapServerId, String teamId, String teamName, String ldapGroupDn) throws CheckmarxException
ldapServerId - teamId - teamName - ldapGroupDn - CheckmarxExceptionList<CxTeamLdap> getTeamLdap(Integer ldapServerId) throws CheckmarxException
ldapServerId - CheckmarxExceptionvoid removeTeamLdap(Integer ldapServerId, String teamId, String teamName, String ldapGroupDn) throws CheckmarxException
ldapServerId - teamId - teamName - can be null/empty if using 9.0. Only applicable to 8.xldapGroupDn - CheckmarxExceptionList<CxRole> getRoles() throws CheckmarxException
CheckmarxExceptionInteger getRoleId(String roleName) throws CheckmarxException
roleName - CheckmarxExceptionList<CxRoleLdap> getRoleLdap(Integer ldapServerId) throws CheckmarxException
ldapServerId - CheckmarxExceptionInteger getLdapRoleMapId(Integer ldapServerId, Integer roleId, String ldapGroupDn) throws CheckmarxException
ldapServerId - ldapGroupDn - CheckmarxExceptionvoid mapRoleLdap(Integer ldapServerId, Integer roleId, String ldapGroupDn) throws CheckmarxException
ldapServerId - roleId - ldapGroupDn - CheckmarxExceptionvoid removeRoleLdap(Integer roleMapId) throws CheckmarxException
roleMapId - CheckmarxExceptionvoid removeRoleLdap(Integer ldapServerId, Integer roleId, String ldapGroupDn) throws CheckmarxException
ldapServerId - roleId - ldapGroupDn - CheckmarxExceptionvoid mapTeamLdapWS(Integer ldapServerId, String teamId, String teamName, String ldapGroupDn) throws CheckmarxException
ldapServerId - teamId - teamName - ldapGroupDn - CheckmarxExceptionvoid removeTeamLdapWS(Integer ldapServerId, String teamId, String teamName, String ldapGroupDn) throws CheckmarxException
ldapServerId - teamId - teamName - ldapGroupDn - CheckmarxExceptionString createTeamWS(String parentTeamId, String teamName) throws CheckmarxException
parentTeamId - teamName - CheckmarxExceptionString createTeam(String parentTeamId, String teamName) throws CheckmarxException
parentTeamId - teamName - CheckmarxExceptionvoid deleteTeam(String teamId) throws CheckmarxException
teamId - CheckmarxExceptionString getTeamId(String parentTeamId, String teamName) throws CheckmarxException
parentTeamId - teamName - CheckmarxExceptionvoid deleteTeamWS(String teamId) throws CheckmarxException
teamId - CheckmarxExceptionInteger getScanConfiguration(String configuration) throws CheckmarxException
configuration - CheckmarxExceptionInteger getPresetId(String preset) throws CheckmarxException
preset - name of the preset to find the Id forCheckmarxExceptionCxScanSummary getScanSummaryByScanId(Integer scanId) throws CheckmarxException
scanId - CheckmarxExceptionCxScanSummary getScanSummary(Integer projectId) throws CheckmarxException
projectId - project Id to retrieve the latest scan summary forCheckmarxExceptionCxScanSummary getScanSummary(String teamName, String projectName) throws CheckmarxException
teamName - projectName - CheckmarxExceptionInteger createScan(CxScanParams params, String comment) throws CheckmarxException
params - attributes used to define the projectcomment - CheckmarxExceptionvoid waitForScanCompletion(Integer scanId) throws CheckmarxException
scanId - CheckmarxExceptionvoid deleteScan(Integer scanId) throws CheckmarxException
scanId - CheckmarxExceptionCxXMLResultsType createScanAndReport(CxScanParams params, String comment) throws CheckmarxException
params - attributes used to define the projectcomment - CheckmarxExceptionScanResults createScanAndReport(CxScanParams params, String comment, List<Filter> filters) throws CheckmarxException
params - attributes used to define the projectcomment - filters - filters to apply to the scan result set (severity, category, cwe)CheckmarxExceptionCxXMLResultsType getLatestScanReport(String teamName, String projectName) throws CheckmarxException
teamName - projectName - CheckmarxExceptionScanResults getLatestScanResults(String teamName, String projectName, List<Filter> filters) throws CheckmarxException
teamName - projectName - filters - CheckmarxExceptionInteger getLdapServerId(String serverName) throws CheckmarxException
CheckmarxExceptionCopyright © 2020. All rights reserved.