Search in sources :

Example 6 with ASTResults

use of com.checkmarx.sdk.dto.ast.ASTResults in project cx-flow by checkmarx-ltd.

the class AbstractASTScanner method actualScan.

private ScanResults actualScan(ScanRequest scanRequest, String path) {
    ScanResults result = null;
    log.info("--------------------- Initiating new {} scan ---------------------", scanType);
    AstScaResults internalResults = new AstScaResults(new SCAResults(), new ASTResults());
    try {
        ScanParams sdkScanParams = toSdkScanParams(scanRequest, path);
        internalResults = client.scan(sdkScanParams);
        logRequest(scanRequest, internalResults, OperationResult.successful());
        result = toScanResults(internalResults);
    } catch (Exception e) {
        treatError(scanRequest, internalResults, e);
    }
    return result;
}
Also used : ScanResults(com.checkmarx.sdk.dto.ScanResults) ScanParams(com.checkmarx.sdk.dto.ast.ScanParams) AstScaResults(com.checkmarx.sdk.dto.AstScaResults) ASTResults(com.checkmarx.sdk.dto.ast.ASTResults) SCAResults(com.checkmarx.sdk.dto.sca.SCAResults) MalformedURLException(java.net.MalformedURLException) MachinaRuntimeException(com.checkmarx.flow.exception.MachinaRuntimeException)

Example 7 with ASTResults

use of com.checkmarx.sdk.dto.ast.ASTResults in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.

the class AstScanner method toResults.

/**
 * Convert Common Client representation of AST results into an object from this SDK.
 */
@Override
protected AstScaResults toResults(ResultsBase scanResults) {
    ASTResults astResults = (ASTResults) scanResults;
    validateNotNull(astResults);
    return new AstScaResults(new SCAResults(), astResults);
}
Also used : ASTResults(com.checkmarx.sdk.dto.ast.ASTResults) SCAResults(com.checkmarx.sdk.dto.sca.SCAResults)

Aggregations

ASTResults (com.checkmarx.sdk.dto.ast.ASTResults)7 AstScaResults (com.checkmarx.sdk.dto.AstScaResults)3 ScanParams (com.checkmarx.sdk.dto.ast.ScanParams)3 SCAResults (com.checkmarx.sdk.dto.sca.SCAResults)3 MalformedURLException (java.net.MalformedURLException)3 MachinaRuntimeException (com.checkmarx.flow.exception.MachinaRuntimeException)2 ScanResults (com.checkmarx.sdk.dto.ScanResults)2 AstSummaryResults (com.checkmarx.sdk.dto.ast.report.AstSummaryResults)2 Finding (com.checkmarx.sdk.dto.ast.report.Finding)2 GithubProperties (com.checkmarx.sdk.GithubProperties)1 AstConfig (com.checkmarx.sdk.config.AstConfig)1 AstProperties (com.checkmarx.sdk.config.AstProperties)1 CxProperties (com.checkmarx.sdk.config.CxProperties)1 RestClientConfig (com.checkmarx.sdk.config.RestClientConfig)1 SpringConfiguration (com.checkmarx.sdk.config.SpringConfiguration)1 RemoteRepositoryInfo (com.checkmarx.sdk.dto.RemoteRepositoryInfo)1 SourceLocationType (com.checkmarx.sdk.dto.SourceLocationType)1 CxScanSummary (com.checkmarx.sdk.dto.cx.CxScanSummary)1 FilterConfiguration (com.checkmarx.sdk.dto.filtering.FilterConfiguration)1 CheckmarxException (com.checkmarx.sdk.exception.CheckmarxException)1