From 4bbacb16e789495eabd0827eae650f9d9838bdc0 Mon Sep 17 00:00:00 2001 From: Stephan Lipp Date: Thu, 2 Nov 2023 18:44:09 +0100 Subject: [PATCH] feat(sast): always use "build.sh" as build command (CodeQL) --- .../sast/src/sfa/analysis/tool_runner.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/sast-fuzz/static_analysis/sast/src/sfa/analysis/tool_runner.py b/sast-fuzz/static_analysis/sast/src/sfa/analysis/tool_runner.py index bd0d471..828eed7 100644 --- a/sast-fuzz/static_analysis/sast/src/sfa/analysis/tool_runner.py +++ b/sast-fuzz/static_analysis/sast/src/sfa/analysis/tool_runner.py @@ -276,18 +276,11 @@ class CodeQLRunner(SASTToolRunner): def _setup(self, temp_dir: Path) -> Path: result_dir = temp_dir / "codeql_res" - if self._is_cmake_project: - run_shell_command( - f"{self._config.path} database create --language=cpp --command=./{BUILD_SCRIPT_NAME} --threads={self._config.num_threads} {result_dir}", - cwd=copy_dir(self._subject_dir, temp_dir), - env=SAST_SETUP_ENV, - ) - else: - run_shell_command( - f'./{BUILD_SCRIPT_NAME} "{self._config.path} database create --language=cpp --command=make --threads={self._config.num_threads} {result_dir}"', - cwd=copy_dir(self._subject_dir, temp_dir), - env=SAST_SETUP_ENV, - ) + run_shell_command( + f"{self._config.path} database create --language=cpp --command=./{BUILD_SCRIPT_NAME} --threads={self._config.num_threads} {result_dir}", + cwd=copy_dir(self._subject_dir, temp_dir), + env=SAST_SETUP_ENV, + ) return result_dir