Skip to content

Commit 7acba22

Browse files
committed
Fixes semgrep parsing: convert to String before substring()
Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
1 parent 006fe5e commit 7acba22

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scanners/semgrep/parser/parser.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async function parse(fileContent) {
3434
});
3535

3636
if(result.extra.metadata.cwe != null) {
37-
const cweReference = result.extra.metadata.cwe.substring(4,6);
37+
const cweReference = String(result.extra.metadata.cwe).substring(4,6);
3838
references.push(
3939
{
4040
"type": "CWE",

0 commit comments

Comments
 (0)