use of com.mercedesbenz.sechub.sarif.model.WebRequest in project sechub by mercedes-benz.
the class SarifV1JSONImporter method detectScanTypeAndInspectOnDemand.
private void detectScanTypeAndInspectOnDemand(Result result, SerecoVulnerability vulnerability) {
WebRequest sarifWebRequest = result.getWebRequest();
if (sarifWebRequest != null) {
vulnerability.setScanType(ScanType.WEB_SCAN);
vulnerability.setWeb(resolveWebInfoFromResult(result));
} else {
vulnerability.setScanType(ScanType.CODE_SCAN);
vulnerability.setCode(resolveCodeInfoFromResult(result));
}
}
use of com.mercedesbenz.sechub.sarif.model.WebRequest in project sechub by mercedes-benz.
the class SarifV1JSONImporter method handleWebRequest.
private void handleWebRequest(Result result, SerecoWeb serecoWeb) {
SerecoWebRequest serecoWebRequest = serecoWeb.getRequest();
WebRequest sarifWebRequest = result.getWebRequest();
serecoWebRequest.setProtocol(sarifWebRequest.getProtocol());
serecoWebRequest.setVersion(sarifWebRequest.getVersion());
serecoWebRequest.setMethod(sarifWebRequest.getMethod());
serecoWebRequest.setTarget(sarifWebRequest.getTarget());
serecoWebRequest.getHeaders().putAll(sarifWebRequest.getHeaders());
/* body */
SerecoWebBody serecoWebRequestBody = serecoWebRequest.getBody();
com.mercedesbenz.sechub.sarif.model.Body sarifWebRequestBody = sarifWebRequest.getBody();
serecoWebRequestBody.setText(sarifWebRequestBody.getText());
serecoWebRequestBody.setBinary(sarifWebRequestBody.getBinary());
}
Aggregations