From 4ad4faeacc92df96d1a103297fc9651d88c73cc0 Mon Sep 17 00:00:00 2001 From: Villon CHEN Date: Tue, 25 Nov 2025 17:36:10 +0100 Subject: [PATCH 1/2] fix(SpotBugs): skip defect when file path is incorrect Previously, a defect with an invalid file path would raise an exception causing the tool to stop --- codesectools/sasts/tools/SpotBugs/parser.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/codesectools/sasts/tools/SpotBugs/parser.py b/codesectools/sasts/tools/SpotBugs/parser.py index f5a2cce..4c4fe22 100644 --- a/codesectools/sasts/tools/SpotBugs/parser.py +++ b/codesectools/sasts/tools/SpotBugs/parser.py @@ -84,10 +84,11 @@ def __init__(self, output_dir: Path, result_data: dict, cmdout: dict) -> None: ] ) if partial_filepath.parent not in partial_parents: - filepath = next( - self.source_path.rglob(str(partial_filepath)) - ).relative_to(self.source_path) - partial_parents[partial_filepath.parent] = filepath.parent + if next(self.source_path.rglob(str(partial_filepath)), None): + filepath = next( + self.source_path.rglob(str(partial_filepath)) + ).relative_to(self.source_path) + partial_parents[partial_filepath.parent] = filepath.parent else: filepath = ( partial_parents[partial_filepath.parent] / partial_filepath.name From 8ddaea880067f34ac645d6e6e06091490b6b2993 Mon Sep 17 00:00:00 2001 From: Villon CHEN Date: Tue, 25 Nov 2025 17:36:45 +0100 Subject: [PATCH 2/2] chore(release): bump project version --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6d990f6..e117248 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "CodeSecTools" -version = "0.13.6" +version = "0.13.7" description = "A framework for code security that provides abstractions for static analysis tools and datasets to support their integration, testing, and evaluation." readme = "README.md" license = "AGPL-3.0-only" diff --git a/uv.lock b/uv.lock index 104af77..e9cb1bc 100644 --- a/uv.lock +++ b/uv.lock @@ -221,7 +221,7 @@ wheels = [ [[package]] name = "codesectools" -version = "0.13.6" +version = "0.13.7" source = { editable = "." } dependencies = [ { name = "gitpython" },