예제 #1
0
        private static void addFindingDataToO2Finding(AssessmentAsmntFileFinding finding, IO2Finding o2Finding, AssessmentRun assessmentRun)
        {
            AssessmentRunFindingData findingData = assessmentRun.FindingDataPool[finding.data_id - 1];
            AssessmentRunSite        siteData    = assessmentRun.SitePool[findingData.site_id - 1];

            if (findingData.id != finding.data_id || siteData.id != findingData.site_id)
            {
                "in addFindingDataToO2Finding findingData.id != (finding.data_id-1) or siteData.id != (findingData.site_id - 1)".error();
            }
            else
            {
                o2Finding.actionObject = findingData.ao_id;
                o2Finding.callerName   = getStringIndexValue(siteData.caller, assessmentRun);
                o2Finding.columnNumber = siteData.cn;
                o2Finding.confidence   = (byte)findingData.conf;
                o2Finding.context      = getStringIndexValue(siteData.cxt, assessmentRun);
                o2Finding.exclude      = finding.excluded;
                o2Finding.file         = getFileIndexValue(siteData.file_id, assessmentRun);
                o2Finding.lineNumber   = siteData.ln;
                o2Finding.method       = getStringIndexValue(siteData.method, assessmentRun);
                o2Finding.ordinal      = siteData.ord;
                o2Finding.projectName  = getStringIndexValue(findingData.project_name, assessmentRun);
                o2Finding.propertyIds  = findingData.prop_ids; /**/
                o2Finding.recordId     = findingData.rec_id;
                o2Finding.severity     = (byte)findingData.sev;
                //   o2Finding.signature = getStringIndexValue(siteData.sig, assessmentRun);
                o2Finding.text     = null;                                             /**/
                o2Finding.vulnName = getStringIndexValue(siteData.sig, assessmentRun); /*making the sig the vuln name*/
                o2Finding.vulnType = getStringIndexValue(findingData.vtype, assessmentRun);
            }
        }
        private static void addFindingDataToO2Finding(AssessmentAsmntFileFinding finding, IO2Finding o2Finding, AssessmentRun assessmentRun)
        {
            AssessmentRunFindingData findingData = assessmentRun.FindingDataPool[finding.data_id-1];
            AssessmentRunSite siteData = assessmentRun.SitePool[findingData.site_id - 1];
            if (findingData.id != finding.data_id || siteData.id != findingData.site_id)
                "in addFindingDataToO2Finding findingData.id != (finding.data_id-1) or siteData.id != (findingData.site_id - 1)".error();
            else
            {
                o2Finding.actionObject = findingData.ao_id;
                o2Finding.callerName = getStringIndexValue(siteData.caller, assessmentRun);
                o2Finding.columnNumber = siteData.cn;
                o2Finding.confidence = (byte) findingData.conf;
                o2Finding.context = getStringIndexValue(siteData.cxt, assessmentRun);                
                o2Finding.exclude = finding.excluded;
                o2Finding.file = getFileIndexValue(siteData.file_id, assessmentRun);
                o2Finding.lineNumber = siteData.ln;
                o2Finding.method = getStringIndexValue(siteData.method, assessmentRun);
                o2Finding.ordinal = siteData.ord; 
                o2Finding.projectName = getStringIndexValue(findingData.project_name, assessmentRun);
                o2Finding.propertyIds = findingData.prop_ids; /**/
                o2Finding.recordId = findingData.rec_id;
                o2Finding.severity = (byte) findingData.sev;
             //   o2Finding.signature = getStringIndexValue(siteData.sig, assessmentRun);
                o2Finding.text = null; /**/
                o2Finding.vulnName = getStringIndexValue(siteData.sig, assessmentRun); /*making the sig the vuln name*/
                o2Finding.vulnType = getStringIndexValue(findingData.vtype, assessmentRun);                

            }                                                                                                            
        }
 private static IO2Finding getO2Finding(AssessmentAsmntFileFinding finding, AssessmentRun assessmentRunToImport)
 {
     var o2Finding = new O2Finding();
     addFindingDataToO2Finding(finding, o2Finding, assessmentRunToImport);
     addTraceToO2Finding(finding.trace, o2Finding, assessmentRunToImport);
     OzasmtUtils.fixExternalSourceSourceMappingProblem(o2Finding);           // fix the 'ExternalSource Source' problem
     return o2Finding;
 }
예제 #4
0
        private static IO2Finding getO2Finding(AssessmentAsmntFileFinding finding, AssessmentRun assessmentRunToImport)
        {
            var o2Finding = new O2Finding();

            addFindingDataToO2Finding(finding, o2Finding, assessmentRunToImport);
            addTraceToO2Finding(finding.trace, o2Finding, assessmentRunToImport);
            OzasmtUtils.fixExternalSourceSourceMappingProblem(o2Finding);           // fix the 'ExternalSource Source' problem
            return(o2Finding);
        }