Skip to content

Commit

Permalink
feat(sast): always use "build.sh" as build command (CodeQL)
Browse files Browse the repository at this point in the history
  • Loading branch information
sphl committed Nov 2, 2023
1 parent e6fbbaa commit 4bbacb1
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions sast-fuzz/static_analysis/sast/src/sfa/analysis/tool_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4bbacb1

Please sign in to comment.