xploitscan-shared-rules 1.11.0 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1106,7 +1106,7 @@ function isCommentLine(content, matchIndex) {
|
|
|
1106
1106
|
function isInsideFixMessage(content, matchIndex) {
|
|
1107
1107
|
const lineStart = content.lastIndexOf("\n", matchIndex - 1) + 1;
|
|
1108
1108
|
const lineText = content.substring(lineStart, content.indexOf("\n", matchIndex));
|
|
1109
|
-
return /(?:fix|description|message|suggestion|hint|help|example|doc|comment)\s*[:=
|
|
1109
|
+
return /(?:fix|description|message|suggestion|hint|help|example|doc|comment)\s*[:=]\s*["'`]/i.test(lineText) || /return\s*["'`].*\b(?:Use|Replace|Add|Move|Set|Enable|Disable|Never|Don't|Do not|Instead)\b/i.test(lineText);
|
|
1110
1110
|
}
|
|
1111
1111
|
function isInlineSilenced(content, matchIndex, ruleId) {
|
|
1112
1112
|
const lines = content.split("\n");
|