Development Environment Setup
Pages 68
- Home
- Active Directory Setup
- Analytics & Reports
- Application and Database Server Configurations
- Burp Plugin
- CLI Importers
- Command Line Interface
- Component Lifecycle Management Tools
- Custom Properties
- CustomizeDefectDescriptions
- CWE Mapping
- Data Migration Tool
- Debugging ThreadFix Issues
- Defect Tracker Guide
- Defect Tracker Plugin Development
- Development Environment Setup
- Dynamic Scanners
- Eclipse IDE Plugin
- Endpoint CLI
- Frequently Asked Questions
- Getting Started
- HAM Merging Process Explained
- Hybrid Analysis Mapping Configuration
- IDE Plugins
- Imperva SecureSphere Support
- Importing Self Signed Certificates
- IntelliJ IDEA Plugin
- Manual Findings
- Manually Mapping Vulnerabilities
- Permission System
- Plugin Downloads
- Policies
- Quality Assurance
- Remote Provider Plugin Development
- Remote Providers
- Report Bugs & Feedback
- Report Plugin Development
- Scan Agent
- Scan Upload Automation
- Scanner Plugin Development
- Scanner Plugins
- Software Defect Trackers
- Sonar Plugin
- SQL Server Configuration
- SSVL Converter
- SSVLConverter
- Static Scanners
- ThreadFix Branching
- ThreadFix Development Community
- ThreadFix Event Model
- ThreadFix REST Interface
- ThreadFix REST Interface Responses
- Troubleshooting
- Ubuntu 12.04 Installation Guide
- Ubuntu and Debian Installation Guide
- User Permissions
- Using MySQL
- Using the Sonar Plugin
- Using the ThreadFix Java Client Library with Maven
- Visual Studio IDE Plugin
- Vulnerability Format
- Vulnerability Merging
- WAF Guide
- WAF Plugin Development
- WAF Types
- Windows 2012 R2 Installation Guide
- Writing HAM Integration
- Zap Plugin
- Show 53 more pages…
Clone this wiki locally
Introduction
This page describes the steps for configuring the ThreadFix development environment under Windows and OS X. Linux environment setup has not been tested with these steps, but should be similar to OS X.
Setup and Configuration
Downloads
To compile ThreadFix, download and install the following dependencies:
- Java JDK 8: Be sure to download the Java 8 JDK. This guide was written with 64-bit Java, but 32-bit Java should also work.
- Apache Tomcat 7: Download.
- Maven: Download.
It is recommended that you download and install one of the following IDEs, as it will simplify compilation and development:
- IntelliJ IDEA, Ultimate Edition: The Community Edition of IntelliJ IDEA does not support web development, and will not work with these instructions. Download/Purchase.
- Spring Tool Suite: Download.
Cloning the Git repository
From the command line (using Git bash in Windows, if necessary), run the following command:
git clone https://github.com/denimgroup/threadfix.git
This will create a directory named threadfix in the current directory that contains ThreadFix source code.
IntelliJ IDEA Setup Instructions
-
Import the ThreadFix project.
- From the "File" menu, select, "Import Project".
- Navigate to the root
threadfixdirectory, and selectpom.xml. - Click "Next" on the first two pages.
- On the Java SDK page, select the JDK that you downloaded earlier. If Java 8 JDK does not appear as an option, click the green "+" button in the top-left corner, and add a new JDK. You will need to select the location where you installed Java 8. Finally, click, "Next".
- Set the project name and path, then click, "Finish".
-
Configure the Tomcat deployment.
- From the "Run" menu, select, "Edit Configurations."
- Create a new Local Tomcat Server.
- Click the "Configure" button to the right of the Application Server dropdown.
- Create a new Tomcat application server, and set Tomcat Home to the location where you installed Tomcat. Click "OK".
- Select the Tomcat application server you just configured in the Application Server dropdown.
- In the "Deployment" tab, add the
threadfix:warartifact, and set the Application Context to/threadfix.
-
Configure the database.
- Open the
src/main/resources/jdbc.propertiesfile, located in thethreadfix-mainmodule. - Change the
hibernate.hbm2ddl.autoproperty to "create".
- Open the
-
Starting the server.
- From the "Run" menu, select, "Run...".
- Select the Tomcat application server you created earlier. IntelliJ will compile and deploy ThreadFix.
Spring Tool Suite Setup Instructions
-
Import the ThreadFix project.
- Click "File/Import..." and select "Maven / Existing Maven Projects".
- Click "Next".
- Select the
threadfixdirectory. - Leave all of the check boxes selected, and click "Finish".
You will see a bunch of errors. These errors will be resolved in the next steps.
-
Ignore maven plugins
-
Create a file named
lifecycle-mapping-metadata.xmlwith the following contents:<?xml version="1.0" encoding="UTF-8"?> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.codehaus.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> <goals> <goal>create-timestamp</goal> </goals> <versionRange>[0.0,)</versionRange> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <goals> <goal>jar</goal> </goals> <versionRange>[0.0,)</versionRange> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <goals> <goal>list</goal> </goals> <versionRange>[0.0,)</versionRange> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> <pluginExecution> <pluginExecutionFilter> <groupId>org.zeroturnaround</groupId> <artifactId>jrebel-maven-plugin</artifactId> <goals> <goal>generate</goal> </goals> <versionRange>[0.0,)</versionRange> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> <pluginExecution> <pluginExecutionFilter> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <goals> <goal>compile</goal> </goals> <versionRange>[0.0,)</versionRange> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <goals> <goal>copy-dependencies</goal> <goal>unpack</goal> </goals> <versionRange>[0.0,)</versionRange> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata>
- Open File / Preferences (Clover + , on OS X) of STS
- Expand Maven on the left panel
- Click "Lifecycle Mappings"
- Hit Browse under "Change mapping file location"
- Select the lifecycle-mapping-metadata.xml file you saved in step 1
- Click OK
-
-
Compile and download dependencies.
- Right click the
master-pomproject and select Maven | Update Project. - In the dialog that pops up, click "OK" and wait for the workspace to build.
- Right click the
-
Configure the database.
- Open the
src/main/resources/jdbc.propertiesfile. - Change the
hibernate.hbm2ddl.autoproperty to "create".
- Open the
-
Configure the Tomcat deployment.
- In the Server window on the bottom left, click "No servers are available. Click this link to create a new server..."
- Select "Apache / Tomcat v7.0" server, and click "Next".
- Select the directory where Tomcat is under "Tomcat Installation Directory". Then, click "Next".
- Select
threadfix(threadfix-main)from the list on the left. Click, "Add". - Click, "Finish".
- Select the Tomcat server and click the play button in the server panel.
Running ThreadFix Without an IDE
If your goal is to just get the latest build of ThreadFix running, and setting up a development environment is not a priority, you can run a Maven command to do so.
- Open a terminal or a command prompt and navigate into the directory of the ThreadFix project that you cloned.
- Run the following command:
mvn clean install -P devTomcat
Note: if you wish to run ThreadFix on a different port than the default 8080 add the following parameter to your mvn command.
-Dcargo.servlet.port=<Port>This will get you a basic build of the ThreadFix project. If you're familiar with Maven you'll notice that we included the devTomcat profile. This profile starts a tomcat instance for ThreadFix to run on. There exist two other profiles that would be useful to run in conjunction with the devTomcat profile.
hsqldb
The hsqldb profile ensures that your instance of ThreadFix is running on an HSQL database instance. This profile copies a database properties file into the build directory during build time that includes the correct connection properties to an HSQL database.
mvn clean install -P devTomcat,hsqldb
mysql
The mysql profile ensures that your instance of ThreadFix is running on a MySQL database instance. You must first make sure that you have a MySQL instance set up on your machine. This profile copies a database properties file into the build directory during build time that includes the correct connection properties to a MySQL database.
mvn clean install -P devTomcat,mysqlTo learn more about Maven build profiles, check out the official Maven documentation here.
Post-Configuration
In a web browser, navigate to: http://localhost:8080/threadfix/login.jsp
If you don't see a login screen with the ThreadFix logo, something went wrong. If you do then great, you've got ThreadFix setup!
If you want more information about what to do from here, please check out our Getting Started Guide. Skip to the 'Create A New User' section to skip the package configuration section.
Good luck! Please log any bugs to the GitHub issue tracker.
And please join the ThreadFix Google Group to post issues and request technical support: https://groups.google.com/group/threadfix