Exemple #1
0
 public void glueTrace()
 {
     if (fidingsViewer_WebInspectOzasmt.currentO2Findings.Count > 0 &&
         fidingsViewer_OunceOzasmt.currentO2Findings.Count > 0)
     {
         fidingsViewer_MappedFile.loadO2Findings(
             OzasmtGlue.glueOnTraceNames(fidingsViewer_WebInspectOzasmt.currentO2Findings, fidingsViewer_OunceOzasmt.currentO2Findings, "Spring MVC Glue"));
     }
 }
        public void mapWebInspectMappingsToOzamstFindings()
        {
            // process Ounce Assessment file
            string workOzasmtFile = ozasmtHacmeBankScanWithDefaultRules;

            Assert.IsTrue(File.Exists(workOzasmtFile), "ozasmtHacmeBankScanWithDefaultRules could not be found");
            var o2AssessmentOunceScan = new O2Assessment(new O2AssessmentLoad_OunceV6(), workOzasmtFile);

            o2AssessmentOunceScan.o2Findings = AspNetAnalysis.findWebControlSources(o2AssessmentOunceScan.o2Findings);
            Assert.IsTrue(o2AssessmentOunceScan.o2Findings.Count > 0, "There were no Findings calculated");
            o2AssessmentOunceScan.save(new O2AssessmentSave_OunceV6(), ozasmtWithHacmeBankWebControlMappings);


            // process WebInspect file

            string workWebInspectFile = webInspectFileWithResults;

            Assert.IsTrue(File.Exists(workWebInspectFile), "webInspectFileWithResults does not exist");
            var o2AssessmentWebInspectScan = new O2Assessment()
            {
                o2Findings =
                    WebInspectConverter.
                    loadWebInspectResultsAndReturnO2FindingsFor_SqlInjection_PoC2(
                        workWebInspectFile)
            };

            Assert.IsTrue(o2AssessmentWebInspectScan.o2Findings.Count > 0, "No O2 findings created");
            o2AssessmentWebInspectScan.save(new O2AssessmentSave_OunceV6(), ozasmtFileWebInspectMappings);

            var o2AssessmentGluedOnTraceName = new O2Assessment()
            {
                o2Findings =
                    OzasmtGlue.glueOnTraceNames(new O2AssessmentLoad_OunceV6(), ozasmtFileWebInspectMappings,
                                                ozasmtWithHacmeBankWebControlMappings,
                                                "Spring MVC Glue")
            };

            Assert.IsTrue(o2AssessmentGluedOnTraceName.o2Findings.Count > 0, "No Glued Findings created");
            o2AssessmentGluedOnTraceName.save(new O2AssessmentSave_OunceV6(), ozasmtWithWebInspectToOunceMappings);
            Analysis.createAssessmentFileWithAllTraces(true, false, ozasmtWithWebInspectToOunceMappings,
                                                       //  ozasmtWithWebInspectToOunceMappings);

                                                       ozasmtWithWebInspectToOunceMappings_UniqueTraces);
            //
        }