Skip to content

Commit 587c055

Browse files
committed
fix(cppcheck): handle invalid CWE id due to id not converted to integer
1 parent 3836003 commit 587c055

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

codesectools/sasts/tools/Cppcheck/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(self, output_dir: Path, xml_tree: ElementTree, cmdout: dict) -> Non
7979
filepath=Path(error.xpath("location")[0].get("file")),
8080
checker=error.get("id"),
8181
category=category,
82-
cwe=CWEs.from_id(error.get("cwe", -1)),
82+
cwe=CWEs.from_id(int(error.get("cwe", -1))),
8383
message=error.get("msg"),
8484
lines=[
8585
int(location.get("line"))

0 commit comments

Comments
 (0)