public static IO2Finding createCopy(IO2Finding o2Finding, bool processChildTraces) { var newO2Finding = new O2Finding { actionObject = o2Finding.actionObject, callerName = o2Finding.callerName, context = o2Finding.context, columnNumber = o2Finding.actionObject, confidence = o2Finding.confidence, exclude = o2Finding.exclude, file = o2Finding.file, lineNumber = o2Finding.lineNumber, ordinal = o2Finding.ordinal, projectName = o2Finding.projectName, propertyIds = o2Finding.propertyIds, recordId = o2Finding.recordId, severity = o2Finding.severity, text = createCopy(o2Finding.text), vulnName = o2Finding.vulnName, vulnType = o2Finding.vulnType }; if (processChildTraces) { newO2Finding.o2Traces = createCopy(o2Finding.o2Traces); } return(newO2Finding); }
public static IO2Finding createCopy(IO2Finding o2Finding, bool processChildTraces) { var newO2Finding = new O2Finding { actionObject = o2Finding.actionObject, callerName = o2Finding.callerName, context = o2Finding.context, columnNumber = o2Finding.actionObject, confidence = o2Finding.confidence, exclude = o2Finding.exclude, file = o2Finding.file, lineNumber = o2Finding.lineNumber, ordinal = o2Finding.ordinal, projectName = o2Finding.projectName, propertyIds = o2Finding.propertyIds, recordId = o2Finding.recordId, severity = o2Finding.severity, text = createCopy(o2Finding.text), vulnName = o2Finding.vulnName, vulnType = o2Finding.vulnType }; if (processChildTraces) newO2Finding.o2Traces = createCopy(o2Finding.o2Traces); return newO2Finding; }
public static List <IO2Trace> getListWithAllTraces(O2Finding o2Finding) { var allTraces = new List <IO2Trace>(); try { getListWithAllTraces(o2Finding.o2Traces, allTraces); } catch (Exception ex) { DI.log.error("in getListWithAllTraces: {0}", ex.Message); } return(allTraces); }
public static void fixExternalSourceSourceMappingProblem(O2Finding o2Finding) { try { // fix the external_source callback generated finding problem since the source should be the callback back methods and not the <external_source>(...) rule if (o2Finding.Source.IndexOf("<external_source>") > -1) { o2Finding.getSource().traceType = TraceType.Root_Call; o2Finding.o2Traces[0].childTraces[1].traceType = TraceType.Source; } } catch (Exception ex) { DI.log.ex(ex, "in getO2Finding, while trying to fix the external_source callback generated finding problem"); } }
public static IO2Finding createO2FindingFromTrace(IO2Trace o2Trace) { var o2Finding = new O2Finding { callerName = o2Trace.signature, context = o2Trace.context, columnNumber = o2Trace.columnNumber, file = o2Trace.file, lineNumber = o2Trace.lineNumber, o2Traces = new List<IO2Trace> {OzasmtCopy.createCopy(o2Trace)}, ordinal = o2Trace.ordinal, text = OzasmtCopy.createCopy(o2Trace.text), vulnName = o2Trace.signature, vulnType = "FindingFromTrace" }; return o2Finding; }
public static IO2Finding createO2FindingFromTrace(IO2Trace o2Trace) { var o2Finding = new O2Finding { callerName = o2Trace.signature, context = o2Trace.context, columnNumber = o2Trace.columnNumber, file = o2Trace.file, lineNumber = o2Trace.lineNumber, o2Traces = new List <IO2Trace> { OzasmtCopy.createCopy(o2Trace) }, ordinal = o2Trace.ordinal, text = OzasmtCopy.createCopy(o2Trace.text), vulnName = o2Trace.signature, vulnType = "FindingFromTrace" }; return(o2Finding); }
public static void showO2FindingInDataGridView(O2Finding o2Finding, DataGridView dataGridView) { }