xploitscan-shared-rules 1.27.1 → 1.27.3
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 +21 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -343,11 +343,17 @@ var NON_APP_PATH_PATTERNS = [
|
|
|
343
343
|
// which makes even a repo-root `.claude/` a nested segment.
|
|
344
344
|
".claude/**",
|
|
345
345
|
".agent/**",
|
|
346
|
+
// Plural too. `.agent/**` alone let `.agents/skills/**` through as app code,
|
|
347
|
+
// and agent scaffolds ship .tsx templates — so every rule fired on somebody
|
|
348
|
+
// else's boilerplate. Found 2026-09-15 while specifying the unwired-control
|
|
349
|
+
// check, which produced 4 accusations against one such template.
|
|
350
|
+
".agents/**",
|
|
346
351
|
".cursor/**",
|
|
347
352
|
".superpowers/**",
|
|
348
353
|
".windsurf/**",
|
|
349
354
|
"**/.claude/**",
|
|
350
355
|
"**/.agent/**",
|
|
356
|
+
"**/.agents/**",
|
|
351
357
|
"**/.cursor/**",
|
|
352
358
|
"**/.superpowers/**",
|
|
353
359
|
"**/.windsurf/**",
|
|
@@ -2031,6 +2037,19 @@ var stripeWebhookUnprotected = {
|
|
|
2031
2037
|
return matches;
|
|
2032
2038
|
}
|
|
2033
2039
|
};
|
|
2040
|
+
var PLACEHOLDER_IDENT_RE = /(?<![\w$])([\w$]*?)(placeholders?)(?![\w$])/gi;
|
|
2041
|
+
function namesPlaceholderRun(content) {
|
|
2042
|
+
PLACEHOLDER_IDENT_RE.lastIndex = 0;
|
|
2043
|
+
let m = PLACEHOLDER_IDENT_RE.exec(content);
|
|
2044
|
+
for (; m !== null; m = PLACEHOLDER_IDENT_RE.exec(content)) {
|
|
2045
|
+
const prefix = m[1];
|
|
2046
|
+
if (prefix === "") return true;
|
|
2047
|
+
const boundary = prefix[prefix.length - 1];
|
|
2048
|
+
if (boundary === "_" || boundary === "$") return true;
|
|
2049
|
+
if (/[a-z0-9]/.test(boundary) && /[A-Z]/.test(m[2][0])) return true;
|
|
2050
|
+
}
|
|
2051
|
+
return false;
|
|
2052
|
+
}
|
|
2034
2053
|
var sqlInjection = {
|
|
2035
2054
|
id: "VC006",
|
|
2036
2055
|
title: "Potential SQL Injection",
|
|
@@ -2066,8 +2085,8 @@ var sqlInjection = {
|
|
|
2066
2085
|
/["'`]\s*(?:SELECT|INSERT|UPDATE|DELETE)\b[^"'`\n]*\b(?:FROM|INTO|SET|VALUES|WHERE|JOIN|RETURNING)\b[^"'`\n]*\$\{(?!.*parameterized)/gi
|
|
2067
2086
|
];
|
|
2068
2087
|
const matches = [];
|
|
2069
|
-
const usesParams = /\?\s*,|\?[^?,;]{1,20}\?|\$\d+|:[\w]+|\bprepare\b
|
|
2070
|
-
if (usesParams) return [];
|
|
2088
|
+
const usesParams = /\?\s*,|\?[^?,;]{1,20}\?|\$\d+|:[\w]+|\bprepare\b/i.test(content);
|
|
2089
|
+
if (usesParams || namesPlaceholderRun(content)) return [];
|
|
2071
2090
|
for (const pattern of patterns) {
|
|
2072
2091
|
const raw = findMatches(
|
|
2073
2092
|
content,
|