To run the TimeGrouper backend localy in a python virtual environment, follow these steps:
-
Run
./setup.sh
on Linux/Mac andsetup.bat
on Windows. This will install all python packages needed in a virtual environment inflask/
-
Activate the virtual environment
source flask/bin/activate
-
Run
python app.py
The RESTful service should now be running at: http://localhost:5000/
Service Endpoints:
-
POST: http://localhost:5000/getSimMatrix -- (Note: If #patches > 100 the summary of the similarity matrix is included in the response as the first json array.)
- with {simMetric : 'some-similarity-Metric', cAlgorithm : 'clustering-algorithm'} these are required
- with {filter : 'chrome' , filter : 'firefox' ...etc} in the request to filter by app name
- with {updateMech : 'SU', updateMech : 'PD' ...} to filter by update mechanism
- {exploitable='true'} to filter by verified exploitability (true if patch has been exploited in the past)
- with {patchId : 'chrome_001' , patchId : 'firefox_003' ...etc} in the request
- with {highlight : 'chrome', updateMech : 'firefox' ...} to highlight by app name (highlights the similarity matrix positions that correspond to a similarity for two patches that both fit the highlighting condition). Returns [i,j] pairs for the boxes that should be highlighted