use of org.parosproxy.paros.db.TableAlert in project zaproxy by zaproxy.
the class ExtensionAlert method writeAlertToDB.
private void writeAlertToDB(Alert alert, HistoryReference ref) throws HttpMalformedHeaderException, DatabaseException {
TableAlert tableAlert = getModel().getDb().getTableAlert();
int scanId = 0;
if (recordScan != null) {
scanId = recordScan.getScanId();
}
RecordAlert recordAlert = tableAlert.write(scanId, alert.getPluginId(), alert.getName(), alert.getRisk(), alert.getConfidence(), alert.getDescription(), alert.getUri(), alert.getParam(), alert.getAttack(), alert.getOtherInfo(), alert.getSolution(), alert.getReference(), alert.getEvidence(), alert.getCweId(), alert.getWascId(), ref.getHistoryId(), alert.getSourceHistoryId(), alert.getSource().getId());
alert.setAlertId(recordAlert.getAlertId());
}
Aggregations