Package com.denimgroup.threadfix.data.enums

Examples of com.denimgroup.threadfix.data.enums.FrameworkType


        LOG.info("Determining proper FindingProcesser implementation for application " + application.getName() + " and new scan.");

        SourceCodeAccessLevel accessLevel = getSourceCodeAccessLevel(application, scan);
        File rootFile = getRootFile(application);
        FrameworkType frameworkType = getFrameworkType(application, accessLevel, rootFile, scan);

        ProjectConfig config = new ProjectConfig(frameworkType, accessLevel, rootFile, "/");

        FindingProcessor processor;
View Full Code Here


  @Nonnull
  private static FrameworkType getFrameworkType(Application application,
      SourceCodeAccessLevel accessLevel, File rootFile, Scan scan) {
   
    FrameworkType frameworkType = application.getFrameworkTypeEnum();

        LOG.info("Initial frameworkType was " + frameworkType);

    if (frameworkType == FrameworkType.DETECT) {
      if (accessLevel == SourceCodeAccessLevel.FULL) {
View Full Code Here

    return frameworkType;
  }
 
  // TODO cache this information so we don't have to calculate every time
  private static FrameworkType guessFrameworkTypeFromDataFlows(Application application, Scan scan) {
    FrameworkType returnType = guessFrameworkType(scan);
   
    if (returnType == FrameworkType.NONE && application != null && application.getScans() != null) {
      for (Scan applicationScan : application.getScans()) {
        FrameworkType scanType = guessFrameworkType(applicationScan);
        if (scanType != FrameworkType.NONE) {
          returnType = scanType;
          break;
        }
      }
View Full Code Here

  // TODO improve this
  private static FrameworkType guessFrameworkType(Scan scan) {

        LOG.info("Guessing framework type.");

    FrameworkType type = FrameworkType.NONE;
   
    if (scan != null && scan.isStatic() && scan.getFindings() != null &&
        !scan.getFindings().isEmpty()) {
      for (Finding finding : scan.getFindings()) {
        if (finding != null && finding.getStaticPathInformation() != null &&
View Full Code Here

        for (File file : getSampleProjects()) {

            System.out.println(file.getName());

            FrameworkType type = FrameworkCalculator.getType(file);

            assert type == FrameworkType.DOT_NET_WEB_FORMS
                    : "Got " + type + " instead of DOT_NET_WEB_FORMS for " + file;
        }
    }
View Full Code Here

            testTypeDetection(TestConstants.getFolderName(app));
        }
    }

    void testTypeDetection(String location) {
        FrameworkType type = FrameworkCalculator.getType(new File(location));
        assertTrue("Didn't find Spring in " + location + ". Got: " + type, type == FrameworkType.SPRING_MVC);
    }
View Full Code Here

        return getDatabase(file);
  }

  @Nullable
    public static EndpointDatabase getDatabase(@Nonnull File rootFile) {
    FrameworkType type = FrameworkCalculator.getType(rootFile);
    return getDatabase(rootFile, type);
  }
View Full Code Here

    return getDatabase(rootFile, type);
  }
 
  @Nullable
    public static EndpointDatabase getDatabase(@Nonnull File rootFile, List<PartialMapping> partialMappings) {
    FrameworkType type = FrameworkCalculator.getType(rootFile);
   
    return getDatabase(rootFile, type, partialMappings);
  }
View Full Code Here

TOP

Related Classes of com.denimgroup.threadfix.data.enums.FrameworkType

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.