Haf

Latest version: v2.9.7

Safety actively analyzes 687959 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 6

2.8.4

- fix some bugs of -nout -llog -debug
- make runner faster than before at linux/unix platform
- add docs to py files

2.8.2

- support new cmd prams

- nout - no output
- filter-case - filter cases to run
- local-logger llog - local logger make haf faster

2.8.0

- add `-no-output` support (-nout=true)
- add jenkinsfile test of `nout`
- make sub log to one dir of test-name
- fix some bugs

2.7.7

- add pluginmanager
python
import itertools
import random

import pluggy
import json
import os
import sys
import argparse
from haf import hookspecs, lib


class PluginManager(object):
def __init__(self):
self.get_plugin_manager()

def add_options(self, sub_run_arg_program):
pm = self.pm
return pm.hook.add_option(parse = sub_run_arg_program)

def load_from_file(self, file_name):
pm = self.pm
inputs = pm.hook.load_from_file(file_name = file_name)
if isinstance(inputs, list):
return inputs[0]
elif isinstance(inputs, dict):
return inputs

def publish_to_sql(self, args, results):
pm = self.pm
publish_result = pm.hook.publish_to_sql(args=args, results=results)
return publish_result

def start_web_server(self, args, bus_client):
pm = self.pm
result = pm.hook.start_web_server(args=args, bus_client=bus_client)
return result

def get_plugin_manager(self):
self.pm = pluggy.PluginManager("haf")
self.pm.add_hookspecs(hookspecs)
self.pm.load_setuptools_entrypoints("haf")
self.pm.register(lib)
return self.pm


plugin_manager = PluginManager()


- add hookspecs support
python
import pluggy


hookspec = pluggy.HookspecMarker("haf")


hookspec
def add_option(parse):
"""add option to parse

:param run args
:return: None
"""


hookspec
def load_from_file(file_name):
"""add option to parse

:param run args
:return: file_name
"""


hookspec
def publish_to_sql(args, results):
"""publish result to sql

:param publish : or not
:param result : publish result
:return : None
"""

hookspec
def start_web_server(args, bus_client):
"""start web server

:param args:
:return:
"""

- update sqlpublish and apiserver to new plugin mode

2.7.5

- remove local Lock
- using mutiprocessing's Lock to make runner faster
- fix some bugs of lossing case 29
- fix not stop runner issue

2.7.1

add issue template
update readme and docs and pngs
update stage design:
> support stage-result
> include app and web stage
add py bench support
add case reuse try : TODO
add redistool to database

Page 2 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.