Example #1
0
def run_tools(path_to_analyze):
    # -- Run all analysis
    retirejs_report = RetireJS(path=path_to_analyze).run_retirejs()
    owasp_depcheck_report = OwaspDepCheck(path=path_to_analyze).run_owasp_depcheck()

    # -- Generate full report and return
    full_report = json.dumps(_avoid_repetition(retirejs_report + owasp_depcheck_report))
    return full_report
Example #2
0
 def test_run_retirejs(self, m1):
     self.assertEqual(RetireJS('').run_retirejs(),[])
Example #3
0
 def test_generate_report(self):
     self.assertEqual(RetireJS('')._generate_report(json.loads(mock_retirejs_output), 'js'), json.loads(mock_generated_report))