예제 #1
0
  private static Vulnerabilities.Vulnerability.Finding.DataFlowElement
      convertTFDataFlowElementToSSVL(DataFlowElement tfDataFlowElement) {
    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()));

    return ssvlDataFlowElement;
  }
예제 #2
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;
  }