Package com.denimgroup.threadfix.data.entities

Examples of com.denimgroup.threadfix.data.entities.GenericSeverity


 
  public static void addToVuln(Vulnerability vuln, Finding finding) {
    vuln.getFindings().add(finding);

    // update the generic severity
        GenericSeverity higherGenericSeverity = getHigherSeverity(finding, vuln);
    vuln.setGenericSeverity(higherGenericSeverity);
        vuln.setOriginalGenericSeverity(higherGenericSeverity);

    finding.setVulnerability(vuln);
  }
View Full Code Here


    finding.setVulnerability(vuln);
  }
 
  private static GenericSeverity getHigherSeverity(Finding finding, Vulnerability vuln) {
    GenericSeverity
      findingSeverity = getGenericSeverity(finding),
      vulnSeverity = vuln.getGenericSeverity(),
      returnSeverity = null;
   
    if (findingSeverity != null) {
      if (vulnSeverity == null) {
        returnSeverity = findingSeverity;
      } else if (vulnSeverity.getIntValue() != null &&
          findingSeverity.getIntValue() != null &&
          vulnSeverity.getIntValue() < findingSeverity.getIntValue()) {
        returnSeverity = findingSeverity;
      }
    }
   
    if (returnSeverity == null) {
View Full Code Here

   
    return returnSeverity;
  }
 
  private static GenericSeverity getGenericSeverity(Finding finding) {
    GenericSeverity severity = null;

        if (finding != null && finding.getChannelSeverity() == null) {
            log.warn("No Channel Severity found for " + finding.getChannelVulnerability().getName());
        }
    if (finding != null && finding.getChannelSeverity()!= null && finding.getChannelSeverity().getSeverityMap() != null)
View Full Code Here

 
  @ModelAttribute("genericSeverities")
  public List<GenericSeverity> getGenericSeverities() {
    List<GenericSeverity> severities = genericSeverityService.loadAll();
   
    GenericSeverity ignoreSeverity = new GenericSeverity();
    ignoreSeverity.setId(-1);
    ignoreSeverity.setName("Ignore");
    severities.add(ignoreSeverity);
   
    return severities;
  }
View Full Code Here

    }

    public static List<Vulnerability> getSampleVulnerabilities() {
        Vulnerability vulnerability = new Vulnerability();

        vulnerability.setGenericSeverity(new GenericSeverity());
        vulnerability.getGenericSeverity().setName("Critical");

        vulnerability.setGenericVulnerability(new GenericVulnerability());
        vulnerability.getGenericVulnerability().setName("XSS");
View Full Code Here

TOP

Related Classes of com.denimgroup.threadfix.data.entities.GenericSeverity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.