Пример #1
0
 def run_analysis(self, path):
     self.cfg_create_from_file(path)
     clear_constraint_table()
     initialize_constraint_table([self.cfg])
     self.analysis = FixedPointAnalysis(self.cfg)
     self.analysis.fixpoint_runner()
     return Lattice(self.cfg.nodes)
Пример #2
0
	def run_analysis(self):
		cfg_list = [self.cfg]

		FrameworkAdaptor(cfg_list, [], [], is_flask_route_function)
		initialize_constraint_table(cfg_list)

		analyse(cfg_list)

		trigger_word_file = os.path.join('pytaintx',
		'vulnerability_definitions',
		'test_positions.pyt')

		return find_vulnerabilities(cfg_list,
		default_blackbox_mapping_file,
		trigger_word_file)
Пример #3
0
	def run_analysis(self, path):
		self.cfg_create_from_file(path)
		cfg_list = [self.cfg]

		FrameworkAdaptor(cfg_list, [], [], is_function)
		initialize_constraint_table(cfg_list)

		analyse(cfg_list)

		trigger_word_file = os.path.join('pytaintx',
		'vulnerability_definitions',
		'all_trigger_words.pyt')

		return find_vulnerabilities(cfg_list,
		default_blackbox_mapping_file,
		trigger_word_file)
    def run_analysis(self, path):
        path = os.path.normpath(path)

        project_modules = get_modules(os.path.dirname(path))
        local_modules = get_directory_modules(os.path.dirname(path))

        self.cfg_create_from_file(path, project_modules, local_modules)

        cfg_list = [self.cfg]

        FrameworkAdaptor(cfg_list, [], [], is_flask_route_function)

        initialize_constraint_table(cfg_list)

        analyse(cfg_list)

        return find_vulnerabilities(cfg_list, default_blackbox_mapping_file,
                                    default_trigger_word_file)
Пример #5
0
	def run_analysis(self,
	path=None,
	adaptor_function=is_flask_route_function,
	trigger_file=default_trigger_word_file,
																	):
		if path:
			self.cfg_create_from_file(path)
		cfg_list = [self.cfg]

		FrameworkAdaptor(cfg_list, [], [], adaptor_function)
		initialize_constraint_table(cfg_list)

		analyse(cfg_list)

		return find_vulnerabilities(cfg_list,
		default_blackbox_mapping_file,
		trigger_file,
																													)