We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 869c6d7 commit 4b9ced2Copy full SHA for 4b9ced2
src/main.ts
@@ -104,11 +104,12 @@ JSONPath({
104
if (tag.startsWith(codeQlCweTagPrefix)) {
105
const cweId = tag.replace(codeQlCweTagPrefix, '')
106
// Normalize CWE ID by converting to integer to remove leading zeros
107
- const normalizedCweId = String(parseInt(cweId, 10))
+ const parsedCweId = parseInt(cweId, 10)
108
// Skip if the CWE ID is not a valid number
109
- if (normalizedCweId === 'NaN') {
+ if (Number.isNaN(parsedCweId)) {
110
continue
111
}
112
+ const normalizedCweId = String(parsedCweId)
113
if (cweIds.includes(normalizedCweId)) {
114
tags.push(securityStandardTag)
115
tags.push(...cweCategories[normalizedCweId])
0 commit comments