From cf4604f23abb99f767ecdc7fb635285c8a5e1266 Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Wed, 12 Jun 2024 16:54:50 +0100 Subject: [PATCH 01/11] webapp: expose project repository (#1562) Signed-off-by: David Korczynski --- .../app/static/assets/db/oss_fuzz.py | 23 ++++++++++++++++++ .../assets/db/web_db_creator_from_summary.py | 13 ++++++++++ .../app/webapp/__init__.py | 3 ++- .../app/webapp/models.py | 3 ++- .../app/webapp/routes.py | 24 +++++++++++++++++++ 5 files changed, 64 insertions(+), 2 deletions(-) diff --git a/tools/web-fuzzing-introspection/app/static/assets/db/oss_fuzz.py b/tools/web-fuzzing-introspection/app/static/assets/db/oss_fuzz.py index 445425d7a..dcb364068 100644 --- a/tools/web-fuzzing-introspection/app/static/assets/db/oss_fuzz.py +++ b/tools/web-fuzzing-introspection/app/static/assets/db/oss_fuzz.py @@ -331,3 +331,26 @@ def try_to_get_project_language(project_name): project_yaml = yaml.safe_load(r.text) return project_yaml['language'] return "N/A" + + +def try_to_get_project_repository(project_name): + if os.path.isdir(constants.OSS_FUZZ_CLONE): + local_project_path = os.path.join(constants.OSS_FUZZ_CLONE, "projects", + project_name) + if os.path.isdir(local_project_path): + project_yaml_path = os.path.join(local_project_path, + "project.yaml") + if os.path.isfile(project_yaml_path): + with open(project_yaml_path, "r") as f: + project_yaml = yaml.safe_load(f.read()) + return project_yaml['main_repo'] + else: + proj_yaml_url = 'https://raw.githubusercontent.com/google/oss-fuzz/master/projects/%s/project.yaml' % ( + project_name) + try: + r = requests.get(proj_yaml_url, timeout=10) + except: + return "N/A" + project_yaml = yaml.safe_load(r.text) + return project_yaml['main_repo'] + return "N/A" diff --git a/tools/web-fuzzing-introspection/app/static/assets/db/web_db_creator_from_summary.py b/tools/web-fuzzing-introspection/app/static/assets/db/web_db_creator_from_summary.py index 068aa2d10..29c40ad2a 100644 --- a/tools/web-fuzzing-introspection/app/static/assets/db/web_db_creator_from_summary.py +++ b/tools/web-fuzzing-introspection/app/static/assets/db/web_db_creator_from_summary.py @@ -336,6 +336,11 @@ def extract_local_project_data(project_name, oss_fuzz_path, # Dump things we dont want to accummulate. #save_branch_blockers(branch_pairs, project_name) + try: + project_repository = oss_fuzz.try_to_get_project_repository( + project_name) + except: + project_repository = 'N/A' introspector_data_dict = { "introspector_report_url": 'introspector_url', @@ -365,6 +370,7 @@ def extract_local_project_data(project_name, oss_fuzz_path, 'coverage-data': code_coverage_data_dict, 'introspector-data': introspector_data_dict, 'fuzzer-count': amount_of_fuzzers, + 'project_repository': project_repository, } dictionary_key = '%s###%s' % (project_name, '') @@ -408,6 +414,12 @@ def extract_project_data(project_name, date_str, should_include_details, # Default set to c++ as this is OSS-Fuzz's default. project_language = 'c++' + try: + project_repository = oss_fuzz.try_to_get_project_repository( + project_name) + except: + project_repository = 'N/A' + collect_debug_info = project_language in {'c', 'c++'} # Extract code coverage and introspector reports. @@ -587,6 +599,7 @@ def extract_project_data(project_name, date_str, should_include_details, 'coverage-data': code_coverage_data_dict, 'introspector-data': introspector_data_dict, 'fuzzer-count': amount_of_fuzzers, + 'project_repository': project_repository, } dictionary_key = '%s###%s' % (project_name, date_str) diff --git a/tools/web-fuzzing-introspection/app/webapp/__init__.py b/tools/web-fuzzing-introspection/app/webapp/__init__.py index 25a5a1996..040271f11 100644 --- a/tools/web-fuzzing-introspection/app/webapp/__init__.py +++ b/tools/web-fuzzing-introspection/app/webapp/__init__.py @@ -92,7 +92,8 @@ def load_db(): date=project_timestamp['date'], coverage_data=project_timestamp['coverage-data'], introspector_data=project_timestamp['introspector-data'], - fuzzer_count=project_timestamp['fuzzer-count'])) + fuzzer_count=project_timestamp['fuzzer-count'], + project_repository=project_timestamp['project_repository'])) introspector_data = project_timestamp.get('introspector-data', None) if introspector_data is None: diff --git a/tools/web-fuzzing-introspection/app/webapp/models.py b/tools/web-fuzzing-introspection/app/webapp/models.py index 88de18de4..e1e9144db 100644 --- a/tools/web-fuzzing-introspection/app/webapp/models.py +++ b/tools/web-fuzzing-introspection/app/webapp/models.py @@ -66,13 +66,14 @@ def has_introspector(self) -> bool: class Project: def __init__(self, name, language, date, coverage_data, introspector_data, - fuzzer_count): + fuzzer_count, project_repository): self.name = name self.language = language self.date = date self.coverage_data = coverage_data self.introspector_data = introspector_data self.fuzzer_count = fuzzer_count + self.project_repository = project_repository def has_introspector(self) -> bool: return self.introspector_data != None diff --git a/tools/web-fuzzing-introspection/app/webapp/routes.py b/tools/web-fuzzing-introspection/app/webapp/routes.py index 347b719ca..2654a6e89 100644 --- a/tools/web-fuzzing-introspection/app/webapp/routes.py +++ b/tools/web-fuzzing-introspection/app/webapp/routes.py @@ -1214,6 +1214,30 @@ def api_oracle_1(): } +@blueprint.route('/api/project-repository') +def project_repository(): + err_msgs = list() + project_name = request.args.get('project', None) + if project_name == None: + return { + 'result': 'error', + 'extended_msgs': ['Please provide project name'] + } + + target_project = None + all_projects = data_storage.get_projects() + for project in all_projects: + if project.name == project_name: + target_project = project + break + if target_project is None: + return {'result': 'error', 'extended_msgs': ['Did not find project']} + return { + 'result': 'success', + 'project-repository': target_project.project_repository + } + + @blueprint.route('/api/far-reach-but-low-coverage') def far_reach_but_low_coverage(): err_msgs = list() From 5c1f4e382ab41f1e1bd31abfcb4d0e59339079cb Mon Sep 17 00:00:00 2001 From: Arthur Chan Date: Wed, 12 Jun 2024 16:56:24 +0100 Subject: [PATCH 02/11] webapp: Fix wrong port type bug (#1565) Fix wrong port type bug Signed-off-by: Arthur Chan --- tools/web-fuzzing-introspection/app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/web-fuzzing-introspection/app/main.py b/tools/web-fuzzing-introspection/app/main.py index eb4c33b77..a065988b8 100644 --- a/tools/web-fuzzing-introspection/app/main.py +++ b/tools/web-fuzzing-introspection/app/main.py @@ -56,4 +56,4 @@ def create_app(): if __name__ == "__main__": create_app().run(debug=False, host="0.0.0.0", - port=os.environ.get("WEBAPP_PORT", 8080)) + port=int(os.environ.get("WEBAPP_PORT", '8080'))) From 634d3e2a9200ca3c401281cc45d1102026243cff Mon Sep 17 00:00:00 2001 From: Arthur Chan Date: Wed, 12 Jun 2024 17:04:53 +0100 Subject: [PATCH 03/11] webapp: Remove undefined functions (#1564) * [webapp] Remove undefined functions Signed-off-by: Arthur Chan * Remove unused function Signed-off-by: Arthur Chan --------- Signed-off-by: Arthur Chan --- tools/web-fuzzing-introspection/app/webapp/__init__.py | 10 ---------- tools/web-fuzzing-introspection/app/webapp/routes.py | 1 - 2 files changed, 11 deletions(-) diff --git a/tools/web-fuzzing-introspection/app/webapp/__init__.py b/tools/web-fuzzing-introspection/app/webapp/__init__.py index 040271f11..a57e02dfc 100644 --- a/tools/web-fuzzing-introspection/app/webapp/__init__.py +++ b/tools/web-fuzzing-introspection/app/webapp/__init__.py @@ -5,19 +5,9 @@ from . import models -def is_db_valid(): - db_timestamps_file = os.path.join( - os.path.dirname(__file__), "../static/assets/db/db-timestamps.json") - if not os.path.isfile(db_timestamps_file): - return False - return True - - def load_db(): """Loads the database""" print("Loading db") - if not is_db_valid(): - update_db() db_timestamps_file = os.path.join( os.path.dirname(__file__), "../static/assets/db/db-timestamps.json") diff --git a/tools/web-fuzzing-introspection/app/webapp/routes.py b/tools/web-fuzzing-introspection/app/webapp/routes.py index 2654a6e89..4b4babcbe 100644 --- a/tools/web-fuzzing-introspection/app/webapp/routes.py +++ b/tools/web-fuzzing-introspection/app/webapp/routes.py @@ -1394,7 +1394,6 @@ def shutdown(): if is_local or allow_shutdown: sig = getattr(signal, "SIGKILL", signal.SIGTERM) os.kill(os.getpid(), sig) - shutdown_server() return {'result': 'success', 'msg': 'shutdown'} else: return {'result': 'failed', 'msg': 'not a local server'} From b2183213c51e5fc80f33193b3ff8e448fc646774 Mon Sep 17 00:00:00 2001 From: Arthur Chan Date: Wed, 12 Jun 2024 17:08:10 +0100 Subject: [PATCH 04/11] webapp: Fix bug for wrong variable use (#1566) Signed-off-by: Arthur Chan --- .../web-fuzzing-introspection/app/static/assets/db/oss_fuzz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/web-fuzzing-introspection/app/static/assets/db/oss_fuzz.py b/tools/web-fuzzing-introspection/app/static/assets/db/oss_fuzz.py index dcb364068..09d39f78b 100644 --- a/tools/web-fuzzing-introspection/app/static/assets/db/oss_fuzz.py +++ b/tools/web-fuzzing-introspection/app/static/assets/db/oss_fuzz.py @@ -193,7 +193,7 @@ def extract_new_introspector_constructors(project_name, date_str): # Read the introspector artifact try: raw_introspector_json_request = requests.get( - introspector_functions_url, timeout=10) + introspector_constructor_url, timeout=10) introspector_constructors = json.loads( raw_introspector_json_request.text) except: From 0cf43f8a50170ec594c30e9e9b67fc33d13b44b6 Mon Sep 17 00:00:00 2001 From: Arthur Chan Date: Wed, 12 Jun 2024 17:16:18 +0100 Subject: [PATCH 05/11] webapp: Fix possible none project type (#1569) Fix possible none project type Signed-off-by: Arthur Chan --- tools/web-fuzzing-introspection/app/webapp/routes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/web-fuzzing-introspection/app/webapp/routes.py b/tools/web-fuzzing-introspection/app/webapp/routes.py index 4b4babcbe..9058625dc 100644 --- a/tools/web-fuzzing-introspection/app/webapp/routes.py +++ b/tools/web-fuzzing-introspection/app/webapp/routes.py @@ -744,7 +744,8 @@ def api_annotated_cfg(): 'result': 'success', 'project': { 'name': project_name, - 'annotated_cfg': project.introspector_data['annotated_cfg'], + 'annotated_cfg': + target_project.introspector_data['annotated_cfg'], } } except KeyError: @@ -771,8 +772,8 @@ def api_project_summary(): 'result': 'success', 'project': { 'name': project_name, - 'runtime_coverage_data': project.coverage_data, - 'introspector_data': project.introspector_data + 'runtime_coverage_data': target_project.coverage_data, + 'introspector_data': target_project.introspector_data } } From 8156c340353a460be824ed62f80cec565825fdc1 Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Wed, 12 Jun 2024 19:16:28 +0100 Subject: [PATCH 06/11] webapp: add route for getting sample cross references (#1571) Signed-off-by: David Korczynski --- .../app/webapp/routes.py | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/tools/web-fuzzing-introspection/app/webapp/routes.py b/tools/web-fuzzing-introspection/app/webapp/routes.py index 9058625dc..952ddc336 100644 --- a/tools/web-fuzzing-introspection/app/webapp/routes.py +++ b/tools/web-fuzzing-introspection/app/webapp/routes.py @@ -97,6 +97,7 @@ def extract_lines_from_source_code(project_name, raw_source = extract_introspector_raw_source_code(project_name, date_str, target_file) if raw_source is None: + print("Did not found source") return raw_source source_lines = raw_source.split("\n") @@ -1501,3 +1502,95 @@ def api_all_interesting_function_targets(): result_dict['function_targets'] = list_of_targets return result_dict + + +@blueprint.route('/api/sample-cross-references') +def sample_cross_references(): + """Returns a list of strings with functions that call into a given + target function.""" + project_name = request.args.get('project', None) + if project_name == None: + return {'result': 'error', 'msg': 'Please provide a project name'} + + function_signature = request.args.get('function_signature', None) + if function_signature == None: + return {'result': 'error', 'msg': 'No function signature provided'} + + # Get function from function signature + target_function = get_function_from_func_signature(function_signature, + project_name) + if target_function == None: + return { + 'result': 'error', + 'msg': 'Function signature could not be found' + } + function_name = target_function.raw_function_name + + # Get all of the functions + all_functions = data_storage.get_functions() + project_functions = [] + for function in all_functions: + if function.project == project_name: + project_functions.append(function) + + func_xrefs = [] + xrefs = [] + for function in project_functions: + callsites = function.callsites + for cs_dst in callsites: + if cs_dst == function_name: + func_xrefs.append(function) + all_locations = function.callsites[cs_dst] + for loc in all_locations: + filename = loc.split('#')[0] + cs_linenumber = int(loc.split(':')[-1]) + xrefs.append({ + 'filename': function.function_filename, + 'cs_linenumber': cs_linenumber, + 'src_func': function.name, + 'dst_func': function_name + }) + + if is_local: + latest_introspector_datestr = "notrelevant" + else: + all_build_status = data_storage.get_build_status() + latest_introspector_datestr = None + for build_status in all_build_status: + if build_status.project_name == project_name: + + # Get statistics of the project + project_statistics = data_storage.PROJECT_TIMESTAMPS + for ps in project_statistics: + if ps.project_name == project_name: + datestr = ps.date + if ps.introspector_data != None: + latest_introspector_datestr = datestr + + if latest_introspector_datestr == None: + return {'result': 'error', 'msg': 'No introspector builds.'} + + source_code_xrefs = [] + for target_function in func_xrefs: + src_begin = target_function.source_line_begin + src_end = target_function.source_line_end + src_file = target_function.function_filename + + # Check if we have accompanying debug info + debug_source_dict = target_function.debug_data.get('source', None) + if debug_source_dict: + source_line = int(debug_source_dict.get('source_line', -1)) + if source_line != -1: + src_begin = source_line + + source_code = extract_lines_from_source_code( + project_name, + latest_introspector_datestr, + src_file, + src_begin, + src_end, + sanity_check_function_end=True) + if source_code: + source_code_xrefs.append(source_code) + + return {'result': 'success', 'source-code-refs': source_code_xrefs} From 961ee6109f2aa1b4c5eba1b56cc15c49272b7178 Mon Sep 17 00:00:00 2001 From: Arthur Chan Date: Wed, 12 Jun 2024 20:29:37 +0100 Subject: [PATCH 07/11] webapp: Fix possible unbound bs variable (#1570) * webapp: Fix possible unbound bs variable Signed-off-by: Arthur Chan * Remote wrong error statement Signed-off-by: Arthur Chan --------- Signed-off-by: Arthur Chan --- tools/web-fuzzing-introspection/app/webapp/routes.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/web-fuzzing-introspection/app/webapp/routes.py b/tools/web-fuzzing-introspection/app/webapp/routes.py index 952ddc336..ee83a49b8 100644 --- a/tools/web-fuzzing-introspection/app/webapp/routes.py +++ b/tools/web-fuzzing-introspection/app/webapp/routes.py @@ -1326,6 +1326,15 @@ def far_reach_but_low_coverage(): err_msgs.append('No functions found.') bs = get_build_status_of_project(project_name) + if bs == None: + return { + 'result': + 'error', + 'extended_msgs': [ + 'Project not in OSS-Fuzz (likely only contains a project.yaml file).' + ] + } + # Check that builds are failing if bs.introspector_build_status is False: err_msgs.append('No successful build: introspector.') From ef663764de877608f56766ddf0be479c4bdaf521 Mon Sep 17 00:00:00 2001 From: Arthur Chan Date: Wed, 12 Jun 2024 20:30:48 +0100 Subject: [PATCH 08/11] webapp: Add typing for data storage list (#1567) * webapp: Add typing for data storage list Signed-off-by: Arthur Chan * Fix typing Signed-off-by: Arthur Chan * Fix typing Signed-off-by: Arthur Chan --------- Signed-off-by: Arthur Chan --- .../app/webapp/data_storage.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/web-fuzzing-introspection/app/webapp/data_storage.py b/tools/web-fuzzing-introspection/app/webapp/data_storage.py index cead988d0..d5d84e7fb 100644 --- a/tools/web-fuzzing-introspection/app/webapp/data_storage.py +++ b/tools/web-fuzzing-introspection/app/webapp/data_storage.py @@ -1,30 +1,30 @@ # Auto-generated #from app.site.models import * -from typing import List +from typing import List, Dict, Any import os import json from .models import * -PROJECT_TIMESTAMPS = [] +PROJECT_TIMESTAMPS: List[ProjectTimestamp] = [] -DB_TIMESTAMPS = [] +DB_TIMESTAMPS: List[DBTimestamp] = [] -PROJECTS = [] +PROJECTS: List[Project] = [] -FUNCTIONS = [] +FUNCTIONS: List[Function] = [] -CONSTRUCTORS = [] +CONSTRUCTORS: List[Function] = [] -BLOCKERS = [] +BLOCKERS: List[BranchBlocker] = [] BUILD_STATUS: List[BuildStatus] = [] -PROJECT_DEBUG_DATA = [] +PROJECT_DEBUG_DATA: List[DebugStatus] = [] -ALL_HEADER_FILES = [] +ALL_HEADER_FILES: List[Dict[str, Any]] = [] def get_projects(): From 19b8c27f1e4e180eeb216bfacf581e3143dd22a8 Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Thu, 13 Jun 2024 10:47:01 +0100 Subject: [PATCH 09/11] oss-fuzz-gen: add one more runner script (#1573) Signed-off-by: David Korczynski --- scripts/oss-fuzz-gen-e2e/web_run_all.sh | 76 +++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100755 scripts/oss-fuzz-gen-e2e/web_run_all.sh diff --git a/scripts/oss-fuzz-gen-e2e/web_run_all.sh b/scripts/oss-fuzz-gen-e2e/web_run_all.sh new file mode 100755 index 000000000..149d49931 --- /dev/null +++ b/scripts/oss-fuzz-gen-e2e/web_run_all.sh @@ -0,0 +1,76 @@ +#!/bin/bash -eux +# Copyright 2024 Fuzz Introspector Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + + +ROOT_FI=$PWD/../../ +BASE_DIR=$PWD/workdir +BENCHMARK_HEURISTICS="${VARIABLE:-far-reach-low-coverage,low-cov-with-fuzz-keyword}" +OSS_FUZZ_GEN_MODEL=${MODEL} +VAR_HARNESSES_PER_ORACLE="${HARNESS_PER_ORACLE:-2}" +VAR_LLM_FIX_LIMIT="${LLM_FIX_LIMIT:-1}" +PROJECT=${@} + +comma_separated="" +for proj in ${PROJECT}; do + echo ${proj} + comma_separated="${comma_separated}${proj}," +done +comma_separated=${comma_separated::-1} + +# Launch virtualenv +cd ${BASE_DIR} +. .venv/bin/activate + +# Create webserver DB +echo "[+] Creating the webapp DB" +cd $ROOT_FI/tools/web-fuzzing-introspection/app/static/assets/db/ +python3 ./web_db_creator_from_summary.py --includes="${PROJECT}" +#exit 0 +# Start webserver DB +echo "Shutting down server in case it's running" +curl --silent http://localhost:8080/api/shutdown || true + +echo "[+] Launching FI webapp" +cd $ROOT_FI/tools/web-fuzzing-introspection/app/ +FUZZ_INTROSPECTOR_SHUTDOWN=1 python3 ./main.py >> /dev/null & + +SECONDS=5 +while true +do + # Checking if exists + MSG=$(curl -v --silent 127.0.0.1:8080 2>&1 | grep "Fuzzing" | wc -l) + if [[ $MSG > 0 ]]; then + echo "Found it" + break + fi + echo "- Waiting for webapp to load. Sleeping ${SECONDS} seconds." + sleep ${SECONDS} +done + +# Deactivate +echo "[+] Running OSS-Fuzz-gen experiment" +export LLM_FIX_LIMIT=${VAR_LLM_FIX_LIMIT} +cd $BASE_DIR/oss-fuzz-gen +./run_all_experiments.py \ + --model=$OSS_FUZZ_GEN_MODEL \ + -g ${BENCHMARK_HEURISTICS} \ + -gp ${comma_separated} \ + -gm ${VAR_HARNESSES_PER_ORACLE} \ + -e http://127.0.0.1:8080/api + +echo "Shutting down started webserver" +curl --silent http://localhost:8080/api/shutdown || true From 6911e2a218554db40e824b0ef20fbdd1273b1b26 Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Thu, 13 Jun 2024 11:12:50 +0100 Subject: [PATCH 10/11] webapp: return error if project not found (#1574) * webapp: return error if project not found Signed-off-by: David Korczynski * nit Signed-off-by: DavidKorczynski --------- Signed-off-by: David Korczynski Signed-off-by: DavidKorczynski --- tools/web-fuzzing-introspection/app/webapp/routes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/web-fuzzing-introspection/app/webapp/routes.py b/tools/web-fuzzing-introspection/app/webapp/routes.py index ee83a49b8..12956d519 100644 --- a/tools/web-fuzzing-introspection/app/webapp/routes.py +++ b/tools/web-fuzzing-introspection/app/webapp/routes.py @@ -1184,6 +1184,8 @@ def api_oracle_1(): if project.name == project_name: target_project = project break + if not target_project: + return {'result': 'error', 'extended_msgs': ['Could not find project']} all_functions = data_storage.get_functions() all_projects = [target_project] From f940ad443298c82a955b27c8bfd3db80c923a03b Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Thu, 13 Jun 2024 11:15:40 +0100 Subject: [PATCH 11/11] oss-fuzz-gen: adjust webdb creation (#1575) Signed-off-by: David Korczynski --- scripts/oss-fuzz-gen-e2e/web_run_all.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/oss-fuzz-gen-e2e/web_run_all.sh b/scripts/oss-fuzz-gen-e2e/web_run_all.sh index 149d49931..66a80e6d3 100755 --- a/scripts/oss-fuzz-gen-e2e/web_run_all.sh +++ b/scripts/oss-fuzz-gen-e2e/web_run_all.sh @@ -20,7 +20,7 @@ ROOT_FI=$PWD/../../ BASE_DIR=$PWD/workdir BENCHMARK_HEURISTICS="${VARIABLE:-far-reach-low-coverage,low-cov-with-fuzz-keyword}" OSS_FUZZ_GEN_MODEL=${MODEL} -VAR_HARNESSES_PER_ORACLE="${HARNESS_PER_ORACLE:-2}" +VAR_HARNESSES_PER_ORACLE="${HARNESS_PER_ORACLE:-10}" VAR_LLM_FIX_LIMIT="${LLM_FIX_LIMIT:-1}" PROJECT=${@} @@ -38,8 +38,12 @@ cd ${BASE_DIR} # Create webserver DB echo "[+] Creating the webapp DB" cd $ROOT_FI/tools/web-fuzzing-introspection/app/static/assets/db/ -python3 ./web_db_creator_from_summary.py --includes="${PROJECT}" -#exit 0 +python3 ./web_db_creator_from_summary.py \ + --since-date=20-04-2023 \ + --output-dir=$PWD \ + --input-dir=$PWD \ + --includes=${comma_separated} + # Start webserver DB echo "Shutting down server in case it's running" curl --silent http://localhost:8080/api/shutdown || true