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.cjs
CHANGED
|
@@ -644,11 +644,17 @@ var NON_APP_PATH_PATTERNS = [
|
|
|
644
644
|
// which makes even a repo-root `.claude/` a nested segment.
|
|
645
645
|
".claude/**",
|
|
646
646
|
".agent/**",
|
|
647
|
+
// Plural too. `.agent/**` alone let `.agents/skills/**` through as app code,
|
|
648
|
+
// and agent scaffolds ship .tsx templates — so every rule fired on somebody
|
|
649
|
+
// else's boilerplate. Found 2026-09-15 while specifying the unwired-control
|
|
650
|
+
// check, which produced 4 accusations against one such template.
|
|
651
|
+
".agents/**",
|
|
647
652
|
".cursor/**",
|
|
648
653
|
".superpowers/**",
|
|
649
654
|
".windsurf/**",
|
|
650
655
|
"**/.claude/**",
|
|
651
656
|
"**/.agent/**",
|
|
657
|
+
"**/.agents/**",
|
|
652
658
|
"**/.cursor/**",
|
|
653
659
|
"**/.superpowers/**",
|
|
654
660
|
"**/.windsurf/**",
|
|
@@ -2332,6 +2338,19 @@ var stripeWebhookUnprotected = {
|
|
|
2332
2338
|
return matches;
|
|
2333
2339
|
}
|
|
2334
2340
|
};
|
|
2341
|
+
var PLACEHOLDER_IDENT_RE = /(?<![\w$])([\w$]*?)(placeholders?)(?![\w$])/gi;
|
|
2342
|
+
function namesPlaceholderRun(content) {
|
|
2343
|
+
PLACEHOLDER_IDENT_RE.lastIndex = 0;
|
|
2344
|
+
let m = PLACEHOLDER_IDENT_RE.exec(content);
|
|
2345
|
+
for (; m !== null; m = PLACEHOLDER_IDENT_RE.exec(content)) {
|
|
2346
|
+
const prefix = m[1];
|
|
2347
|
+
if (prefix === "") return true;
|
|
2348
|
+
const boundary = prefix[prefix.length - 1];
|
|
2349
|
+
if (boundary === "_" || boundary === "$") return true;
|
|
2350
|
+
if (/[a-z0-9]/.test(boundary) && /[A-Z]/.test(m[2][0])) return true;
|
|
2351
|
+
}
|
|
2352
|
+
return false;
|
|
2353
|
+
}
|
|
2335
2354
|
var sqlInjection = {
|
|
2336
2355
|
id: "VC006",
|
|
2337
2356
|
title: "Potential SQL Injection",
|
|
@@ -2367,8 +2386,8 @@ var sqlInjection = {
|
|
|
2367
2386
|
/["'`]\s*(?:SELECT|INSERT|UPDATE|DELETE)\b[^"'`\n]*\b(?:FROM|INTO|SET|VALUES|WHERE|JOIN|RETURNING)\b[^"'`\n]*\$\{(?!.*parameterized)/gi
|
|
2368
2387
|
];
|
|
2369
2388
|
const matches = [];
|
|
2370
|
-
const usesParams = /\?\s*,|\?[^?,;]{1,20}\?|\$\d+|:[\w]+|\bprepare\b
|
|
2371
|
-
if (usesParams) return [];
|
|
2389
|
+
const usesParams = /\?\s*,|\?[^?,;]{1,20}\?|\$\d+|:[\w]+|\bprepare\b/i.test(content);
|
|
2390
|
+
if (usesParams || namesPlaceholderRun(content)) return [];
|
|
2372
2391
|
for (const pattern of patterns) {
|
|
2373
2392
|
const raw = findMatches(
|
|
2374
2393
|
content,
|