Пример #1
0
 public static List<Vulnerabilities.Vulnerability.Finding> convertTFFindingsToSSVLFindings(
     List<Finding> tfVulnFindings) {
   List<Vulnerabilities.Vulnerability.Finding> ssvlVulnFindings = CollectionUtils.list();
   for (Finding tfFinding : tfVulnFindings) {
     ssvlVulnFindings.add(convertTFFindingToSSVLFinding(tfFinding));
   }
   return ssvlVulnFindings;
 }
Пример #2
0
  public static List<Vulnerabilities.Vulnerability> convertTFVulnsToSSVLVulns(
      List<Vulnerability> tfVulnList) {
    List<Vulnerabilities.Vulnerability> ssvlVulnList = CollectionUtils.list();
    for (Vulnerability tfVuln : tfVulnList) {
      ssvlVulnList.add(convertTFVulnToSSVLVuln(tfVuln));
    }

    return ssvlVulnList;
  }
Пример #3
0
  private static List<Vulnerabilities.Vulnerability.Finding.DataFlowElement>
      convertTFDataFlowElementsToSSVL(List<DataFlowElement> tfDataFlowElements) {
    if (tfDataFlowElements == null) return null;
    List<Vulnerabilities.Vulnerability.Finding.DataFlowElement> ssvlDataFlowElements =
        CollectionUtils.list();

    for (DataFlowElement tfDataFlowElement : tfDataFlowElements) {
      Vulnerabilities.Vulnerability.Finding.DataFlowElement ssvlDataFlowElement =
          factory.createVulnerabilitiesVulnerabilityFindingDataFlowElement();

      ssvlDataFlowElement.setLineText(tfDataFlowElement.getLineText());
      ssvlDataFlowElement.setSourceFileName(tfDataFlowElement.getSourceFileName());
      ssvlDataFlowElement.setLineNumber(BigInteger.valueOf(tfDataFlowElement.getLineNumber()));
      ssvlDataFlowElement.setColumnNumber(BigInteger.valueOf(tfDataFlowElement.getColumnNumber()));
      ssvlDataFlowElement.setSequence(BigInteger.valueOf(tfDataFlowElement.getSequence()));

      ssvlDataFlowElements.add(ssvlDataFlowElement);
    }
    return ssvlDataFlowElements;
  }